How to Set Up eCommerce Tracking in Google Analytics: 7 Tips from Experts

Author's avatar Analytics UPDATED Dec 16, 2022 PUBLISHED Mar 9, 2022 9 minutes read

Table of contents

    Peter Caputa

    To see what Databox can do for you, including how it helps you track and visualize your performance data in real-time, check out our home page. Click here.

    One of the biggest advantages eCommerce has over brick-and-mortar stores is the ability to collect rich data. When we analyze data, we discover not only what sells, but factors that influence each sale, and the paths buyers take leading up to a sale. And Google Analytics eCommerce tracking offers a completely free yet robust way to gather that data.

    Google Analytics eCommerce tracking feature allows you to learn where customers come from and what they do on your website. Based on that data, you can iterate to improve the user experience and increase sales.

    In this article, you’ll learn:

    ga_ecommerce_dashboard_template_databox

    Let’s dig in!

    What is Google Analytics Ecommerce Tracking?

    Ecommerce Tracking is a Google Analytics (GA) feature that allows you to monitor user behavior and transaction data for your online store.

    Some things you can track with GA’s eCommerce tracking feature include:

    • Product sales
    • Revenue
    • Conversion rates
    • Transactions
    • Average order value
    • Shipping costs
    • Time to purchase

    From those metrics, you can gain insights into:

    • Which products sell well, so you can promote them better
    • The number of products per transaction, so you can offer incentives like free shipping with low products per transaction sales (if appropriate)
    • How long it takes for customers to buy, so you can prioritize a UX that helps them buy faster

    You’ll find the standard eCommerce reports at “Conversions” > “eCommerce”. But until you’ve set up eCommerce tracking, this is what you’ll see.

    google analytics ecommerce report example

    How Do You Set Up Google Analytics Ecommerce Tracking?

    To set up eCommerce tracking, you need to enable tracking for each view where you want eCommerce data. You’ll add a code to your site as you did with your Google Analytics tracking ID too. Here’s how:

    Step 1: Enable eCommerce for a view

    On the Google Analytics homepage, click “admin” and select a view.

    screenshot showing how to turn on google analytics ecommerce tracking

    Next, click on “Ecommerce Settings” and set “Enable Ecommerce” to “ON” then save.

    screenshot showing how to turn on google analytics ecommerce tracking

    You could also enable enhanced eCommerce reporting to get more advanced data from enhanced eCommerce tracking.

    Step 2: Add eCommerce tracking code to your website

    You’ve turned on eCommerce tracking, but without a tracking code, no data gets sent to Google Analytics. 

    To add the code, you’ll need a web developer or someone with technical skills to follow Google’s eCommerce tracking set up guidelines.

    Depending on the data you want to track, your tracking code will look something like this:

    screenshot showing sample google analytics ecommerce tracking code

    Add your code to the header tag of your website to track and send data to Google Analytics. Alternatively, you can add your code using the Google tag manager.

    Related: Google Analytics Enhanced Ecommerce Reporting: A Step-by-Step Guide

    Best Practices for Setting Up Google Analytics Ecommerce Tracking 

    We asked 39 experts for their best advice for setting up eCommerce tracking in Google Analytics. 37 of those experts identify as eCommerce or agency/consultant working in eCommerce, with 37.84% strictly eCommerce and 62.16% agencies or consultants (for eCommerce).

    All respondents use Google Analytics to track their e-shop’s performance. About 30% of respondents use Shopify and/or WooCommerce besides Google Analytics, while 22% use ecommerce reporting software like Databox.

    chart showing how ecommerce businesses track data

    We’ve taken the best tips from companies that have at least five years of experience in the field. Here’s what they shared:

    1. Set up Google Analytics eCommerce tracking on GA4
    2. Create UTM parameters for smarter tracking
    3. Test your configurations with a dummy profile
    4. Set conversion goals in Google Analytics
    5. Use shopping behavior and check behavior reports
    6. Create a durable and flexible tracking code
    7. Segment users for better context

    1. Set up Google Analytics eCommerce tracking on GA4

    Google Analytics 4 is an advanced version of Universal Analytics. Compared to Universal Analytics, it allows you to integrate data from more sources, and collect data based on custom dimensions, metrics, and variables. 

    But those aren’t the only benefits. According to Juliana Jackson of CXL, GA4 it’s “the most eCommerce centric analytics tool Google released.”

    Jackson says “You should start working on setting up Google Analytics 4 along with your Universal Analytics. Google Analytics 4 will offer you a WAY more customer-focused experience. Using GA4 you will benefit from improved customer journey tracking, more powerful audiences for your ad campaigns, etc….Not to mention that the big query integration can help you create your own CDP.”

    Related: How to Track Conversions with Google Analytics 4: 7 Best Practices

    2. Create UTM parameters for smarter tracking

    UTM parameters are tags you add to URLs to track the performance of your product campaigns. The five available tags are:

    • utm_source: identify sites sending you traffic
    • utm_medium: identify the marketing medium i.e email, banner ads…
    • utm_campaign: track results from specific promo codes and campaigns
    • utm_term: track paid search keywords, from Google ads for example
    • utm_content: track which links and call-to-actions send you traffic

    So a UTM tracking URL will look something like this:

    https://databox.com/campaign?utm_campaign=landingpage&utm_medium=social&utm_source=linkedin

    They allow you to understand which marketing strategies deliver the best ROI so you can effectively focus your efforts.

    Bonny Rathod of Elsner Technologies says “Google Analytics also allows you to track various campaigns to every single URL using the Urchin Tracking Module as a Google UTM Builder. You can use UTMS to find out how many visitors visited your website during a campaign from various channels.”

    To create UTM parameters, visit Google’s UTM builder and fill the fields as required.

    screenshot showing google analytics' utm builder

    3. Test your configurations with a dummy profile

    “TEST. Many eComm Google Analytics configurations have holes that can only be discovered with real data (a real transaction, a real purchase) so set up a dummy credit card/payment profile and test as many devices/attribution paths/purchase flows as possible and verify your transactions in both your back-end fulfillment platform and Analytics,” says Qyn Bayley-Hay of Arcane Digital.

    Bayley-Hay emphasizes “We’ve seen theoretically-sound configurations that have edge-case misses (channels that don’t properly attach UTMs when part of a conversion path, or double-counted revenue, or misattributed channel association) that are nearly impossible to model.”

    For testing, Fake User Info is worth checking out on Product Hunt.

    4. Set conversion goals in Google Analytics

    In analytics, goals represent the successful completion of a specified step. Purchases or newsletter sign ups for example.

    Natasha Rei of Explainerd says you should set up custom goal metrics for control. 

    “Set up a goal in Google Analytics to track the number of visits to your website. Make this a custom metric if you want more control over what it tracks (i.e., don’t just set a goal for “visits”). – Give visitors access to one primary conversion after they’ve visited your site and before they leave (typically called an “on-page action”)–this will be how they enter into the analytics system, so it needs to be something that has meaning for you as an organization/brand.” says Rei.

    To create goals:

    • Click the Admin tab in Google Analytics
    • Select your preferred view
    • Click Goals
    • Click + NEW GOAL to add a new goal
    screenshot showing how to add goals in google analytics ecommerce

    5. Use shopping behavior and check behavior reports

    Shopping behavior and checkout reports allow you to identify areas for improvement with checkout.

    Hardeep Matharoo of Best Response Media says that “The best advice I could give is to use Shopping behavior and Check behavior reports in Google Analytics. This requires having the funnels for checkout set up correctly. We see that many clients have not added the correct URL for the checkout steps and confirmation page. If the funnels for the checkout page are tracking correctly, it can help identify issues or improvements with the checkout. If users are looping back, skipping pages, or not following the funnel sequence. All of these can be an indication of areas of improvement to the usability.”

    Related: Google Analytics for Ecommerce: 14 Tips for Measuring Your Online Store

    6. Create a durable and flexible tracking code

    When you create your eCommerce tracking code, it’s essential to plan for business growth.

    Sandi Legeman of 301 Digital Media emphasizes just that.

    “The best piece of advice I can offer for setting up eCommerce tracking in Google Analytics is to focus on ensuring that the code is durable and flexible,” says Legeman.

    “Take a code-once and deploy-many approach. As your business grows and your need to leverage conversion tracking for campaign optimization and reporting increases, your hands won’t be tied by a lack of foresight in conversion tracking implementation,” Legeman continues.

    7. Segment users for better context

    In addition to premade segments, Google Analytics allows you to create and add your own segments.

    how to add a new segment to google analytics
    Segment Builder: Click “Add Segment” then “New Segment” under your preferred view

    These segments give you access to more specific and insightful user behavior data.

    “The more you know about your audience and their behavior, the more chance you have of effectively utilizing data to maximize conversions and sales, so you should be sure to segment users as part of your eCommerce tracking in Google Analytics,” says Stephen Light of Nolah Mattress.

    Light shares that “Segmenting user data gives more context to Google’s reports, and can give you far deeper insight into user experience and behavior, as well as which channels are most successful. Google Analytics offers helpful premade segments like New Users, Returning Users, Made a Purchase, and Converters but you can also create and add your own. Segmenting will help your eCommerce tracking be as specific and insightful as possible.”

    Related: 16 Google Analytics Custom Dimensions for Tracking Your Ecommerce Store

    ga_ecommerce_dashboard_template_databox

    Optimize the Performance of Your Online Store with Databox 

    Google Analytics eCommerce tracking allows you to learn where customers come from and what they do on your website so you can improve the user experience and increase sales performance. But you shouldn’t rely on one data source alone. 

    Databox allows you to view data from many sources in a centralized dashboard. Integrate Shopify, WooCommerce, and other data sources to get the full picture and make the most impactful changes. Sign up for a free trial to see how it works.

    Author's avatar
    Article by
    Lily Ugbaja

    Lily Ugbaja is a B2B SaaS and Marketing Writer for hire. She's passionate about creating data-driven SEO content that ranks, inspires brand trust, and drives conversions. Connect with her on LinkedIn and Twitter @lilyugbaja or on her website lilyugbaja.com

    More from this author

    Get practical strategies that drive consistent growth

    Read some