GA4 & Web Analytics

GA4 Ecommerce Tracking: The Practical Guide We Hand to New Clients

If GA4 says you sold less than Shopify did last month, you are not alone. This is the ecommerce tracking playbook we give every new store client, from the first view_item to the last refund.

By EmergingAds Tracking Team  /  6 Oct 2026  /  16 min read
GA4 ecommerce tracking guide cover showing an online store funnel from product view to purchase

Key takeaways

  • GA4 ecommerce tracking is a chain of recommended events, from view_item to purchase and refund, and every link needs a clean items array.
  • Most revenue gaps come from three causes: missing currency, duplicate purchase events and checkouts that happen on another domain.
  • Send a stable transaction_id with every purchase and stop duplicates at the source, instead of hoping GA4 cleans them up later.
  • Validate GA4 revenue against the backend weekly for the first month, then monthly. A gap within a few per cent is normal; a gap that grows is a bug.
  • Refunds belong in GA4 too. Without them your product and channel revenue looks healthier than the bank account does.

01Why GA4 ecommerce tracking goes wrong so often

Almost every store that comes to us has some form of GA4 ecommerce tracking in place. Very few trust it. The founder opens GA4, sees one revenue figure, opens Shopify or WooCommerce, sees a larger one, then opens Meta and sees a third number that looks suspiciously generous. Nobody can say which one is right, so the team quietly stops using GA4 for anything that matters.

That is a shame, because GA4 is still the one free tool that can show you the whole path from product view to purchase across every channel, with the same rules applied to all of them. When the ecommerce events are clean, it answers questions no ad platform will answer honestly: which products get viewed but never added, where the checkout loses people, which traffic sources bring buyers rather than browsers.

The problems we find are rarely exotic. They are the same handful of mistakes, repeated across different themes, plugins and agencies:

  • Two systems sending the same purchase. A native integration and a GTM tag both fire, so revenue doubles on some orders and not others.
  • No currency on the event. GA4 receives a value but cannot treat it as revenue, so reports show zero or blanks.
  • An items array in the wrong shape. Products turn up as “(not set)” and item reports become useless.
  • Checkout on another domain. The purchase is credited to the payment provider or to direct traffic instead of the ad that earned it.
  • Refunds ignored. Returns never reach GA4, so product revenue is overstated forever.

If your base property is not solid yet, fix that first. Our GA4 setup guide covers data retention, filters, key events and consent, and it is the foundation everything in this post sits on. You can also have our team handle the full GA4 setup and configuration if you would rather not do it in-house.

Our starting ruleBefore you touch a single tag, write down which system is the source of truth for revenue. For almost every store it is the order database, not GA4. GA4’s job is to explain behaviour, and it should land close to the backend, not replace it.

02The GA4 ecommerce events and when each one should fire

GA4 has a set of recommended ecommerce events. Using Google’s names matters, because the built-in monetisation reports and funnel templates only fill in when the event names and parameters match what GA4 expects. Custom names like “product_added” will be collected, but they will not populate the ecommerce reports.

Here is the list we implement on nearly every store, with the moment each one should fire. Not every business needs every event, but you should decide deliberately rather than by accident.

EventWhen it should firePriority for most stores
view_item_listA collection, category or search results page loadsMedium
select_itemA shopper clicks a product from a listLow to medium
view_itemA product detail page loadsHigh
add_to_cartAn item is successfully added, not just the button clickedHigh
view_cartThe cart page or drawer opensMedium
remove_from_cartAn item is removed from the cartLow
begin_checkoutThe first checkout step loadsHigh
add_shipping_infoShipping method is submittedMedium
add_payment_infoPayment details step is submittedMedium
purchaseThe order is confirmed, once per orderEssential
refundA full or partial refund is processedHigh

Fire on success, not on intent

The most common timing error we see is add_to_cart firing on the button click. If the product is out of stock, or the variant was not selected, the click happens but nothing is added. On one fashion store we audited, the add to cart rate looked excellent because size selection errors were being counted as additions. Tie the event to the moment the cart actually changes, usually a successful response from the cart API.

Keep the funnel events in order

GA4 does not force events into sequence, but your analysis assumes it. If begin_checkout fires on some themes and not others, or a one-page checkout skips add_shipping_info, your funnel exploration will show drop-offs that do not exist. Map the real steps of your checkout first, then choose events to match them.

Steps diagram of the core GA4 ecommerce events from view_item through add_to_cart and begin_checkout to purchase and refund
The core GA4 ecommerce event chain we implement on most stores.

03The items array: where product data lives or dies

