Hi,
I'm trying to enable the ecommerce function of google analytics for my v7 websites, and was wondering if there is a documented solution on how to do the 'add item' part of the script in the receipt? ie.
I've searched the forum and this subject seems to be well covered - except the solutions only seem to cover the old code on V7 or the new code on V8/V9. But I didn't find anything on v7 and the new code. Does it not work or did I just not find the right thread?
I'm trying to enable the ecommerce function of google analytics for my v7 websites, and was wondering if there is a documented solution on how to do the 'add item' part of the script in the receipt? ie.
Code:
<script type="text/javascript"> var pageTracker = _gat._getTracker("UA-XXXXX-1"); pageTracker._initData(); pageTracker._trackPageview(); pageTracker._addTrans( "1234", // Order ID "Mountain View", // Affiliation "11.99", // Total "1.29", // Tax "5", // Shipping "San Jose", // City "California", // State "USA" // Country ); pageTracker._addItem( "1234", // Order ID "DD44", // SKU "T-Shirt", // Product Name "Green Medium", // Category "11.99", // Price "1" // Quantity ); pageTracker._trackTrans(); </script>
Comment