English - United States

When you set up an online store, how do you count your sales? And how do you know that number’s accurate?

Using Google Analytics, retailers can understand a lot about their sales: you can identify your top sellers or attribute sales to specific channels or ads: Google Analytics also reveals the number of orders placed on your site. This is only feasible if you install a tracking pixel, usually through Google Tag Manager.

Many retailers run into conversion and revenue tracking problems misleading them to think they’re making more sales than they are. When the balance sheet doesn’t match your apparent number of conversions, you know something’s gone wrong somewhere.

On this page, we’ll explain tracking and tags for ecommerce businesses, including tools like Google Analytics and their feature ‘ecommerce tracking’.

When you set up an online store, how do you count your sales? And how do you know that number’s accurate?

Using Google Analytics, retailers can understand a lot about their sales: you can identify your top sellers or attribute sales to specific channels or ads: Google Analytics also reveals the number of orders placed on your site. This is only feasible if you install a tracking pixel, usually through Google Tag Manager.

Many retailers run into conversion and revenue tracking problems misleading them to think they’re making more sales than they are. When the balance sheet doesn’t match your apparent number of conversions, you know something’s gone wrong somewhere.

On this page, we’ll explain tracking and tags for ecommerce businesses, including tools like Google Analytics and their feature ‘ecommerce tracking’.

Why is tracking important for ecommerce businesses?

Your shopping cart plug-in feature isn’t always 100% accurate, depending on how tracking pixels are installed on your website. 

For instance, sometimes tracking pixels are triggered repeatedly when a user navigates away from the checkout and back again, or if they refresh the page. 

This could be scored as several conversions when only one may actually occur, meaning results may be over-inflated.

Similarly, if you don’t use unique checkout links, you may be recording more conversions than real sales. Ecommerce website providers offer guides to set these up, or if you use a custom-built site, you may wish to speak to your developer about setting up unique checkout links.

Accurate tracking can clarify your average order value, cart abandonment rate, conversion rate, total revenue and the total number of orders.

What is a tracking pixel?

A tracking pixel (or marketing pixel) is a commonly used name for a snippet of code added to your website. In ecommerce, they’re used for confirming sales and tracking conversions from specific channels or ad campaigns.

What is Google Analytics ecommerce tracking?

Ecommerce tracking is a Google Analytics feature which tracks all activity relating to shopping on your website or mobile app. This activity includes data on marketing campaigns and internal promotion, providing you with revenue, conversion rate, number of transactions, and average order value.

In Google Analytics, ecommerce data is made up of both transaction data and item data.

Transaction data includes details about your sales like:

  • Transaction ID or order ID;
  • Store or business name;
  • Total shipping cost for the individual sale (this may include shipping cost and taxes);
  • Total revenue from the individual sale;
  • The total tax for the individual sale.

Item data includes details about the product sold such as:

  • Transaction ID (this is the same as in transaction data);
  • Product name;
  • Product price;
  • Product SKU;
  • Product category;
  • Product quantity.

Ecommerce tracking must be enabled for each View you want your report to appear in.

Where can I find ecommerce data in Google Analytics?

Once you’ve switched on Enhanced Ecommerce Reporting in Google Analytics, and installed code into your website, you will start seeing your Ecommerce data under Reports > Conversions > Ecommerce.

What is the best way to track conversion rate?

Google Analytics offers ecommerce tracking to record and analyze all your transaction data in one place. Here, you can cross-reference transaction data with user behavior like the number of sessions, bounce rate, and the traffic source.

What are tracking tags for websites?

Tracking tags are code snippets you can add to your website to better understand your users’ behavior or how different landing pages and campaigns drive sales, and alert you to high cart abandonment rates. 

Tracking tags can also be referred to as UTM codes or UTM parameters. UTM stands for urchin tracking module, which makes up unique parts of a URL. 

This UTM is then tracked for views, conversions and bounce rates. Unique UTMs are often made to identify different traffic sources (like email or social media) to determine campaign performance.

What are Google tags?

Google tags help you work with Google’s advertising and measurement products Google Analytics and Google ads, as well as remarketing. Google tags (also known as gtag.js) send event data to your measurement products using a single tag configuration. It supports Google Ads, Campaign Manager, Google Analytics, Display and Video 360, and Search Ads 360.

What is Google Tag Manager?

Google Tag Manager is another free product from Google. It offers you the ability to add and update your own tags for conversion tracking, remarketing, site analytics, and more. 

What is gtag.js?

Gtag.js is a JavaScript-based framework. It enables retailers and advertisers to collect event data from your website and send it to other Google products like Google Ads and Google Analytics where you can see all the data together for easier analysis.

Google describes gtag.js as:

“a single tag you can add to your website to use a variety of Google products and services. Instead of managing multiple tags for different Google product accounts, you can use the Google tag across your entire website and connect the tag to multiple destinations.”

How to set up conversion tracking in Google Analytics

There are two different ways to start tracking conversions in Google Analytics. You can use Google Tag Manager or you can add tracking tags to your website HTML.

