Magento – Google Conversion Tracking Code in Shop einbinden

In order to efficiently use Magento in conjunction with Google Analytics, Conversion tracking is an extremely useful and really not do without.

For this must first be registered with Google and therefore in Google Analytics.

Then, click in the area on Google Analytics

1. Tools und Analysen > Conversions

2. Then on “+ Neue Conversion”

3. Als Conversion Name z.B. “Purchase” enter. The conversion is a place “Website”

4. After clicking Next, then as a conversion category “Purchase / Sale” select

5. Security level is at hand for Magento ansich HTTPS (if it is SSL encrypted), otherwise HTTP

6. Markup language is HTML

7. When conversion value must not be entered

8. Ad Tracking: Here, the visitor of the site will be informed, that his call “counted” is. It must decide themselves, whether he wants the.

9. With more still can be a little changed, must also not

10. After the next click Next, the selection at “I make changes to the code” (with the other, one can determine the code e.g.. Web developers can get his)

11. The acquired code, we can then install it in the shop.

12. The template used by the Open success.phtml. It is located in the folder app / design / frontend /[base or default]/[IhrTemplate]/template/checkout

13. Scroll down. IN the last </div> then following code to install:

<!-- Google Code Page Conversion fuer Kauf - using commercers. ->
<?php
// Get Order Total Amount
$order = Mage::getModel('sales/order')->load(Magus::getSingleton('checkout/session')->getLastOrderId());
$amount = $order->getData('grand_total');
$total = number_format($amount, 2);
?>

HERE BE THE CODE, DIRECTLY FROM GOOGLE WAS WON

<!-- Ende Google Code Page Conversion fuer Verkauf ->

 

14. Everything save and re-upload. Then Google should (possibly only a few hours later) begin counting.

15. For legal reasons, Incidentally, one must u.a. inform the customer, dass Google Analytics etc.. is used. Therefore best fit into the policy, the Google standard clause. This is e.g.. HERE in point 8.1 be found.

P.S. Magento and Google Analytics to combine rel. just. Only backend under System > Configuration > Sales > Google's own Google API client number Entering and activating.

Used in Magento versions 1.4.1.1 and 1.5.1.0 Comments? Additions? Notes? Gladly!

Addendum dated 28.11.2012
Analytics was apparently at some changed. The o.g. Procedure is now only available for Google AdWords.

Published by Covos

Since 2009 I have been working intensively with Magento. I started with the creation and operation of B2C stores. This was extended through my work in the logistics sector. This resulted first specialized B2E systems. Today I work day-a day with exciting B2C, B2B- and B2E projects and reports in this blog about challenges and give insider tips.

One comment on “Magento – Google Conversion Tracking Code in Shop einbinden”

  1. Super Post, thank you! In fact, long sought after…
    I would be interested as I for tracking other important values ​​with reinbekomme:

    – Ordered Products
    – Shipping
    – Coupon Code
    – Order (s inside)
    – Customer number (just out of interest ;))

    Would be great, if you can still add the.
    Thank you!

Leave a Reply

Your email address will not be published. Required fields are marked *