How to Set Up Ecommerce Tracking in Google Analytics

By Tinuiti Team

Ecommerce analytics is essential to understanding your traffic sources, which pages and products customers engage with, and ultimately what drives conversions on your website.

You can access Google Analytics’ robust set of reports to see which products sell well, and the products which are best suited for your consumers. You can see figures like revenue per transaction and the number of products per transaction, helping you to make informed decisions about sales, coupons, and shipping costs.

Here’s a quick guide on why every retail website business should leverage Google Analytics, how to set up ecommerce tracking for your website, and how to use the variety of reports to your advantage.

“Ecommerce analytics is essential, not only to understand how your products are selling but also critically to analyze the path and variables that lead to successful conversions.”

tom clinton


— Tom Clinton, Analytics Engineering Manager at Tinuiti

1. Why You Need Ecommerce Tracking


Data is one of the greatest advantages that ecommerce businesses have over brick-and-mortar storefronts.

While a brief interaction with a customer in a brick-and-mortar store might provide some information, a brief online interaction with your ecommerce store can speak volumes about your digital operations.  


ecommerce analytics view


The ability to track where your customers come from, what parts of your website they interact with (and for how long), and what they do before and after a purchase is critical information that can be used to improve the user experience and drive more revenue.

Google Analytics represents one of the most robust offerings for ecommerce tracking that can help businesses track sales data and correlate that data with website behaviors such as traffic sources, landing pages visited, time on site, and bounce rates.

“Every brand needs to take advantage of Google Analytics, not just as a source of lead data but also as a place to keep tabs on how well you’re owning your presence on Google’s search engine. This is especially important if you’re investing in a content program to build organic terms related to your products.”

leanna zeibak

– Leanna Zeibak, Growth Marketing Manager at Tinuiti


Understanding where on your website customers spent (and didn’t spend) time before and after making a purchase is invaluable information that can be leveraged to improve the user experience and sales revenue.

The best part?

Google Analytics is completely free — anyone can install it by adding a small tracking code to each page of their website.


2. How to Set Up Google Analytics Ecommerce Tracking


Installing Google Analytics into your website for ecommerce tracking is quite easy.

All it takes is your Google account (we don’t recommend using a personal one) and some time to set up tracking code onto each page of your website.

“Enhanced Ecommerce offers flexibility that truly fits the vast majority of websites. It is basic to implement out of the box, with standard performance metrics and dimensions, but offers great extendability to customize for most businesses,” says Clinton.


1. Create an Analytics account for your ecommerce website


Head over to Google Analytics to get started.

Set up a new account, if you need to. While setting up your account, you will be asked to enter your website URL. Place your ecommerce site here.


set up google analytics account for ecommerce


After finishing your data settings, you’ll be prompted to obtain your Tracking ID. Make sure to click the button to get your Tracking ID. 


set up analytics tracking id


2. Install your Analytics tracking code into your ecommerce website


After securing your Tracking ID, you will need to copy some code.

analytics tracking code example
It will look similar to this. Note that this code is actually from Google’s own online merchandise store.


 If you need some inspiration, checking out the Google Analytics ecommerce demo account will help you get familiar with the data you can take advantage of.

This code will be inserted into the <head> tags on your websites. Make sure to put this on all pages of your website that you would like to track. Many different CMS (such as WordPress) have plugins that can do this automatically.


3. Enable ecommerce analytics tracking


Now that your Analytics tracking code is installed onto your ecommerce website, you must enable ecommerce settings.

Navigate to Admin > View Settings > Ecommerce Settings. In this menu, enable “Ecommerce Settings” and “Enhanced Ecommerce Reporting.”


enable ecommerce tracking in analytics


4. Start measuring Enhanced Ecommerce Data


If you want to measure purchases and shopping behaviors on site, you will need to get a bit deeper into the platform with Enhanced Ecommerce Data.

You will need to configure a set of Javascript codes in order to access these deeper analytics. Named gtag.js, these scripts will allow you to send impression data, product data, promotion data, and action data to Google Analytics.


enhanced ecommerce analytics shopping cart behaviors


If you find yourself confused or overwhelmed by the amount of information needed to get things started, don’t worry. There is an entire Google troubleshooter dedicated to making sure your ecommerce site runs smoothly with Analytics. 

