Ecommerce

What is ecommerce tracking?

You’re selling products online. But do you really know what’s driving sales for your business?

The UK has the third largest ecommerce market in the world, projected to reach US $162.7 billion in revenue in 2025. And with one in two shoppers now buying online at least once a week, the opportunity for growth has never been greater.

But while sales are booming, understanding what’s behind them isn’t always straightforward. Unlike a physical shop, you can’t see how customers browse, compare, or decide to buy. And without that visibility, it’s hard to know what’s working or where sales are being lost.

Ecommerce tracking fills that gap. It reveals what customers actually do on your site: the products they view, add-to-basket, and buy. But it goes beyond counting sales to understand the story behind the numbers, including:

  • Where your customers come from (search, social media, paid ads, email etc.)
  • What makes them decide to purchase (and repurchase) your products
  • Why some people abandon their baskets at the checkout

Whether you’re running a small Shopify store or a global retail brand, the goal is the same. To know what works, what doesn’t, and where your revenue really comes from.

However, many businesses are still flying blind. Around 70% of ecommerce stores have broken or incomplete tracking setups, and 43% of CMOs believe less than half of their marketing data can be trusted.

In this guide, we’ll explore what ecommerce tracking is, why it matters, and how to set it up effectively so you can turn raw data into real business growth.

H2: Why you need tracking in ecommerce

Tracking gives you the data you need to understand how your online shop performs. It connects every part of your business, from marketing and sales to product and customer experience, so you can see what’s working and what needs attention.

Tracking captures three main types of insight:

  • Behavioural data. How users browse, click, and move through your site.
  • Transactional data. What they buy, when, and through which channel.
  • Customer data. Who they are, where they’re based, and whether they’re new or returning visitors.

Together, these insights replace guesswork with evidence. You can see how customers interact with your online shop, what influences their decisions, and where the biggest opportunities lie.

Armed with this information, you can:

  • Map the customer journey. Understand where shoppers come from and which channels bring the most valuable traffic.
  • Understand user behaviour. See what people view, add-to-basket, and save to wishlists.
  • See what converts. Find which products and campaigns perform best and focus investment there.
  • Fix friction. Spot where customers drop off or abandon carts and improve the buying experience.
  • Measure success. Track KPIs like conversion rate, average order value (AOV), and customer lifetime value (CLV) to guide long-term growth.

For marketers, the value of good data is clear. According to HubSpot, data-led marketing helps businesses:

  1. Reach target audiences more effectively (35%).
  2. Increase the ROI of marketing efforts (34%).
  3. Plan media mixes more effectively (32%).

In short, ecommerce tracking turns your website into a reliable source of insight. It shows you how customers behave, what drives results, and where to optimise to drive growth.

H2: Tracking ecommerce events in GA4

Events are the foundation of ecommerce tracking. Each one represents a specific action on your site, and understanding those actions is key to improving performance.

Common ecommerce events include (but are not limited to):

  • view_item – when a customer views a product
  • add_to_cart – when an item is added to basket
  • begin_checkout – when checkout starts
  • add_payment_info – when payment details are entered
  • purchase – when an order is completed
  • refund – when an order is cancelled or returned

These events show more than just what sells. They show how and why.

For example, are people adding items to their basket but not checking out? Are refunds higher for certain products? Do mobile users abandon baskets more often than desktop users?

Each event tells part of the story. Together, they show how customers move through your site and where you can make improvements that drive conversion.

H2: How to set up ecommerce tracking

You often don’t need to be a developer to set up ecommerce tracking. A basic understanding of how your platform connects to your analytics tools is enough. Most setups use your CMS, Google Analytics 4, and Google Tag Manager. Here’s how they fit together.

H3: Your CMS

Your CMS is a good starting point. Platforms like Shopify, WooCommerce, and Magento include integrations that automatically send shopping data (such as product names and prices) to Google Analytics, although you might also need additional plugins or setups.

To connect your CMS:

  1. Log in to your CMS and open Analytics or Integrations settings.
  2. Add your GA4 Measurement ID.
  3. Enable Enhanced Ecommerce or GA4 Ecommerce tracking (name may vary).

Once connected, your CMS records key actions such as product views, add-to-basket events, and purchases. When set up correctly, it sends this information to GA4 accurately, giving you clean and reliable data.

H3: Google Analytics 4 (GA4)

GA4 uses event-based tracking. This means it records user interactions, rather than pageviews. This gives you a detailed picture of how people browse and buy on your site.

To enable ecommerce tracking in GA4:

  1. Go to Admin -> Data Streams -> Web -> Enhanced Measurement.
  2. Implement recommended ecommerce events (such as view_item, add_to_cart, begin_checkout, and purchase) to track shopping activity. These ecommerce-specific events aren’t included in Enhanced Measurement by default — they need to be added manually, usually via Google Tag Manager (GTM) or a CMS plugin that supports GA4.
  3. Once enabled, go to Reports -> Monetisation -> Ecommerce purchases to see top products, conversion rates, and checkout drop-offs. These insights help you spot what sells, what doesn’t, and which channels generate the most revenue.

H3: Google Tag Manager (GTM)

While your CMS and GA4 handle data collection and reporting, GTM manages how that data flows between tools. It also lets you add and adjust tracking without manually editing your website code.

To connect GTM:

  1. Create a GTM account and add your container code to your site.
  2. Set up a GA4 Configuration Tag with your Measurement ID.
  3. Add GA4 Event Tags for ecommerce actions (e.g. add_to_cart, purchase).
  4. Use Triggers to fire tags when specific actions occur, for example when someone clicks ‘buy now’.
  5. Test your setup in Preview Mode before publishing to make sure everything works correctly.

When these three tools work together, your CMS captures customer actions, GTM sends the data to GA4, and GA4 turns it into actionable insights. The result is a reliable, end-to-end view of store performance.

H2: How to track ecommerce customer lifecycle

Tracking isn’t a one-time thing. It should follow the entire customer lifecycle, from first click to repeat purchase. By tracking each stage, you can see how people discover, engage with, and return to your brand.

A typical lifecycle includes:

  • Awareness. How people find you through search, social media, or referrals.
  • What they do once they land on your site – viewing pages, interacting with products, adding to basket.
  • Conversion. Completing a checkout or making a purchase.
  • Retention. Returning for repeat purchases, joining subscription programmes, leaving reviews etc.

Modern analytics tools can track this activity across multiple devices and platforms, showing how customers move between mobile, desktop, and apps. The goal isn’t only to record sales, but to understand your customers.

H2: Using tracking data in ecommerce

Once you’ve set up tracking, the real value comes from what you do with the data.

Tracking insights can help you:

  • Find drop-off points and improve conversion rate optimisation (CRO).
  • Inform product development based on what people search for and buy.
  • Personalise the shopping experience with data-led recommendations.
  • Plan campaigns around seasonal trends and buying habits.

By analysing behaviour patterns, you can design a smoother journey that fits how customers actually shop, not how you think they shop. Tracking data becomes a roadmap for better performance, smarter strategy, and higher revenue.

H2: Conclusion

Ecommerce tracking gives you the truth about how your store performs, where growth is hiding, and which changes will move the needle. If you want help setting up GA4, tightening your tagging, or turning reporting into action, talk to Edge45. We connect data to strategy so your store can scale with confidence.

Read next: How to carry out an ecommerce SEO audit.