Can you please help me with how can i setup Google AdWords tracking code in my Magento installation.
Thanks in advance
1 answer
How To Setup Google Adwords Conversion Tracking On Magento
Setting up Google Adwords Conversion Tracking on your Magento store is relatively easy -- but it’s not a built-in Magento feature, so you’ll have to edit a template file. Here are the 4 simple steps that need to be done:
STEP ONE:
Open this file --> /app/design/frontend/default/yourskinname/template/checkout/success.phtml
STEP TWO:
At the bottom of the file, insert this code:
Code:
<?php $order_details = Mage::getModel(’sales/order’)->loadByIncrementId(Mage::getSingleton(‘checkout/session’)->getLastRealOrderId()); $adwords_saleamt = $order_details->subtotal; ?>
STEP THREE:
Login to your Google Adwords 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:
View Code: JAVASCRIPT
STEP FOUR:
Copy Google’s code and paste it at the very bottom of the page (below the php code from step 2).
BONUS TIP:
There is also a FREE extension available from INCHOO that you can utilize to integrate
Google AdWords Tracking into your Magento based site