rss
twitter
    Find out what I'm doing, Follow Me :)

Wednesday, January 6, 2010

Pin It

Widgets

Magento - AdWords Conversion Tracking

When you use Google AdWords to receive more traffic, don’t forget to track the traffic. AdWords Conversion Tracking is a free tool to help you understand how many users actually buy products or services from you.

Installing AdWords conversion tracking codes is pretty straightforward.

Open the file /app/design/frontend/your_interface/your_theme/template/checkout/success.phtml.

Find the following code in the file.

<?php echo $this->__(’Your order # is: %s’, $this->getViewOrderUrl(), $this->getOrderId()) ?>.
<?php else :?>
<?php echo $this->__(’Your order # is: %s’, $this->getOrderId()) ?>.
<?php endif;?>

Add the following code under the above code. If your success.phtml is customized, add it at the end of the file. In most cases, it should work.

<?php
//-------------------------------------------
// ADWORDS CONVERSION TRACKING
//-------------------------------------------
$order_details = Mage::getModel('sales/order')->loadByIncrementId(Mage::getSingleton('checkout/session')->getLastRealOrderId());
$adwords_saleamt = $order_details->subtotal;
?>
<!-- Google Code for Purchase/Sale Conversion Page -->
<script language="JavaScript" type="text/javascript">
<!--
var google_conversion_id = ---YOUR_GOOGLE_CONVERSION_ID---;
var google_conversion_language = "en";
var google_conversion_format = "1";
var google_conversion_color = "ffffff";
var google_conversion_label = "purchase";
var google_conversion_value = "<?php echo $adwords_saleamt; ?>";
//-->
</script>
<script language="JavaScript" src="http://www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
<img height="1" width="1" border="0" src="http://www.googleadservices.com/pagead/conversion/---YOUR_GOOGLE_CONVERSION_ID---/?label=purchase&guid=ON&script=0"/>
</noscript>

To look at the conversion data from Google AdWords, generate reports as follows:

Reports -> Create Report -> ... ->
Add or Remove Columns from Advanced Settings (Optional) -> Choose conversion related columns.





















This code is to track conversion rate for regular sales.

Source : http://www.free-ebusinesshelp.com/magento/magento-adwords-conversion-tracking.html

No comments:

Post a Comment