Live Chat Software by IXXO |
Knowledgebase: Marketing Tools
How Do I Add the Google Analytics Code into IXXO Cart for Joomla for Conversion Tracking
Posted by Steve Naqvi on 28 October 2009 01:53 AM
|
|
************************************************************************************** THIS CODE SHOULD BE PLACED IN YOUR INDEX.PHP JOOMLA TEMPLATE FILE BEFORE THE </HEAD> (the Joomla templates can be found in the "/templates/" folder. For the default milkyway Joomla template the path to the file would be /templates/rhuk_milkyway/index.php)! MAKE SURE TO CHANGE YOUR ID IN THE CODE: ************************************************************************************** <script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript"> try { var pageTracker = _gat._getTracker("UA-XXXXXXXX-X"); pageTracker._trackPageview(); } catch(err) {}</script> ************************************************************************************** THIS CODE SHOULD BE PLACED IN THE COMPLETED.HTML RIGHT BEFORE THE LAST BLOCKQUOTE! MAKE SURE TO CHANGE YOUR ID IN THE CODE: ************************************************************************************** <script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript"> var pageTracker = _gat._getTracker("UA-XXXXXXXX-X"); pageTracker._initData(); pageTracker._trackPageview(); pageTracker._addTrans( "{$order_id}", // Order ID "{$affiliation}", // Affiliation "{$order_amount}", // Total "{$tax}", // Tax "{$shipping_amount}", // Shipping "{$city}", // City "{$region}", // State "{$country}" // Country ); {foreach from=$items item="item"} pageTracker._addItem( "{$order_id}", // Order ID "{$item.sku}", // SKU "{$item.product_name}", // Product Name "{$item.catalog_name}", // Category "{$item.price}", // Price "{$item.quantity}" // Quantity ); {/foreach} pageTracker._trackTrans(); </script> ************************************************************************************** MAKE SURE TO DELETE THE CONTENTS OF THE COMPILED FOLDER AFTER MODIFYING THE completed.html TEMPLATE! ************************************************************************************** | |
|
Comments (0)