romy1103 Posted July 7, 2015 Share Posted July 7, 2015 Hello People! I need your attention to get this solved. Searched everywhere but couldn't found solution to this. Below is the Ecommerce Tracking code for analytics, the below code tracks the dynamic values like product pricing and shows directly in Analytics. My issue here is firstly Can somebody tell me1. Where should I place the below code? (which page) 2. which variables to use to get all the values I need. Any help will be highly appreciated. <html><head><title>Receipt for your clothing purchase from Acme Clothing</title><script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-XXXXX-X']); _gaq.push(['_trackPageview']); _gaq.push(['_addTrans', '1234', // transaction ID - required 'Acme Clothing', // affiliation or store name '11.99', // total - required '1.29', // tax '5', // shipping 'San Jose', // city 'California', // state or province 'USA' // country ]); // add item might be called for every item in the shopping cart // where your ecommerce engine loops through each item in the cart and // prints out _addItem for each _gaq.push(['_addItem', '1234', // transaction ID - required 'DD44', // SKU/code - required 'T-Shirt', // product name 'Green Medium', // category or variation '11.99', // unit price - required '1' // quantity - required ]); _gaq.push(['_trackTrans']); //submits transaction to the Analytics servers (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })();</script></head><body> Thank you for your order. You will receive an email containing all your order details.</body></html> Thanks! Link to comment Share on other sites More sharing options...
gabdara Posted July 7, 2015 Share Posted July 7, 2015 Try using the Google Analytics module from PrestaShop. It will set the tracking code accordingly, all you have to do is to set the Google Analytics Tracking ID. The module is free and can be installed from Back Office > Modules. 1 Link to comment Share on other sites More sharing options...
romy1103 Posted July 7, 2015 Author Share Posted July 7, 2015 Hi Gabdara, Thank you for your response. I already have the tracking id installed. But I want to add the enhanced ecommerce tracking which includes the dynamic value like the item purchased like product name, price etc to appear in Analytics itself. Link to comment Share on other sites More sharing options...
Johntiller Posted July 7, 2015 Share Posted July 7, 2015 Hi Romy, Please go through the Google Analytics account and check for ecommerce settings. If disabled, please enable. Link to comment Share on other sites More sharing options...
romy1103 Posted July 7, 2015 Author Share Posted July 7, 2015 Hi Johntiller Thats already enabled! But the issue is different here. I am a looking for variable to track transaction values Link to comment Share on other sites More sharing options...
gabdara Posted July 7, 2015 Share Posted July 7, 2015 But I want to add the enhanced ecommerce tracking which includes the dynamic value like the item purchased like product name, price etc to appear in Analytics itself. This is already done by the Google Analytics module. From your google analytics account make sure you have enabled Enhanced Ecommerce. Link to comment Share on other sites More sharing options...
Recommended Posts