E-commerce Businesses: Here's a crash course on how to use the Google Analytics Ecommerce Tracking feature to Hit 7 Figures in Revenue

galcoguy

New member
Warning: this is a huge post at over 3000 words. Let me know if you find it helpful!

It seems these days that everyone is running their own ecommerce shop. You can set up your store, find products to sell and start running ads all within an afternoon. Easy right? Maybe.

However, while starting a store might be easier than ever, growing an ecommerce shop beyond 7 figures in revenue isn't.

That is a frustrating, tiring and never ending fight. To do this, you need to figure out what works AND what you’re able to scale through many, many experiments.

Luckily, there’s a “secret weapon” that you can bring to this fight to give you an edge. The name of this secret weapon? Google Analytics.

You’re likely familiar with how Google Analytics can help you understand your marketing traffic but it can do much more than that.

You can actually track all of your ecommerce metrics like total orders, average order value and ecommerce conversion rate all within Google Analytics. You could even track what users are doing before they purchase something like how many of them view a product but don’t add it to their carts.

This gives you a 360 view of your ecommerce business alongside your marketing data. From here, you can start digging to find the best customer segments that will let you grow to 7 figures and beyond.

In this post, I want to give you a comprehensive overview of “ecommerce tracking” in Google Analytics, show you how you could use all of this data to grow your revenue and help your company get started even if you have no analytics experience.

Why You Should Use Google Analytics to Track Your Ecommerce Data​


This is the question that always comes up when I tell companies to send their ecommerce data to Google Analytics.

Most of these companies are already getting high-level metrics from their ecommerce software (Shopify, Woocommerce, etc) such as total orders and average order value so why should they go through all the trouble to get Google Analytics setup?

The answer: segmentation.

As the saying goes:

“Averages Lie But Segments Don’t” - Avinash Kaushik

A metric like average order value is useful but if you want to improve it, you need the ability to dig deeper (i.e. segment) in what is behind that metric. Let me give you an example of what I mean.

Let’s imagine that your average order value is $50. This is the average from all the orders within a specific time period.

How would you go about increasing this metric to $60?

Perhaps you’re thinking in tactics already. Upselling customers in more locations, offering discounted add-on items, etc but these tactics could be even more powerful if you offered them to the right customer segments.

To find the right customer segments, you need data.

While the average order value is $50, some orders will be worth $20 while other orders will be worth $100. This second group is the one that becomes interesting to us.

What do people buy in an order of $100? $150? $200?

You can then use this information to craft a tactic that will help you increase the average order value. Instead of your tactics being random, you’ll be able to focus on the customers who are already purchasing more than the average.

This is what good analytics can tell you. It can show you the different segments that you should focus on.

I had a client once that contacted me to help them clean up their Google Analytics data. Their data had serious issues which explain why they weren’t doing anything with it. They were spending serious money on advertising ($500,000+ per month) and yet, they had no visibility into the different customer segments that were buying their products.

They would simply look at high-level numbers like “this is how much we spent” and “this is how much we made” and as long as things look positive, everything was good. A part of me was impressed with this simple but dangerous approach. However, any wrong move or change could cost them a lot of money (as it did on several occasions).

We ended up sending all of their ecommerce data to Google Analytics which instantly let them see exactly what marketing channels were driving sales.

They were also able to see the performance of their landing pages and figure out how to improve them to get more users to checkout.

They used all of these insights to double their monthly revenue from $1 million to $2 million within 30 days, a 104.27% improvement.

Common Questions that Google Analytics Can Help You Answer​


Once you got your data inside Google Analytics, we can now combine it with your marketing data to ask effective analytics questions such as:
  • What are the marketing channels driving the most orders?
  • Which of my users are purchasing my products? e.g. returning vs new, male vs female, etc
  • What is the conversion rate of my site? Can I be alerted if it drops?
  • Where are users getting stuck before purchasing (funnel analysis)?
  • Are users adding my products to the cart? Are they removing any products?
I’ll also walk you through the most useful reports in a section down below.

What’s the Difference Between Standard and Enhanced Ecommerce Tracking?​


Google Analytics offers two types of ecommerce tracking: standard and enhanced.

Standard will give you basic data like the number of orders, conversion rate, average order value, and most popular products. You’ll be able to combine this data with the rest of the Google Analytics data like marketing channels, location, demographics, etc.

Standard is great for any ecommerce store that is just getting started with Google Analytics. It will give you most of the reports that matter in the beginning and it will let you segment that data to find useful insights.

Enhanced gives you everything that Standard does but they also let you track your checkout funnel, when users add or remove products from their cart, when users view a product (impressions), etc. Enhanced gives you a more granular look at how your users are interacting with your products BEFORE they complete a purchase.

