Free SEO audit for new clients — claim yours
Home/Blog/Analytics/GA4 Ecommerce Tracking: Setup and Key Reports
Analytics

GA4 Ecommerce Tracking: Setup and Key Reports

GA4 Ecommerce Tracking: Setup and Key Reports
Table of contents
  1. Key Takeaways
  2. How GA4 ecommerce tracking works
  3. The items array and required parameters
  4. Implementation options
  5. Step-by-step setup with Google Tag Manager
  6. Key ecommerce reports in GA4
  7. Common mistakes in GA4 ecommerce tracking
  8. Related Guides
  9. Frequently Asked Questions
    1. Does GA4 track ecommerce automatically?
    2. Why does GA4 revenue not match my Shopify or WooCommerce revenue?
    3. What is the items array in GA4?
    4. Do I need Google Tag Manager for GA4 ecommerce?
    5. How do I track refunds in GA4?
  10. Conclusion
  11. References

For an online store, analytics without ecommerce tracking is like a shop counter without a till. You can see people walking in, but not what they looked at, what they put in the basket or what they actually bought. Google Analytics 4 does not collect that information automatically; you have to send it.

This guide explains how GA4 ecommerce tracking works, which events and parameters to send, the main ways to implement it on Shopify, WooCommerce and custom stores, how to test it, and which reports to use once data is flowing. It is written for store owners and marketers who need accurate revenue data, not just developers.

New to GA4's event model? Start with our explainer on GA4 events, then come back here.

Key Takeaways

  • GA4 ecommerce relies on recommended events such as view_item, add_to_cart, begin_checkout and purchase.
  • Each event should carry an items array with consistent item IDs, names, prices and quantities.
  • Purchases need a unique transaction_id, and if you send value you must also send currency.
  • Use a platform integration or a Google Tag Manager data layer rather than hand-coding events page by page.
  • Reconcile GA4 revenue against your store's back end regularly; small gaps are normal, large ones are not.

How GA4 ecommerce tracking works

GA4 treats everything as an event. Ecommerce tracking means sending a defined set of recommended events at each stage of the shopping journey, with product details attached. Google's developer guide to measuring ecommerce covers selecting items from lists, viewing item details, adding and removing cart items, starting checkout, purchases, refunds and promotions.

Shopping stageEventWhen it fires
Browsing listsview_item_list, select_itemCategory or search results viewed; product clicked
Product pageview_itemProduct detail page viewed
Basketadd_to_cart, remove_from_cart, view_cartCart changes and cart page views
Wishlistadd_to_wishlistItem saved for later
Checkoutbegin_checkout, add_shipping_info, add_payment_infoCheckout started and each step completed
OrderpurchaseOrder confirmed
After salerefundFull or partial refund issued
Promotionsview_promotion, select_promotionInternal banners seen or clicked

The items array and required parameters

The items array is where product data lives. Each item can include item_id, item_name, item_brand, item_category (up to item_category5), item_variant, price, quantity, coupon and more. Keep IDs identical across every event so GA4 can join the journey together.

Two rules trip up many stores. First, Google's sample purchase code marks the transaction ID as required for purchases and refunds. Second, value and currency go together:

“If you set value then currency is required for revenue metrics to be computed accurately.”

— Google for Developers, Recommended events reference

A minimal purchase event through the data layer looks like this:

dataLayer.push({ ecommerce: null });
dataLayer.push({
event: "purchase",
ecommerce: {
transaction_id: "T_10421",
value: 84.50,
tax: 7.04,
shipping: 4.99,
currency: "GBP",
coupon: "AUTUMN10",
items: [{
item_id: "SKU_1234",
item_name: "Merino Crew Jumper",
item_category: "Knitwear",
item_variant: "Navy",
price: 39.75,
quantity: 2
}]
}
});

Clearing the previous ecommerce object first prevents data from one event leaking into the next.

Implementation options

PlatformTypical approachWatch out for
ShopifyGoogle & YouTube app or a custom pixel feeding GTMCheckout runs in a restricted environment; test purchase events carefully
WooCommerceA GA4 integration plugin or a GTM data layer pluginDuplicate tags if a theme or Site Kit also sends GA4
Custom or headless storeDeveloper-built data layer plus GTMSingle-page apps need virtual page views and careful event timing
Marketplace or hosted checkoutServer-side or Measurement Protocol for purchasesCross-domain tracking and session continuity

If you are still deciding on a platform, our comparison of Shopify vs WooCommerce covers tracking flexibility among other factors. WordPress stores should also follow our GA4 WordPress setup guide to avoid double tagging.

