Google E-Commerce integration guide
Google E-Commerce tracking is an efficient way to track your complete ecommerce transactions with google analytics. By implementing this method you can track your maximum information . With this tutorial you will learn “How to integrate Google E-Commerce Tracking with your website“.In order to integrate you must have your Google Analytics setup and E-commerce tracking should be enabled from there. Below are the steps to Enable E-Commerce tracking from Google Analytics
Step 1: Login to Google Analytics and then click on “Home” tab
Stpe 2: Click on “admin” tab coming on right side
Step 3: From this page select “Profiles ” tab
Step 4: Then select and click on your website profile
Step 5: On the new page click on “profile settings”
Step 6: On this page under “E-Commerce Settings” select the option for “E-Commerce tracking option” selection option “Yes an ecommerce site”
Now Click on save button.
Now add below code to your success file. Below are the example code snippet is recommend by Google E Commerce Tracking .
<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>
Chandra Shekhar
Latest posts by Chandra Shekhar (see all)
- Best practices for micro service design - January 23, 2022
- Spring Boot - January 23, 2022
- Java - January 23, 2022
Recent Comments