How to Set Up Ecommerce Tracking in Google Analytics

What is Ecommerce

Ecommerce is the overview of your website transactions. With the help of eCommerce tracking we can easily find which product is sold. How much transactions has been done. Total number of unique purchase.  Avg order value. With the help of ecommerce we can easily find the top source which are generated revenue. Google analytics collect two types of data here, Transaction data and item data.With the help of transaction data we can analyze revenue of the website. And with the help of product data we can analyze the products. Which product is most sold. Which product is not sold. So with the help of this data we can improve our products

Steps for set up eCommerce tracking

Step 1

First login to your Google analytics account. Enable the eCommerce tracking for your website. You will see the following image on your Google analytics account.


For enabling go to the Admin < Ecommerce setting < Enable eCommerce tracking.

After enable your eCommerce tracking. You will see the following picture on your eCommerce tab.


Note- We have to make sure that our Google analytics code on our receipt page.

Step 2

Below is the code for the eCommerce tracking. Our server code must inject transaction information into the GA JavaScript before sending the receipt page back to the browser.

< script type="text/javascript" >
"order-id", // required
"affiliate or store name",
"order-id", // required
"product name",
"product category",
"unit price", // required
"quantity" //required
< /script >

For code related guide you can check following

In the above code we have three parts, Add transaction, Add item and the third part is track transactions. The above java script can appear on your receipt page. But we have to make sure that it appears after the main Google analytics code.

Why we need Ecommerce tracking

Ecommerce tracking helps us to find the sales insight. With the help of eCommerce tracking we can find the total transactions with products detail. We can find our website most popular products according to the sale of the product. We can also find which platform is helping us for sales. We can target that platform to produce more sales.



Leave a Reply

Your email address will not be published. Required fields are marked *

2 × 3 =

Time limit is exhausted. Please reload CAPTCHA.