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

Recent Posts

Conversion and Remaketing code in BigCommerce

In this blog, you will see how to add Adwords Conversion Tracking and Remarkeing Code…

9 years ago

Ecommerce Tracking in OpenCart 2.3

Around 6 months back, I had published an article on “How to add GA e-commerce tracking…

9 years ago

Google Analytics Definition and Common Terms

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

9 years ago

What is Google Analytics and it’s Features?

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

9 years ago

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.…

9 years ago

Google Analytics and E-commerce Tracking in Miva Merchant

If you have gone through some of previous blog, you might have seen how to…

10 years ago