Setting Up GA4 E-Commerce Tracking

Running an online shop without e-commerce tracking is a little like running a physical store with the lights off. Money is changing hands somewhere in the dark, but you cannot see which products people pick up, which shelves they walk past, or where they put things down and leave without buying. You know sales are happening because the till occasionally rings, yet you have almost no idea why some days are good and others are quiet. Switching on proper tracking is like flicking those lights on.

GA4 has e-commerce measurement baked in, and once configured it transforms a vague sense of how the shop is doing into a detailed, decision-ready picture. You can see which products get viewed but rarely bought, where in the checkout people abandon their carts, and which marketing brings the buyers who actually spend. This guide walks through what e-commerce tracking involves, the key moments it captures, and how to approach the setup without needing to be a developer yourself.

What e-commerce tracking really captures

At heart, e-commerce tracking is about recording the specific steps a shopper takes on the way to a purchase, and capturing rich detail about the products involved at each step. It is built on the same event-and-parameter foundation that underpins everything in GA4, but uses a specific set of recommended events and parameters designed for shopping. When you send these in the expected format, GA4 unlocks a whole suite of monetisation reports that would otherwise stay empty.

The shopping journey is broken into a sequence of meaningful moments: viewing a product, adding it to the cart, beginning checkout, and completing the purchase. Each of these is a named event, and each carries information about the items involved, their prices, quantities, and so on. Capture the full sequence and you can reconstruct exactly how shoppers move from curiosity to checkout, which is the bedrock of improving an online store.

From browsing to buying, step by step
E-commerce tracking records each stage of the purchase journey so you can see exactly where shoppers convert or drop off.
Source: Google Analytics Help

The key e-commerce events

GA4 defines a standard list of recommended e-commerce events, and using their exact names matters, because that is what tells GA4 to populate its shopping reports. You do not have to implement every single one, but the more of the journey you cover, the more complete your picture becomes. The most important events trace the core path from discovery to purchase, with a few extras for refunds and promotions.

The headline events are straightforward once you see them laid out. A view_item fires when someone looks at a product. An add_to_cart fires when they add it to their basket. A begin_checkout fires when they start the checkout process, and the all-important purchase fires when the order completes. Around these sit useful supporting events like view_item_list, select_item, and add_payment_info, each adding texture to the story.

Core e-commerce events and when they fire
Event Fires when Why it matters
view_item A product page is viewed Shows interest and demand
add_to_cart An item is added to the cart Signals purchase intent
begin_checkout Checkout starts Marks the final stretch
purchase An order completes The revenue moment itself

The items array: the heart of it all

If there is one concept to grasp, it is the items information that travels with each e-commerce event. Every shopping event carries a structured list describing the products involved: their names, identifiers, prices, quantities, categories, brands, and any variant details like size or colour. This is what lets GA4 tell you not just that a sale happened, but precisely which products sold, at what price, in what quantity, and as part of which order.

Getting this product information right is the single biggest factor in whether your e-commerce reports are useful or frustrating. If the item details are missing or inconsistent, your monetisation reports will look thin and your product-level insights will be unreliable. If they are complete and tidy, you unlock the genuinely valuable stuff: best-seller rankings, product-level conversion rates, and an understanding of which categories pull their weight. Pairing this with broader e-commerce analytics is where the real strategic value emerges.

Product detail makes or breaks it
Complete, consistent item data is what turns a bare sales figure into product-level insight you can act on.
Source: Google Analytics Help

How the data actually gets sent

So how do these richly detailed events reach GA4? For most shops the answer is one of two routes. Some popular shopping platforms and plugins offer built-in or near-built-in e-commerce tracking, where you flip a setting and the standard events start flowing with minimal fuss. The other common route is a tag management system, which gives you fuller control over exactly what data is sent and when. Our guide on how to set up Google Tag Manager is the natural companion if you take this path, because the product information usually flows through what is called a data layer that the tag manager reads from.