Every ecommerce event in GA4 carries an items array: a list of the products involved, each with its own parameters. This is where most “(not set)” problems begin. If GA4 cannot find item_id or item_name inside the array, product reports fill with blanks no matter how good the rest of your tracking is.

ParameterWhat to sendCommon mistake
item_idYour SKU or product ID, matching your feedSending the variant ID on some events and parent ID on others
item_nameThe product title shoppers seeIncluding price or size in the name
item_variantSize, colour or other variant labelLeft empty, so variant analysis is impossible
item_brandBrand, if you sell more than oneHard-coded to your store name on every product
item_categoryTop-level category, with item_category2 onwards for depthUsing the page URL instead of the category
priceUnit price after item discountsSending line total, so price times quantity doubles up
quantityNumber of unitsMissing, which makes GA4 assume one
coupon / discountItem-level promotion detailsOnly sent at order level, so product margin looks wrong

Match item_id to your product feed

If you run Google Shopping campaigns, use the same ID format in GA4 as in your Merchant Center feed. It makes product-level analysis across GA4 and Google Ads far easier, and it saves a painful lookup table later. We decide this with clients on day one, because changing it after months of data splits every product report in two.

Event-level value and currency

Alongside the items array, purchase and most other ecommerce events should carry value and currency at the event level. Leave out currency and GA4 cannot turn the value into revenue. It is a one-line fix that we still find missing on perhaps one store in every few we audit.

Checklist of GA4 items array parameters to send with every ecommerce event, including item_id, price, quantity and currency
What every ecommerce event should carry before you trust the reports.

04Stopping duplicate purchases with transaction_id

Duplicate purchases are the single biggest reason GA4 revenue runs higher than the backend, and they are sneaky because they rarely affect every order. A shopper reloads the thank you page. They bookmark it. A payment provider redirects twice. A plugin and a GTM tag both fire. Each of these creates a second purchase event.

Every purchase should carry a transaction_id that matches the order number in your backend. GA4 uses it to recognise repeats, but we never rely on that alone. Stop the duplicate at the source, so the numbers are clean in every tool that reads the same event, including your ad platforms.

  1. Pick one sender. Either the platform’s native integration or your GTM container sends purchase, never both. Check GA4’s realtime view while placing a test order and count the events.
  2. Guard the thank you page. Fire purchase only once per order, for example by storing the order ID in the browser after the first send and checking it before sending again.
  3. Use the real order number. Not a session ID, not a random string. You will need it to reconcile against the backend.
  4. Test the awkward routes. Reload, back button, pay-later methods and wallet payments all behave differently. Test each one.

If you cannot match a GA4 purchase to an order number, you cannot audit it, and a number you cannot audit is just an opinion.

What about server-side purchase events?

Some stores send purchase from the server using the Measurement Protocol or a server-side container, because it survives ad blockers and closed tabs. That can work well, but the event still needs the session context to be attributed properly, and you must not send it from the browser as well. If you go this route, plan it as part of a wider conversion tracking setup so Google Ads and Meta read from the same clean source.

05Refunds, cancellations and the revenue you give back

Most stores never send refunds to GA4. The result is that GA4 revenue creeps above net revenue month after month, and any channel or product with a high return rate looks better than it is. Categories like apparel and footwear are hit hardest, because returns are part of the business model.

The refund event is simple in principle. For a full refund you send the original transaction_id. For a partial refund you also send the items that were returned, with quantities. The practical question is where it comes from, because refunds happen in the back office days later, not in the shopper’s browser.

  • Measurement Protocol from the backend. The cleanest option. A small script or automation listens for refunds and sends them to GA4 with the original transaction_id.
  • Automation tools. On smaller stores we sometimes wire refunds through Zapier or Make, using the order webhook as the trigger.
  • Plugin support. Some WooCommerce integrations handle refunds when the admin processes them. Check it actually works before trusting it.
A note on timingRefunds are recorded on the date they are sent, not back-dated to the original order. So a month with a big return wave will show lower net revenue than the month the sales were made. Explain this to finance before they ask.

06GA4 ecommerce tracking on Shopify and WooCommerce

The platform your store runs on decides most of your options. Both of the big ones can produce good GA4 ecommerce tracking, but they get there differently, and the traps are different too.

QuestionShopifyWooCommerce
Easiest starting routeShopify’s own Google channel appA maintained GA4 or GTM plugin
Checkout trackingVia customer events and custom pixels, which run in a sandboxFull page control, the checkout is your own site
Main riskApp plus theme code plus GTM all sending purchasePlugin conflicts and caching serving stale data
RefundsUsually needs a backend or automation routeSome plugins send them, many do not
Best for controlCustom pixel with a documented event specGTM with a proper data layer

