Google Analytics

Set Up Ecommerce Tracking in Google Analytics

4 · by Dennis Moons · Updated on 15 April 2015

The question in this episode: How to setup ecommerce tracking in Google Analytics?

Show links:

Got a question of your own? Let me know in the comments!

If you’d rather read, you can find a full transcript of this episode below.

Video transcript

Hi, and welcome to Ask Store Growers, the show where we answer all of your e-commerce questions. Today’s question comes from David in Belgium, and he asks: “How can I set up ecommerce tracking on my website?”

To start off, let’s quickly discuss the benefits of enabling ecommerce tracking in Google Analytics. Basically, it will give you more insights into your sales, and it will allow you to answer questions like, “which advertising campaign sends me the most valuable customers?” Or “how much [in] sales did that promo email from last week generate?”

To be able to answer these questions, we’re going to need some extra data. And, out of the box, Google Analytics doesn’t come with conversion or ecommerce tracking enabled. So, next to our normal Google Analytics tracking code, we’re going to need to make some changes to the Google Analytics code to send transactional data every time an order takes place. We’ll send through things like which products were bought; how many of them and at what price; which product categories do they belong to, etc.

For example, on Shopify, it’s super easy: just click two buttons, and yo’ve got everything up and running. On WooCommerce; you simply download a plugin. If you’re not using a platform that makes it easy to set up e-commerce tracking, you will need to go through some extra steps. Basically you will need to add custom code to the order confirmation page. If you’re not that technically skilled, you will probably need a developer to take care of this. But let’s take a look at what’s going on behind the scenes to understand it better.

So, what kind of data do we actually need to send back to Google Analytics? With our own custom code, or with an integration on a platform like Shopify? Well, it might look really complicated, but actually is pretty easy.

First, we’re gonna give it a unique order ID, so we — and Google Analytics as well — can identify which order it is. We’re gonna mention our store, total price, taxes, shipping, and then some geographic information. Then, for every product in the order, we’re going to create something similar. We’re going to say which order it belongs to; what our SKU code is; what the product name is; what category or variation it is — the variation could be, if you’re selling a sweater, for example, it could be a green medium sweater; again, we say the unit price; and then the quantity.

So, if you’ve configured everything well, normally your shopping cart should be sending transactional data back to Google Analytics. Now all that’s left for us to do is to enable the e-commerce tracking in Google Analytics. That can be done on the view level — that means the right column there — click “E-commerce settings”, and that should take you to a menu where you can enable it. Then, if everything’s working properly, you should be seeing e-commerce data in your Google Analytics. Be aware that it will only track orders made from this point. So, if you set it up today, check back in a couple of days to see if the data are coming in correctly.

You will be able to see metrics like e-commerce conversion rate; number of transactions; total revenue; average order value; unique purchases; the quantity of products that have been ordered; which products are performing well; what is the time to purchase, etc. There’s a lot of valuable information in these reports that you now have access to.

That is all for this week. Have you got your own small or big e-commerce challenge? Let us know in the comments, and perhaps you’ll be featured in one of the future episodes. You can also check the show notes, where we provide more links to make setting up this e-commerce tracking easier.

Dennis Moons

Dennis Moons is the founder and lead instructor at Store Growers.

He's a Google Ads expert with over 12 years of experience in running Google Ads campaigns.

During this time he has managed more than $5 million in ad spend and worked with clients ranging from small businesses to global brands. His goal is to provide advice that allows you to compete effectively in Google Ads.

Follow him on Twitter or LinkedIn.


4 responses on "Set Up Ecommerce Tracking in Google Analytics"

  1. […] sure you can track what happens to visitors on your store: what pages they visit, what they buy and how much they spend. That way you can make tweaks to your […]

  2. […] most value from it, there is one additional piece of tracking code you need to add to your site: e-commerce tracking for Google Analytics. This will import all your sales data into Google Analytics: number of transactions, products, […]

  3. […] can also go deeper down to the product level. But to do that you’ll need need solid tracking in […]

  4. […] you’re using Google Analytics for ecommerce, the actual checkout often is on another domain (, but those pages are loading […]

Leave a Reply

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