Whichever route you choose, the principle is the same. Your website needs to make the product details available at the right moment, and your tagging needs to package them into the correctly named events and send them on. It sounds involved, but for the majority of stores it is a one-time setup that runs quietly thereafter. The effort is heavily front-loaded, and the payoff lasts as long as the shop does.

Mark the purchase as a key conversion

Once your purchase event is flowing reliably, you will want to flag it as a key event or conversion so it takes pride of place in your reports and becomes available for measuring advertising performance. This connects your store directly to your marketing, letting you see which campaigns bring buyers rather than just clicks. Our walkthrough on setting up conversion tracking covers exactly how to do this and why it changes the way you judge your marketing spend.

Testing before you trust the numbers

A golden rule of e-commerce tracking: never assume it works until you have checked. It is dispiriting how often a setup looks fine but quietly sends the wrong currency, double-counts purchases, or drops the item details. Before you make decisions based on the data, run test purchases and watch them flow through, ideally using GA4's real-time and debugging views to confirm each event fires once, with the right value and complete product information.

Pay special attention to a few classic gremlins. Make sure purchases are counted once and not duplicated by an over-eager confirmation page. Confirm the order value matches the actual amount charged. Check that refunds, if you track them, subtract rather than add. A short, careful testing session at the start saves months of acting on figures you cannot trust, and it is far easier than untangling bad data after the fact.

Common tracking gremlins and how to catch them
Problem How to spot it
Duplicate purchases Revenue looks inflated; refresh the confirmation page and watch counts
Missing item data Product reports look empty despite sales
Wrong value or currency Revenue does not match your actual takings
Events not firing Real-time view shows nothing during a test purchase

Turning the data into better decisions

Once the plumbing is solid, the reports come alive and the fun begins. You can see which products are viewed often but bought rarely, hinting at a pricing or description problem. You can build a checkout funnel in a flexible exploration to find exactly where carts are abandoned. You can create an audience of cart abandoners and gently remind them of what they left behind. Each of these is a concrete lever for growth that simply does not exist without tracking.

The broader habit this supports is reviewing your store's performance with real numbers rather than gut feeling. Combining e-commerce data with the key metrics every business should track monthly gives you a steady rhythm of insight, and the foundational guide to reading GA4 reports helps you interpret what you find. For a wider view of the metrics that matter to online shops, the primer on e-commerce analytics basics rounds out the picture nicely. If setting all of this up feels like more than you want to take on alone, a brief chat through our contact page can point you in the right direction.

Frequently asked questions

Do I need a developer to set up e-commerce tracking?+
Not always. Many shopping platforms and plugins offer near built-in tracking you can enable with a setting. More custom stores usually benefit from a tag management system and, for tricky cases, some developer help to make the product details available correctly. The basics are achievable for many store owners without writing code.
Why are my product reports empty even though I have sales?+
This almost always means the item details are not being sent with your e-commerce events. The purchase may register, but without the structured product information GA4 has nothing to populate the product-level reports with. Check that each event includes complete item data with names, prices, and quantities.
Which e-commerce events are most important?+
If you implement only a few, prioritise view_item, add_to_cart, begin_checkout, and purchase. Together they trace the core path from interest to sale and power most monetisation reports. You can add supporting events like view_item_list and add_payment_info later for finer detail.
How do I know my tracking is accurate?+
Run test purchases and watch them in GA4's real-time and debugging views. Confirm each event fires once, the order value matches what was charged, and the item details are complete. A careful testing session before you rely on the numbers prevents costly misreadings later.

References

  1. Google. "[GA4] Measure ecommerce." support.google.com/analytics.
  2. Google for Developers. "Measure ecommerce." developers.google.com.
  3. Simo Ahava. "Enhanced ecommerce in Google Analytics 4." simoahava.com.
Back to blog

AUTOMATE. OPTIMIZE. DOMINATE.

Streamline your operations and deliver a frictionless customer journey. Let our experts deploy cutting-edge tech and optimized workflows so you can focus on what you do best.