Shopify: pick one route and remove the rest

On Shopify we usually find old theme snippets, a legacy analytics field, an app and a GTM container all doing some tracking. The fix is to choose one route, remove the others, then test every event. For stores that want finer control we build a custom pixel that follows a written event spec. Our Shopify website management team handles this alongside theme and app work, so tracking is not broken by the next theme update.

WooCommerce: watch the plugins and the cache

WooCommerce gives you more freedom and more ways to break things. Two plugins each adding a GA4 tag is common. So is a page cache serving the same data layer to different visitors. Exclude cart and checkout pages from full-page caching, and test with a real order on the live site, not just staging. Our WooCommerce marketing setup service includes this tracking layer.

Whichever platform you use, a clean data layer read by Google Tag Manager gives you the most control. We cover the container side in our Google Tag Manager guide, and our GTM setup service builds it for stores that want it done properly first time.

Comparison of a messy GA4 ecommerce setup with several tracking routes against a clean single-route setup
The pattern we find in audits compared with the setup we leave behind.

07Checkouts on other domains and payment gateways

When checkout or payment happens on a different domain, GA4 can lose the thread. The shopper leaves your site for a payment page, comes back to the thank you page, and GA4 starts a new session credited to the payment provider. Your paid social and search campaigns lose the sale, and a payment company shows up as one of your best referral sources.

  • Add payment domains to the unwanted referrals list in your GA4 data stream settings, so returning shoppers keep their original source.
  • Set up cross-domain measurement when the checkout is on a domain you control, such as a separate checkout subdomain or a hosted funnel builder.
  • Check the landing page report for sessions starting on the thank you page. A steady stream of them is a clear sign of a broken handover.
  • Keep UTMs off internal links. Tagging your own links resets the session source and creates the same problem from the other direction.

This is also where ecommerce tracking meets the rest of your tracking stack. If you run a headless build or a subscription platform with its own checkout, the answer is usually a server-side purchase event joined to the original client ID. Our GA4 tracking service covers these setups for stores that have outgrown the standard route.

08Validating GA4 revenue against your backend

You will never get GA4 to match your store backend to the penny, and you should not try. Ad blockers, consent choices, closed tabs and test orders all create small, honest gaps. What you want is a gap that is small, stable and explained. A gap that changes wildly from week to week means something is broken.

The weekly reconciliation we run

  1. Export orders from the backend for a full week, with order number, value, currency and date.
  2. Export GA4 purchases for the same week using transaction_id, revenue and date in an exploration.
  3. Match on order number. List orders missing from GA4, and GA4 purchases missing from the backend.
  4. Look for patterns: one payment method, one device, one country, one day. Patterns point to causes.
  5. Fix, then repeat the next week until the gap is steady.

The GA4 purchases that have no matching order are usually duplicates or test orders. The orders missing from GA4 are usually consent declines, ad blockers or a payment route that skips the thank you page. The first group you can fix. The second you can only shrink, often with server-side events and Consent Mode.

Once the numbers hold steady, pipe them into a report the whole team reads. A Looker Studio dashboard that shows GA4 revenue next to backend revenue, with the gap as its own line, keeps everyone honest. It is part of the regular tracking audit we recommend for every store.

Bar chart of the most common causes of a gap between GA4 revenue and store backend revenue
Causes of GA4 and backend revenue gaps, ranked by how often we meet them (illustrative).
Tiles summarising the checks in a weekly GA4 revenue reconciliation against the store backend
What we compare in each weekly reconciliation.

09Reports, explorations and fixing (not set)

Once events are clean, GA4 ecommerce tracking becomes genuinely useful. The standard monetisation reports cover the basics: revenue by item, by channel and over time. The real value sits in explorations, where you can build the views your store actually needs.

  • Funnel exploration from view_item to purchase, split by device. Mobile checkout drop-off is the most common finding, and the most profitable to fix.
  • Item-level view to cart rate. Products with lots of views and few additions usually have a price, image or stock problem.
  • Revenue by first user source. Shows which channels bring customers, not just which ones close the sale.
  • Coupon analysis. Which codes drive new customers and which ones just discount people who were buying anyway.

Why products show as (not set)

When item reports fill with “(not set)”, check these in order: is the items array present on the event; is it named exactly items; does each item have item_id or item_name; and is the data layer cleared between events so old items are not reused. In GTM, pushing an empty ecommerce object before each new ecommerce event prevents stale data from leaking across. If revenue is missing but events arrive, check currency first, then the value type: it must be a number, not a text string with a currency symbol.

