Posts Tagged ‘Conversion Tracking’

How To Setup Conversion Tracking In Magento

December 2nd, 2009

3rd Party Conversion Tracking

Magento Commerce has the ability to track eCommerce sale with Google Analytics out of the box (more on that in a future post). Something that a lot of merchants struggle with is how to set up conversion tracking for other tracking software or comparison shopping engines.

ConversionTracking

How To

Here is an easy hack to track conversions for Shopzilla, PriceGrabber and the likes:

Open the file: app\design\frontend\XXXX\XXXX\template\checkout\success.phtml

At the end of the file, add the following code, this will create two variables with the order number and the order total:

<?php
	//Get Order Number & Order Total
	$order = Mage::getModel('sales/order')->loadByIncrementId(Mage::getSingleton('checkout/session')->getLastRealOrderId());
	$amount = number_format($order->getGrandTotal(),2);
?>

After the above code snippet, copy and paste the tracking code from the third party analytics software of comparison shopping engine. Insert the following variable where they suggest placing the order ID and the order total:

<?php echo $amount; ?> // Order Total
<?php echo $this->getOrderId() ?> // Order Number

Here is a code example for the Shopzilla conversion tracking tool:

<script language="javascript">
	var mid            = 'XXXXX'; // Your Shopzilla Merchant ID
	var cust_type      = '';
	var order_value    = '<?php echo $amount; ?>'; // Order Amount
	var order_id       = '<?php echo $this->getOrderId() ?>'; //Order Number
	var units_ordered  = '';
</script>
<script language="javascript" src="https://www.shopzilla.com/css/roi_tracker.js"></script>
<script language="JavaScript" src="https://eval.bizrate.com/js/pos_193511.js" type="text/javascript"></script>

Image Credit: Search Engine Journal

Track Goals In Google AdWords With Google Analytics Tracking Pixel

August 20th, 2009

As you probably know, you can link your Google Analytics account to your Google AdWords account. Doing this allows you to better track your campaign performance in Analytics with a whole slew of options that are not available in AdWords.

What I did not know, until now, was that you can link your Google Analytics Goals to Google AdWords. What this means is that you don’t need to have two tracking pixels on your order confirmation page. Just install the Google Analytics tracking pixel and it will feed Google AdWords the ecommerce and conversion data from Analytics.

Link Google Analytics & Google AdWords Goal Conversions

Link Google Analytics & Google AdWords Goal Conversions

Did you know you can do this?