Categories: Adword Conversion Tracking

Adwords Conversion Tracking in Magento

As a web developer and digital marketian, I have worked on too many website, which was/is developed on different -different type of CMS, custom platform and frameworks.

Magento is one of the most popular open-source e-commerce platform. It is very popular and robust eCommerce platform because anyone having light knowledge of PHP, javaScript, HTML can built their own website and this is very easy to setup.

As a digital marketian, when I was trying to implement google or any other ads agency code, I faced some challenges and also too many other guys asked too many questions, like:

  1. How to add conversion tracking code on Magento?

  2.  Where do we have to add conversion tracking on Magento?

  3. How to fetch conversion value/total value in magento?

Here I have mentioned Simple solution of all 3 questions. But to implement conversion code(Google Adwords) you must have access of Admin panel or FTP access of the site.

If you have only admin access or light knowledge of web development, you can use Magento Adword Conversion extension(paid/free) from Magento Commerce.

But if you are a developer and you have FTP access you can follow below steps to add conversion code with value in Magento:

  • Login to FTP.
  • Open success.phtml (file path: app->design->frontend-> yourPackage->yourTheme->template->checkout->success.phtml).
  • Add the below code  in bottom of success.phtml.
<?php $order = Mage::getModel('sales/order')->load(Mage::getSingleton('checkout/session')->getLastOrderId()); 
$subtotal = $order->getSubtotal();
$gtotal = $order->getGrandTotal();

?> 

// add Conversion code here and replace conversion value  with <?php echo $gtotal;?><br>

Just after above code add your conversion code and replace conversion value with in both script tag as well as noscript tag.

If any issue kindly leave comment or contact me.

Note: Above mention code will work on Magento v1.x(Like 1.9, 1.8, ..)

Notes On Click

Share
Published by
Notes On Click
Tags: magentomagento conversion trackingmagento ecommerce trackingmagento remarketing

Recent Posts

  • Adword Conversion Tracking
  • Google Adwords Remarketing

Conversion and Remaketing code in BigCommerce

In this blog, you will see how to add Adwords Conversion Tracking and Remarkeing Code in BigCommerce.BigCommerce is one of…

7 years ago
  • Google Analytics and Ecommerce Tracking

Ecommerce Tracking in OpenCart 2.3

Around 6 months back, I had published an article on “How to add GA e-commerce tracking in Opencart“. I am really thankful…

8 years ago
  • Google Analytics and Ecommerce Tracking

Google Analytics Definition and Common Terms

 If you have gone through our previous blog about Google Analytics, you might have sound understanding about Google Analytics and how it…

8 years ago
  • Google Analytics and Ecommerce Tracking

What is Google Analytics and it’s Features?

Do you want to know more about your visitors and how your content is performing?​ Whether you run a website…

8 years ago
  • Google Analytics and Ecommerce Tracking

How to Add Google Analytics in BigCommerce

In this blog, you will see how to add Google Analytics and E-commerce Tracking Code  in BigCommerce. BigCommerce is one of the…

8 years ago
  • Google Analytics and Ecommerce Tracking

Google Analytics and E-commerce Tracking in Miva Merchant

If you have gone through some of previous blog, you might have seen how to install google analytics, e-commerce tracking…

8 years ago