Clean ecommerce data also improves your ad results, because the same events feed Google Ads and Meta. The stores we run Meta ads for ecommerce on see steadier optimisation once purchase data stops doubling up. If you want the whole stack reviewed, from GA4 to the ad platforms and CRM, you can see all our services here or start from the whyemergingads.com homepage for the rest of this series.

Priority matrix for GA4 ecommerce tracking fixes plotted by effort and revenue impact
How we prioritise ecommerce tracking fixes on a new account.

Frequently asked questions

Straight answers to what clients ask us most about ga4 ecommerce tracking.

What is GA4 ecommerce tracking?
GA4 ecommerce tracking is the set of recommended events, such as view_item, add_to_cart, begin_checkout and purchase, that tell Google Analytics 4 what shoppers do on your store. Each event carries an items array with product details. When the event names and parameters follow Google’s format, GA4 fills its monetisation reports and funnel views automatically, so you can see product and channel performance in one place.
Why is my GA4 revenue lower than Shopify?
Some gap is normal. Shoppers who decline consent, use ad blockers or close the tab before the thank you page loads will not be counted. A larger gap usually means a payment route skips the confirmation page, currency is missing on some purchases, or the tracking was broken by a theme or app change. Reconcile by order number to see which orders are missing and look for a pattern.
Why is my GA4 revenue higher than my backend?
Higher GA4 revenue almost always means duplicate purchase events. Common causes are a native integration and a GTM tag both sending purchase, shoppers reloading the thank you page, or test orders being counted. Check that one system sends purchase, that it fires once per order, and that each event carries the real order number as transaction_id.
Do I need every GA4 ecommerce event?
No. Most stores should have view_item, add_to_cart, begin_checkout, purchase and refund as a minimum. List and promotion events are useful for larger catalogues and merchandising teams. Add shipping and payment step events if your checkout has separate steps. It is better to implement five events perfectly than eleven events badly, because every broken event weakens the funnel reports.
What is the transaction_id used for?
The transaction_id identifies each order. It should match the order number in your store backend. GA4 uses it to spot repeated purchase events, and you need it to reconcile GA4 against your order data. Refund events also rely on it, because a refund is linked to the original purchase through the same transaction_id.
How do I track refunds in GA4?
Send a refund event with the original transaction_id. For a partial refund, include the returned items and quantities. Because refunds happen in the back office rather than in the browser, most stores send them from the server using the Measurement Protocol, or through an automation that listens for refund webhooks. Test with a real refund before relying on it.
Why do my products show as (not set) in GA4?
Usually the items array is missing, misnamed or missing both item_id and item_name. Stale data can also leak across events when the data layer is not cleared, which creates confusing product rows. Check the raw event in DebugView, compare it with Google’s recommended format, and make sure an empty ecommerce object is pushed before each new ecommerce event.
Should I use Shopify's native integration or GTM for GA4?
The native Google channel app is the fastest route and fine for many stores. GTM or a custom pixel gives more control over event timing, parameters and extra platforms. The rule that matters most is to use one route for each event. Running both side by side is the most common cause of doubled revenue we find in audits.
How do I stop the payment gateway showing as a referral?
Add the payment provider’s domains to the unwanted referrals list in your GA4 data stream settings. If the checkout sits on another domain you control, set up cross-domain measurement as well. Then check the landing page report for sessions starting on the thank you page. If those drop away, the handover is fixed and purchases will keep their original source.
Can GA4 ecommerce data be used in Google Ads?
Yes. You can import GA4 key events such as purchase into Google Ads once the accounts are linked, and use the items data for product-level analysis. Many stores still use the Google Ads conversion tag for bidding because it handles enhanced conversions directly. Whichever you choose, pick one as the primary conversion so Google Ads does not count the same sale twice.
How often should I check GA4 ecommerce tracking?
Weekly for the first month after any change, then monthly. Also check after every theme update, new app, checkout change or payment method launch, because those are the moments tracking breaks. A simple reconciliation by order number takes under an hour once you have the exports set up, and it catches problems before they distort a whole quarter of reporting.
GA4 ecommerceEcommerce trackingShopify analyticsRevenue reporting
EA
EmergingAds Tracking Team

The EmergingAds tracking team sets up GA4, GTM, server-side tracking and attribution so brands can trust the numbers behind every marketing decision. See the full advanced tracking service.

Free tracking audit

Does GA4 revenue never quite match your store backend?

We will compare GA4, your ad platforms and your order data line by line and show you exactly where revenue goes missing. You get a fix list, not a sales pitch.

Book your free audit

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top