You can also hire a developer who can easily get your ecommerce site up and running with Google Analytics’ ecommerce offerings. Additionally, you can ask your shopping cart vendor or ecommerce sales platform if they have any resources for integrating with Google Analytics.


3. Setting Goals and Measure your Ecommerce Store in Google Analytics


After you are connected to Google Analytics, it’s time to establish which ecommerce goals and behaviors you want to track.

There are many different goals that you can set within Analytics, so things can get complicated.

“Goals don’t have to be directly tied to a sale. Any action that a customer takes can be made into a goal, many of which lead to a conversion rather than are the conversion,” explains Clinton.

“For example, an email newsletter signup can signal intent, where you can then use that goal in connected AdWords accounts to segment and target, increasing probability of a transaction in a later session”

Here are a few examples of goals you can set for your ecommerce website:


How to set up ecommerce analytics goals


1. Select the Admin panel from the pinwheel in the bottom left
2. Select “Goals” from the right column
3. Fill out Goal description and Goal details


setting up ecommerce goals in analytics


4. Once your tracking code is installed and goals are established, it’s time to access the robust reporting of Google Analytics to gain actionable insight into what’s occurring on your website.

ecommerce analytics panel


Analytics ecommerce reports


There are specific reports available once you have connected Google Analytics to your ecommerce website. You can access these by navigating to Reports > Conversions > Ecommerce.


Ecommerce Overview


This is your overview of high-level data: revenue, ecommerce conversion rates, transactions, average order value, marketing campaigns, and top sellers.


ecommerce overview


Once in this data, you will be able to see multiple reports at a glance, including: 







Want to learn more about Google Analytics reports available for ecommerce? Take a look here


Shopping Behavior


Your report for understanding behavior at different stages of the buyer funnel. Ecommerce Conversion Rate, Transactions, Average Order Value and other metrics.


shopping behavior ecommerce analytics



Checkout Behavior


Report for understanding how users navigate your checkout process on a step-by-step basis.


enhanced ecommerce analytics shopping cart behaviors


Product Performance


Google’s Product Performance report allows you to understand how your products are performing in terms of shopping behaviors and sales. Revenue, Purchases, Quantity, Average Price, and Average QTY by SKU and Category.


Sales Performance


The Sales Performance report allows you to evaluate your ecommerce sales by transaction and date.


Product List Performance


Product Lists are grouping of products based on tags you’ve set for your products across your website. These can include catalog pages, category pages, cross-sells, up-sells, related, and more.


4. Best Practices When Using Google Analytics for Ecommerce


Here are some key points to keep in mind when you are analyzing the data for the first time.

“It is tempting to put basic Google Analytics Ecommerce tracking on your site and call it a day. However this data should be validated and any deltas understood,” says Clinton.

“More importantly, it’s critical to ensure that Google Analytics answers business questions and delivers meaningful data. Tinuiti can provide strategic direction and insight custom to your specific application to get the most out of Google Analytics.”


Discrepancies between ecommerce sales data and Google Analytics data


Though most major sites process and register ecommerce data like canceled orders, promo codes, unfulfilled orders, or refunds, Google Analytics does not.

Due to fluctuations in ordering, cart abandonment, or other ecommerce factors, you may see interesting disparities between the two. When in doubt, trust your shopping cart. It likely contains the most accurate purchasing data for your records.


Reverse your test orders


Make sure whenever you run a test, that you reverse it.

Due to the possibility of multiple tests performed while you are setting up your account–and during your business operations — you might see inflated numbers. Whether you or your developer, one of you should track all tests in order to cross-check them with other actual orders.


Be wary of duplicate transactions


These can occur when ecommerce tracking codes (like the ones above) process without placing new orders.

These instances can actually (you guessed it) skew your ecommerce data. If you want more help on getting as much as possible out of the Google Analytics platform, start today with their free course, and check out more of our in-depth articles on Google Analytics.


If you want more help on getting the most out of your ecommerce tracking with Analytics, you can check out Google’s support page here.

You Might Be Interested In

*By submitting your Email Address, you are agreeing to all conditions of our Privacy Policy.