How do I install Google Analytics code with Google Tag Manager

  1. In Google Tag Manager, click Create Tag and select Google Analytics.
  2. Select Universal Analytics
  3. Give your tag a name. Provide your Google Analytics property ID.
  4. Next, you can choose the Track type.
  5. Choose triggers to fire the tracker on each page of your website.

How do I add tracking tags to my website?

To install a tracking code, you must first access your tracking ID, found in your Google Analytics account.
Follow these steps to find your tracking ID for Google Analytics:

  1. Log in to your Google Analytics account.
  2. Click on Admin at the bottom left-hand side of the page.
  3. Select an account from the dropdown menu in the left column called Account.
  4. From the middle column, Property, select a property from the dropdown menu.
  5. From the Property column, click Tracking info and then Tracking Code.
  6. At the top of the page, under Tracking ID, you can find your tracking code. It begins with UA. 

Next, you need your tracking code snippet, known as the Global Site Tag (gtag.js), which can be found on the same page.

Copy the gtag.js: it starts with <!-- Global Site Tag (gtag.js) - Google Analytics –> and ends with </script>

Make sure to replace GA_TRACKING_ID with the tracking ID you found first.

Then, you’ll need to paste this code into the <head> tag of each page you’d like to track in Google Analytics. 

Should I use gtag.js or Google Tag Manager?

Use Google Tag Manager if you need:

  • The ability to deploy and modify both Google and 3rd party tags
  • The ability to deploy and modify tags for both web and mobile apps
  • The ability to deploy and modify tags on the fly from a web interface
  • Collaboration and versioning capabilities.

Use gtag.js if you can't use Tag Manager, or if the following capabilities are important to you:

  • The ability to install tags directly on your site, without the ramp-up time of setting up a tag management system;
  • The ability to work with your tags directly in JavaScript without being required to work with a separate interface.

Can I still add gtag.js in Google Analytics 4?

Gtag.js is still available for Google Analytics 4 and continues to work in the same way.

GA4 ecommerce tracking

As of July 2023, Universal Analytics is no more, and Google Analytics 4 (GA4) will have taken its place. GA4 will enable retailers to measure different kinds of data from iOS apps, Android apps, and Web. 

Automation and machine learning will permit retailers to follow their customer journeys across their websites and uncover new data insights.

Learn more about using ecommerce tracking with Google Analytics 4

How do I verify Google conversion tracking?

Whether you've just set up a new conversion action and added the tracking tag to your website, or you're just looking to confirm an existing conversion action is working, you can check its tracking status from the Conversions page in your Google Ads account. To track status, follow these steps:

  1. In your Google Ads account, click the Goals icon Goals Icon
  2. Click the Conversions drop down in the section menu
  3. Click Summary
  4. In the conversion actions table, find the conversion action you want to check in the "Name" column, then look at the "Status" column in that same row.

Enhanced ecommerce tracking

Universal Analytics (UA) also offers Enhanced Ecommerce. This enables data on product impressions, promotions and sales to be sent with any of your Google Analytics pageviews and events.

Google Analytics 4 (GA4) doesn’t have a specific enhanced ecommerce tracking feature. This is because instead of views, GA4 has Data Streams in the account hierarchy. They don’t function exactly the same:

  • Data Streams can behave like different touchpoints between apps and websites in the user’s journey.
  • Views are used to filter and display specific types of data you want to see in the reports.

In UA, to view enhanced ecommerce tracking, properties needed to be selected to be shown in the ‘views’. Whereas in GA4, the data automatically includes enhancing tracking.

Google Ads attribution tracking types

Another type of tracking highly valuable to online retailers is attributing a conversion to a traffic source. In simpler terms, attribution models can help you understand what caused a conversion like paid ads or organic search traffic. These models can show you the paths users take and the various touchpoints with your brand.

As of June 2023, Google Ads and Google Analytics 4 offer two attribution models: data-driven and last-click.

Previously Google also offered the first click, position-based, time decay, and linear models.

The data-driven attribution model

The data-driven model is the most accurate attribution model available, providing retailers with insights into historical ad clicks and conversion data.

It takes the paths of users who don’t convert, and the paths of customers who did and compares them. Among converting paths, the model identifies patterns in interactions with ads and other touchpoints.

The credit is then distributed across each interaction in the path, awarding more credit to touchpoints it found to drive more conversions. From here, retailers can see what parts of their marketing mix are most effective in converting, or best for brand-building exercises.

The last click attribution model

Unlike the complex calculations involved in the data-driven model, the last click model simply attributes credit to the final click by a user in their customer journey. 

Whilst it’s simple to use, it omits information about earlier ad interactions and engagement, where the user may have discovered your product or brand through unbranded search terms.

This model may inaccurately suggest that your sales are simply the result of branded search terms or direct web traffic.

How do you know if your conversion tracking is broken?

Your tracking pixel could be under or over-tracking conversions. So how can you know for sure what’s going on? We put together a short guide to broken conversion tracking to help you diagnose potential issues and identify why what went wrong.

Diagnose broken conversion tracking with our handy guide

More useful guides:

Google Shopping best practices and insights

Follow us on the channels where you are.