How To Setup Google Adwords Conversion Tracking in magento

Today One of  my  project i have added google  adwords. So i want to share this to everyone. this is very simple only two steps

One Step-01:

open this file


then paste this code in the bottom of success.phtml file

 $order_details =  Mage::getModel(‘sales/order’)->loadByIncrementId(Mage::getSingleton(‘checkout/session’)->getLastRealOrderId());
 $adwords_saleamt = $order_details->subtotal;

then login into google account

Under the “Reporting’ tab, click on “Conversions” and follow the steps to get the code that you’ll also need to add to the success.phtml page. It will look something like this:

<!– Google Code for Sale Conversion Page –>
 <script type=”text/javascript”>
 var google_conversion_id = 0987654321;
 var google_conversion_language = “en”;
 var google_conversion_format = “3″;
 var google_conversion_color = “ffffff”;
 var google_conversion_label = “KFKFKFKFKFKF”;
 var google_conversion_value = 0;
 if (<?php echo $adwords_saleamt; ?>) {
 google_conversion_value = <?php echo $adwords_saleamt; ?>;
 <script type=”text/javascript” src=””>
 <div style=”display:inline;”>
 <img height=”1″ width=”1″ style=”border-style:none;” alt=”"  src=”;label=KFKFKFKFKFKF&amp;guid=ON&amp;script=0″/>

now paste this getting code in the bottom of success.phtml page.

that okay and it is finished


for more magento tutorial visit:

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: