• Home
  • Blog
  • Ecommerce
  • GA4 Ecommerce Tracking with Google Tag Manager: Complete Setup Guide

GA4 Ecommerce Tracking with Google Tag Manager: Complete Setup Guide

Last updated on 14 Nov 2026
GA4 ecommerce: the purchase steps of an online store flowing into an analytics dashboard
Your store’s back office shows $15,000 in sales this month, GA4 only sees $9,000, and Google Ads optimizes your campaigns on that wrong number. It is the most common scenario when ecommerce tracking was set up in a hurry years ago and never checked since. Properly configured GA4 ecommerce tracking changes how you run a store.

This guide covers GA4 ecommerce tracking end to end: the GA4 ecommerce events Google recommends, the data layer, setup with Google Tag Manager, options for WooCommerce, PrestaShop and Shopify, testing, consent and reports. A quick audit tells you whether your current tracking is reliable.

At a glance

  • GA4 ecommerce tracking relies on events recommended by Google: view_item, add_to_cart, begin_checkout, purchase and more.
  • The store pushes product data into the data layer, which Google Tag Manager sends to GA4.
  • The purchase event must include a unique transaction_id, the value, the currency and the list of items.
  • WooCommerce, PrestaShop and Shopify have plugins or integrations, to be checked before you rely on them.
  • Reliable tracking is tested in Tag Manager preview and GA4 DebugView, then compared with the back office.

GA4 and GTM: who does what?

GA4: Google Analytics 4

Google Analytics 4 is Google’s analytics tool. It records events (page views, clicks, purchases) and turns them into reports: traffic, journeys, revenue by product or channel.

GTM: Google Tag Manager

Google Tag Manager is a tag manager: it lets you install and control measurement tags (GA4, Google Ads, Meta…) without editing the site code each time. For ecommerce, it reads the information the store exposes and sends it to GA4 at the right moment.

How GA4 ecommerce works

The GA4 ecommerce schema

GA4 measures ecommerce with events whose names and parameters are defined by Google. Each event carries an items array describing the products involved (ID, name, price, quantity, brand, category…). According to Google’s documentation, the array can hold up to 200 elements, and each item needs at least an item_id or an item_name.

GA4 event When to send it Key parameters
view_item_list A product list is shown (category, search) item_list_name, items
select_item A product is clicked in a list item_list_name, items
view_item A product page is viewed currency, value, items
add_to_cart Item added to cart currency, value, items
remove_from_cart Item removed from cart currency, value, items
view_cart Cart viewed currency, value, items
begin_checkout Checkout started currency, value, coupon, items
add_shipping_info Shipping method chosen shipping_tier, items
add_payment_info Payment method chosen payment_type, items
purchase Order confirmed transaction_id, value, currency, tax, shipping, items
refund Refund issued transaction_id, value, currency
The main ecommerce events Google recommends for GA4.

The data layer

The store must publish ecommerce information in the data layer, a JavaScript object read by Google Tag Manager. Simplified example for an add to cart:

dataLayer.push({ ecommerce: null });
dataLayer.push({
  event: "add_to_cart",
  ecommerce: {
    currency: "USD",
    value: 49.90,
    items: [{ item_id: "SKU-123", item_name: "Desk lamp", price: 49.90, quantity: 1 }]
  }
});

The first line clears the previous ecommerce object, so an event does not inherit the products of the one before. The exact code depends on your platform: with WooCommerce, PrestaShop or Shopify, a plugin can generate it for you.

GA4 ecommerce setup: the store's data layer passed by Google Tag Manager to Google Analytics 4

Setting up GA4 ecommerce with Google Tag Manager

  1. Check prerequisites: a GA4 property, a Google Tag Manager container on every page and the Google tag configured with your measurement ID.
  2. Implement the data layer: by the store developer or a plugin, for each ecommerce event in the table above.
  3. Create triggers: one “Custom event” trigger per event name (view_item, add_to_cart, purchase…), or a single trigger with a regular expression.
  4. Create the GA4 event tag: event name taken from the data layer and “Send ecommerce data” enabled, with the data layer as source.
  5. Test with Tag Manager preview mode and GA4 DebugView: each step of the journey must send the expected event with its items.
  6. Publish the container, then check the reports after 24 to 48 hours.

GA4 ecommerce on WooCommerce, PrestaShop and Shopify

WooCommerce

Several plugins generate the WooCommerce ecommerce data layer and make sending to GA4 and Google Tag Manager easier. Check that they cover every event (including checkout) and do not duplicate a GA4 tag already installed elsewhere.

PrestaShop

PrestaShop offers official and third-party modules for Google Analytics 4. Check the module version, its compatibility with your PrestaShop version and that the purchase event fires on the confirmation page, often the most fragile. See also our guide on how to install PrestaShop.

Shopify

Shopify sends ecommerce events to GA4 through its Google integration and supports custom tracking through pixels. Since Shopify manages checkout, the method differs from a classic site: follow the platform documentation rather than a homemade data layer.

Are your campaigns built on reliable conversions? See our PPC management services

Is your GA4 ecommerce tracking reliable?

Check what is in place on your store
Is your GA4 ecommerce tracking reliable? 10-point quick audit (indicative, nothing is saved)

Testing and checking your tracking

Test ecommerce tracking like a checkout: place a test order yourself, from the product list to the confirmation.

  • Google Tag Manager preview: each step must fire the right tag with the right data.
  • GA4 DebugView: events appear in real time with their parameters and items.
  • Back-office comparison: over a week, compare GA4 orders and revenue with the store. A gap is normal (declined consent, ad blockers), but it should stay stable and explainable.
  • Duplicate orders: reloading the confirmation page must not create a second purchase; the transaction_id exists precisely to prevent duplicates.

In Europe, GA4 ecommerce tracking must respect visitor consent. Google Consent Mode v2 passes the visitor’s choice to tags: if the visitor declines, GA4 receives limited cookieless signals used for modeling. It is required to keep using Google’s advertising features in Europe. The cookie banner remains mandatory. To recover part of the data lost in the browser, server side tagging is the next step.

Testing GA4 ecommerce tracking: test order, real-time check and comparison with sales

GA4 ecommerce reports

Once data flows in, GA4’s “Monetization” section reports on purchases, top-selling items, the purchase journey and revenue by channel. Explorations go further: custom conversion funnels, cart abandonment by step, device comparisons. To pick the right metrics, see our articles on ecommerce KPIs and ecommerce conversion rate.

Common mistakes

  • purchase sent twice (page reload, duplicate tag).
  • Missing currency: without currency, the value is ignored.
  • Inconsistent tax-inclusive or tax-exclusive values between events.
  • ecommerce object not cleared between events.
  • GA4 tag installed twice (theme, plugin and Tag Manager).
  • No comparison with real sales.

Conclusion: ecommerce data you can trust

Reliable GA4 ecommerce tracking rests on three things: events that follow Google’s schema, a clean data layer and regular tests against real sales. It underpins every decision that follows, from ad budgets to which products you promote. Our advice: start by making purchase and add_to_cart reliable, then complete the rest of the journey.

Frequently asked questions about GA4 ecommerce tracking with Google Tag Manager

What is the difference between Google Analytics 4 and Google Tag Manager?

GA4 is the analytics tool that stores data and produces reports. Google Tag Manager installs and fires tags, including the GA4 tag, without editing the site code. For ecommerce, GTM reads the store’s data and sends it to GA4.

Which ecommerce events should you track in GA4?

At minimum view_item, add_to_cart, begin_checkout and purchase, which cover the main journey. Add view_item_list, select_item, view_cart, add_shipping_info, add_payment_info and refund for a full funnel analysis. These are Google’s recommended names and must be used exactly.

What is the ecommerce data layer?

It is a JavaScript object in which the store publishes product and order information at each step. Google Tag Manager reads it and forwards it to GA4. It is generated by the store developer or a plugin.

How do you check that GA4 ecommerce tracking works?

Place a test order through the full journey and check each event in Tag Manager preview and GA4 DebugView. Then compare GA4 orders and revenue with the store back office over a week.

Is Consent Mode v2 required for GA4 ecommerce tracking?

It is required in Europe to keep using Google’s advertising features, such as remarketing and Google Ads conversion measurement. It passes the visitor’s choice to tags. It does not replace the cookie banner, which remains mandatory.

Can Shopify, WooCommerce and PrestaShop send ecommerce data to GA4 without GTM?

Yes. Shopify has a Google integration, and WooCommerce and PrestaShop have plugins that send events to GA4. Google Tag Manager remains useful to keep control of tags, add Google Ads or Meta and precisely manage the data sent.

Sources