Step-by-step setup with Google Tag Manager

  1. Plan the events you need and document item parameters in a simple tracking plan.
  2. Get a data layer in place, either from a platform plugin or from your developer, pushing the events above.
  3. Create a GA4 Event tag in GTM for each ecommerce event (or one tag using the event name variable) and tick the option to send ecommerce data from the data layer.
  4. Create Custom Event triggers matching each event name.
  5. Preview and test with GTM Preview and GA4 DebugView, completing a real test order.
  6. Mark purchase as a key event in GA4 if it is not already; see GA4 key events.
  7. Publish, then reconcile GA4 orders and revenue against your store admin after a week.

Our Google Tag Manager guide explains containers, variables and preview mode if any of those steps are unfamiliar.

Key ecommerce reports in GA4

Once events flow, GA4's Ecommerce purchases report shows performance by item name, ID, brand and category, with metrics such as items viewed, items added to cart, items purchased and item revenue. Google notes these events are not collected automatically. Other useful places to look:

  • Monetization overview: total revenue, purchasers and average purchase revenue at a glance.
  • Checkout journey and purchase journey: where shoppers drop out between steps. Pair with our guide to checkout optimisation.
  • Promotions and order coupons: which banners and discount codes actually drive sales.
  • Traffic acquisition with revenue: which channels bring buyers, not just visitors.
  • Explorations: build funnels and product-level analysis; see GA4 explorations.

Common mistakes in GA4 ecommerce tracking

  • Duplicate purchases. The thank-you page reloads or is revisited and fires purchase again. Always send a unique transaction ID.
  • Missing currency. Revenue appears as zero or is miscalculated when value is sent without currency.
  • Inconsistent item IDs. Using SKU on one event and product name on another breaks product reports.
  • Tracking only purchase. Without the funnel events you cannot see where shoppers drop out.
  • Counting your own test orders. Exclude staff traffic with our guide to excluding internal traffic in GA4.
  • Expecting a perfect match with the store. Ad blockers and consent choices mean GA4 will usually show fewer orders than your back end.

Frequently Asked Questions

Does GA4 track ecommerce automatically?

No. Enhanced measurement collects page views, scrolls and similar interactions, but ecommerce events such as add_to_cart and purchase must be implemented.

Why does GA4 revenue not match my Shopify or WooCommerce revenue?

Consent choices, ad blockers, refunds, taxes and shipping settings and duplicate or missing purchase events all cause gaps. Investigate if the difference is large or suddenly changes.

What is the items array in GA4?

It is a list of products attached to an ecommerce event. Each item carries details such as item ID, name, category, price and quantity.

Do I need Google Tag Manager for GA4 ecommerce?

Not always. Some platform integrations send the events directly. GTM gives more control and makes it easier to add other tags such as ads conversions.

How do I track refunds in GA4?

Send a refund event with the original transaction ID. For partial refunds, include the refunded items and quantities.

Conclusion

Accurate GA4 ecommerce tracking turns your analytics from a traffic counter into a revenue tool. Send the full set of recommended events with clean item data, test with real orders and reconcile regularly. Then use the reports to fix leaky funnels and invest in the products and channels that sell. If you want help growing online sales on top of solid data, see our ecommerce SEO services or get a quote.

References

  1. Google for Developers: Measure ecommerce
  2. Google for Developers: Recommended events reference
  3. Google Analytics Help: Ecommerce purchases report
  4. Google Analytics Help: Monitor events in DebugView
  5. Google Analytics Help: About key events
Rohit Choudhary
Written byRohit ChoudharyCo-Founder, My SEO Experts

Rohit Choudhary is the co-founder of My SEO Experts and has more than 14 years of hands-on experience in SEO, paid advertising and digital marketing. Since starting out in 2011 he has helped hundreds of businesses grow through practical, data-driven search strategies, and he also serves as a consulting Digital Marketing Director for several US-based companies.

Keep reading

Related articles

Bot Traffic in Analytics: How to Spot and Filter It
Analytics

Bot Traffic in Analytics: How to Spot and Filter It

Spam bots, scrapers and headless browsers inflate traffic and distort conversion rates. This guide shows how to recognise bot traffic in GA4, what Google filters for you, and how to clean your reports and protect your forms.

Email Open Rates After Apple Mail Privacy: What to Measure Instead
Analytics

Email Open Rates After Apple Mail Privacy: What to Measure Instead

Apple Mail Privacy Protection preloads tracking pixels, so open rates now overstate engagement and break open-based automations. This guide explains what an open means today and which metrics, tests and hygiene rules to use instead.

Ready to grow your business online?

Get a free, no-obligation proposal tailored to your goals and budget.

CallFree Quote