You can also always upgrade from Standard to Enhanced later on in the future. I would recommend that you start with Standard and get familiar with the data before diving into Enhanced.

One thing to remember is that you can’t use both of them at the same time. That is, you can’t send basic order data using the Standard Javascript library and then send the checkout funnel data using the Enhanced Javascript library.

I have personally made this mistake in the past. We instantly saw issues like orders being dropped, the conversion rate tanked and overall, the data integrity suffered. It’s a mistake that I won’t be making again.

So if you’re using Standard and you want to get some of the reports that Enhanced gives you, you need to convert ALL of your Standard code (transactions, transaction items, etc) into the equivalent Enhanced format.

How Do I Set Up Ecommerce Tracking? Do I Need a Developer?​


Setting up ecommerce tracking will depend on your ecommerce software. If you’re on a popular platform like Shopify, then you likely only need to enable a few settings and your ecommerce software will do the rest.

If you’re running on custom software then you will need a developer to help you implement all this. There are two options here which I will tackle below.

For those on popular ecommerce platforms, here are some links that will help you get this setup:
If you don’t see your software listed above, try googling “YOUR SOFTWARE NAME google analytics ecommerce tracking”.

For those on custom software, you have two options. Option 1 is done using the analytics.js Javascript library and option 2 is done through Google Tag Manager.

I’ll provide you with instructions for both but my recommendation is that you use Google Tag Manager to send ecommerce data from your website. The setup might take a little longer but it will be easier to maintain and upgrade later on.

Instructions for sending ecommerce data through Google Tag Manager:

1) All of the transaction information needs to be passed on to the dataLayer. This is a Javascript object that Google Tag Manager is able to access.

2) You then need to create a tag (Universal Analytics) using the “Transaction” type. This tag will automatically look for the info from the dataLayer.

3) Finally, you need to figure out how to trigger the “Transaction” tag. The easiest way is to fire it on the thank you page after a user purchases something. You then need to make sure that they dataLayer information from step 1 is loaded during this page.

Instructions for sending ecommerce data through Javascript (analytics.js):

This option requires 3 steps which look like this:

1) You start by loading the loading the ecommerce plugin using this command:

Code:
ga('require', 'ecommerce');

Make sure to fire this command after the Google Analytics tracker has loaded so after this line:

Code:
ga('create', 'UA-XXXXXXXX-1', 'auto');

2) Now that we loaded the ecommerce plugin, we create a transaction. A transaction is an order for a specific user. Users can have multiple transactions i.e. multiple orders. The code looks like this:

Code:
ga('ecommerce:addTransaction', {
'id': '1234', // Transaction ID. Required.
'affiliation': 'Acme Clothing', // Affiliation or store name.
'revenue': '11.99', // Grand Total.
'shipping': '5', // Shipping.
'tax': '1.29' // Tax.
});

Note that each transaction needs a unique ID. This usually comes from your shopping cart or your database.

3) Once we have our transaction, we can add all the items that are found in this order. We can do that by using this code:

Code:
ga('ecommerce:addItem', {
'id': '1234', // Transaction ID. Required.
'name': 'Fluffy Pink Bunnies', // Product name. Required.
'sku': 'DD23444', // SKU/code.
'category': 'Party Toys', // Category or variation.
'price': '11.99', // Unit price.
'quantity': '1' // Quantity.
});

The ID here matches the ID of the transaction we created since this is what Google Analytics uses to keep track of things. You would fire this code for every item inside an order but with different information for each item.

4) Once you are done building your transaction and adding items, we can send it to Google Analytics. We do that by firing this command:

Code:
ga('ecommerce:send');

Ideally, you should fire these commands after a user successfully completes their purchase.

Enabling ecommerce tracking in your Google Analytics View

You need to enable ecommerce tracking on specific views. You start by switching the status to ON and then clicking “Next Step”.

You will see a few options like “Related Products” and funnel steps. This is part of the Enhanced Ecommerce within Google Analytics which requires extra setup. If you use a popular shopping cart, this might already be setup for you.

What Reports Should I Be Looking at as an Ecommerce Store?​


This is the fun part. We got some data and now we want to start digging into the right reports. I’ll cover the 5 most useful reports that you need to be using from day 1. I also made note if that report is available through Standard or Enhanced Ecommerce.

[h4]Basic Ecommerce Overview (Standard and Enhanced)[/h4]

This is report will give you all the high-level metrics such as the number of transactions, average order value, total revenue and ecommerce conversion rate.

You can then compare two metrics in the trend line chart. I find it useful to compare revenue and ecommerce conversion rate or ecommerce conversion rate and transactions. This lets me know if any increase in revenue is due to a better conversion rate (good) or simply more traffic (more transactions = more revenue).

[h4]Product Performance (Standard and Enhanced)[/h4]

These reports lets you see how individual products perform and what are your most popular products by revenue, sales, etc.

In this report, you should be looking for items that are popular or starting to become popular. While your top 5 products might always be the same, products 6-10 might be always changing. You could create marketing campaigns around these kinds of products and get more users.

[h4]Sales Performance (Standard and Enhanced)[/h4]

This report shows you individual sales/transactions and it appears to be a straightforward report.

The power of this report comes from segmentation through the “Secondary Dimension” feature. You could add other metrics and dimensions like country or device category (mobile, tablet or desktop) to find popular segments for orders.

[h4]Checkout Behavior (Enhanced Only)[/h4]

This is your classic funnel report which we saw earlier in this post. We can see where users are dropping off in our funnels and what areas we need to fix.

By default, you’re seeing all of your users but you can drill down by using the “Advanced Segments” feature of Google Analytics. You could then isolate a specific customer segment like mobile users, female users or even complex segments like users from Texas who are using Chrome and are between 45-55 years old.

[h4]Marketing Channels & Ecommerce Transactions (Standard and Enhanced)[/h4]

This report shows your traffic sources against ecommerce transactions. Which traffic source is converting at the highest rate? Which traffic source is making you the most money? You could combine this report to optimize your Facebook Ads for example

Common Problems with Ecommerce Tracking and How to Fix Them​


It’s common to see errors as companies try to track their ecommerce data inside Google Analytics. Let’s look at some of the most common ones and how to fix them.

[h4]Discrepancies in Data Between Google Analytics and Your Ecommerce Software[/h4]

Minor discrepancies in data between Google Analytics and your ecommerce software is fine. How minor? 5% or less. If you’re seeing more than 5%, then you got some technical issues that need to be addressed. Moving your analytics tracking to Google Tag Manager will help you solve a lot of issues.

[h4]What About Refund Data?[/h4]

You can actually send refund data to Google Analytics from your backend. As long as you use the same transaction ID (which is your order ID), Google Analytics will be able to store it. Once again, Tag Manager should make this pretty easy (are you seeing a pattern yet?).

[h4]Watch Out for Timezones[/h4]

I hate time zones. I have lost track of the number of clients who looked at data inside Google Analytics and then compared it to their ecommerce software and say “Google Analytics is inaccurate. What’s wrong?”.

In a lot of cases, time zones were the issue. You can switch that time zone that Google Analytics uses but your ecommerce software might be stuck in UTC (Universal Timezone). Keep that in mind when you’re comparing two data sources and get them on the same time zone if possible.

Hope that helps!

P.S. I also recorded 8 videos that walk you through how to get this setup and the 5 reports that you should be looking at. You can get those videos from this blog post.
 
@mmbministries you can print this on a white paper, then take your brain and wrape it with it, then put it in the freezer for about 1hour, then take it out and remove the paper, that way the words should stick to your brain,
LOL..
 
@galcoguy This is really solid info. Two questions...

How do you handle funnel reports when most of the relevant parts of it being tracked are event-based? Last I checked goal funnels can't use event-based steps (unsure if that is the same with the Ecomm funnel report).

Also, how do you typically approach attribution? For context, I'm pretty deep on that stuff so feel free to get nerdy with your answer. I'm also on a SaaS account, not ecommerce, and there is a trial and subscription. I feel there isn't great support for that sort of model in GA today from an attribution standpoint when the bulk of the interesting reports in GA operate on a last non-direct touch model. I did see there is a new LTV beta I haven't played with yet, so I'll need to check that out at some point.
 
@aspiringillustrator Good questions.

1) GA has notoriously bad funnel reports but you can set up a really solid funnel through the ecommerce tracking functionality. You track the different steps in your funnel using events (special ones) and the report looks like this.

2) I don't that much work on multi-channel attribution actually but GA gives you some good reports around that (more info here). That will let you analyze your marketing data using other models (linear, first click, time decay, etc). This is a really solid article by Avinash Kaushik on the different models available in GA.

Second, you should consider firing an event for some of the actions that happen after signup. So you likely have a goal setup for when users signup for your product but you should add events when users onboard, when they are "activated", and even when they become paying customers.

You can then set up these events as goals in GA AND you will be able to run your multi channel attribution reports against these goals. That will let you see not just what channels are driving signups but what channels are driving onboarded users, activated users, paid users, etc.

Hope that helps!
 
Back
Top