---
title: "GA4 e-commerce tracking with Google Tag Manager: setup"
canonical: "https://www.owox.com/blog/articles/ecommerce-google-analytics4"
updated: "2026-10-07"
---

# E-commerce tracking in Google Analytics 4 with Google Tag Manager

E-commerce tracking in Google Analytics 4 is a set of recommended events, from view\_item to purchase, each sent with an items array. This guide covers what changed from Enhanced Ecommerce in Universal Analytics, the events to implement, the data layer push, the Google Tag Manager tag and trigger, testing, the common errors, and how to get exact funnel and product numbers from the BigQuery export.

[GA4](/blog/topics/ga4) · Updated October 7, 2026 · [Alyona Samovar](/team/alyona-samovar) · 8 min read

![E-commerce tracking in Google Analytics 4 with Google Tag Manager](https://cdn.owox.ai/www/webflow/69e8cf981bf3204c36110967_SET-UP-ENHANCED-E-COMMERCE-TRACKING-IN-GA4.png/public)

**E-commerce tracking in Google Analytics 4 is a set of recommended events, such as `view_item`, `add_to_cart` and `purchase`, each sent with an `items` array that describes the products.** There is no “Enhanced Ecommerce” switch to turn on, as there was in Universal Analytics. If your site pushes the events to the data layer in Google’s format, one tag in Google Tag Manager forwards them, and the e-commerce reports fill in.

This guide covers the events, the data layer code, the GTM setup, testing, the errors that cause most wrong numbers, and what to do when the GA4 reports are not exact enough to reconcile with your shop system.

## Enhanced Ecommerce in GA4: what changed

If you are looking for Enhanced Ecommerce in GA4, this is it under a different name. Three things changed from Universal Analytics:

|  | Universal Analytics | Google Analytics 4 |
| --- | --- | --- |
| Activation | Enable Ecommerce and Enhanced Ecommerce in the view settings | Nothing to enable. Reports fill when the events arrive |
| Data model | Hits with an `ecommerce` object per action type | Events with parameters and an `items` array |
| Naming | `productClick`, `addToCart`, `checkout`, `purchase` | `select_item`, `add_to_cart`, `begin_checkout`, `purchase` |

An old Universal Analytics data layer does not work as it is. The event names and the structure of the product array are different, so the site code has to change, not only the tags.

## Which e-commerce events to track

Google’s developer guide groups the recommended events by step ([Measure ecommerce](https://developers.google.com/analytics/devguides/collection/ga4/ecommerce), checked October 2026):

| Step | Events |
| --- | --- |
| Product lists | `view_item_list`, `select_item` |
| Product page | `view_item` |
| Cart | `add_to_cart`, `remove_from_cart`, `view_cart`, `add_to_wishlist` |
| Checkout | `begin_checkout`, `add_shipping_info`, `add_payment_info` |
| Order | `purchase`, `refund` |
| Promotions | `view_promotion`, `select_promotion` |

**Start with four: `view_item`, `add_to_cart`, `begin_checkout`, `purchase`.** They give you the funnel and the revenue. Add the list, promotion and shipping events when someone has a question that needs them. Every extra event is code to maintain.

## The Turning Point

OWOX Data Marts

See your first report built in real time. _15 minutes._

1.  Connect your data warehouse
2.  Pick your metrics
3.  Get a live Google Sheets report

In the time it takes to write a ticket. Then imagine never writing that ticket again.

[Book a Demo](/book-a-call)

We'll use your actual use case

## Step 1. Push the events to the data layer

This is developer work on the site. Each action pushes an object with an `event` name and an `ecommerce` object. Google’s example for a purchase, shortened to one item:

```
dataLayer.push({ ecommerce: null });
dataLayer.push({
  event: "purchase",
  ecommerce: {
    transaction_id: "T_12345",
    value: 72.05,
    tax: 3.60,
    shipping: 5.99,
    currency: "USD",
    coupon: "SUMMER_SALE",
    items: [
      {
        item_id: "SKU_12345",
        item_name: "Stan and Friends Tee",
        item_brand: "Google",
        item_category: "Apparel",
        item_variant: "green",
        price: 10.01,
        quantity: 3
      }
    ]
  }
});
```

Four rules that prevent most problems:

*   **Clear the object first.** The line `dataLayer.push({ ecommerce: null })` removes the previous `ecommerce` object. Without it, items from an earlier event can leak into the next one.
*   **`transaction_id` must be unique and never empty.** GA4 uses it to deduplicate purchases. The details are in [duplicate transactions in GA4](/blog/articles/duplicate-transactions-in-google-analytics).
*   **`value` is the sum of price times quantity of the items,** as Google’s example notes, and `currency` is required with it.
*   **Use the same `item_id` everywhere,** from the list view to the purchase, or product reports will split one product into several.

## Step 2. Create the tag in Google Tag Manager

You need the Google tag already on the site. If it is not, start with [how to install Google Tag Manager](/blog/articles/how-to-install-gtm) and [GA4 tags in GTM](/blog/articles/set-up-ga4-tags-using-gtm).

**One tag can serve all e-commerce events.**

1.  Create a tag of the type **Google Analytics: GA4 Event** and enter your measurement ID.
2.  In **Event Name**, choose the built-in variable `{{Event}}`. The tag then sends whatever event name the data layer pushed.
3.  Open **More Settings**, then **Ecommerce**, tick **Send Ecommerce data**, and choose **Data Layer** as the data source.

![GTM GA4 Event tag with More Settings expanded: Send Ecommerce data is ticked and the data source is Data Layer. This one option forwards the whole ecommerce object.](https://cdn.owox.ai/www/webflow/679afdce2c25aad9f09a5f37_47065.png/public)

Google’s guide describes this option as an alternative to mapping each parameter by hand with data layer variables. Use the manual mapping only if your data layer differs from Google’s structure.

4.  Add a trigger of the type **Custom Event**. Tick **Use regex matching** and list the events you implemented:

```
view_item|add_to_cart|begin_checkout|purchase
```

![GTM trigger of the type Custom Event with an event name field and a Use regex matching checkbox. With regex matching, one trigger covers every e-commerce event.](https://cdn.owox.ai/www/webflow/679afdcf3d1cfbd62f040e1e_47073.png/public)

5.  Save the tag. Do not publish yet.

## Step 3. Test before you publish

1.  Click **Preview** in GTM and open your site in the debug window.
2.  View a product, add it to the cart, start the checkout and complete a test order.
3.  In the GTM debug panel, check that the tag fired once for each action and that the `items` array is filled.
4.  In GA4, open **Admin**, then **DebugView**, and check that the same events arrive with their parameters.

![GA4 DebugView with a timeline of events for one debug device, including page\_view and session\_start. Each event can be opened to see its parameters.](https://cdn.owox.ai/www/webflow/679afdd05b59f3e985c13633_47057.png/public)

Then publish the container. The e-commerce reports under **Reports**, **Monetization** fill within a day or two. GA4 treats `purchase` as a key event by default; the other events can be marked as key events under Admin, Events.

## Common problems and their causes

| Symptom | Usual cause |
| --- | --- |
| No data in the Monetization reports | The tag never fires: event name in the trigger does not match the data layer exactly |
| Revenue is zero or missing | `value` or `currency` is absent, or `value` is sent as text with a currency symbol |
| Items show as (not set) | The `items` array is empty, or `item_id` and `item_name` are both missing |
| Purchases are counted twice | The confirmation page was reloaded and `transaction_id` is missing or not unique |
| Purchases are missing | The tag fires after the page redirects, or consent was not granted |
| Wrong items in an event | The `ecommerce` object was not cleared before the push |
| One product appears as several | `item_id` differs between events, or the name changes with the variant |

How (not set) arises is covered in [what (not set) means in GA4](/blog/articles/not-set-in-google-analytics).

## Refunds

Send a `refund` event with the `transaction_id` of the original order. For a partial refund, include the refunded items and quantities. Most shops process refunds in a back office, not in the browser, so this event is usually sent from the server with the [GA4 Measurement Protocol](/blog/articles/ga4-measurement-protocol).

Be realistic about it. Refund tracking in GA4 is rarely complete, and GA4 is not the system of record for money.

## Where GA4 e-commerce reports stop

The setup above gives a marketing team what it needs for day-to-day work: funnel steps, product views, revenue by channel. An analyst who has to reconcile it with the shop system meets the limits quickly:

*   **GA4 revenue is what the browser reported.** Blocked scripts, declined consent and closed tabs remove purchases. Orders by phone or marketplace never appear.
*   **Reports can be sampled or thresholded,** and distinct counts are estimates, as described in [data sampling in GA4](/blog/articles/data-sampling-in-ga4).
*   **Product cost, margin and stock are not in GA4.** Revenue by product is there. Profit by product is not.
*   **Returns arrive late or not at all.**
*   **Explorations keep event-level data for 14 months at most** on a standard property.

None of this is a reason to skip the setup. It is the reason the GA4 number and the finance number differ, and why nobody should try to make them equal inside GA4.

## Exact funnel and product numbers from BigQuery

GA4’s native BigQuery export contains every e-commerce event with its `items` array. The funnel is then a query, counted from all events. This one runs as written on Google’s public GA4 sample:

```
SELECT
  event_name,
  COUNT(*) AS events,
  COUNT(DISTINCT user_pseudo_id) AS users
FROM
  `bigquery-public-data.ga4_obfuscated_sample_ecommerce.events_*`
WHERE _TABLE_SUFFIX BETWEEN '20210101' AND '20210131'
  AND event_name IN (
    'view_item', 'add_to_cart', 'begin_checkout',
    'add_shipping_info', 'add_payment_info',
    'purchase')
GROUP BY event_name
ORDER BY users DESC
```

| event\_name | events | users |
| --- | --- | --- |
| view\_item | 86,971 | 19,629 |
| add\_to\_cart | 15,522 | 3,832 |
| begin\_checkout | 11,034 | 1,924 |
| add\_shipping\_info | 3,952 | 1,924 |
| add\_payment\_info | 2,841 | 1,395 |
| purchase | 1,204 | 1,069 |

Product revenue comes from unnesting the items of the purchase events:

```
SELECT
  item.item_name,
  SUM(item.quantity) AS units,
  ROUND(SUM(item.item_revenue), 2)
    AS item_revenue
FROM
  `bigquery-public-data.ga4_obfuscated_sample_ecommerce.events_*`,
  UNNEST(items) AS item
WHERE _TABLE_SUFFIX BETWEEN '20210101' AND '20210131'
  AND event_name = 'purchase'
GROUP BY item.item_name
ORDER BY item_revenue DESC
```

The first row on the sample is Google Crewneck Sweatshirt Green, 78 units and 3,542 in revenue. Linking a property is covered in [connecting GA4 to BigQuery](/blog/articles/google-analytics-4-to-bigquery-guide), and the query patterns in [how to query GA4 event data in BigQuery](/blog/articles/query-ga4-event-data-in-bigquery).

The larger gain is what you can join. In the warehouse the GA4 events sit next to the orders from the shop system, with their real totals, refunds and costs, and next to ad spend. GA4 tells you which session and source led to an order; the shop system tells you what the order was worth.

## From tracking to a model the business can use

Those joins are where an e-commerce team’s recurring questions live: revenue and margin by channel, repeat purchase by first product, what a customer from each paid channel costs and brings back. Answering them once is a query. Answering them every week, the same way, for people who do not write SQL, is a different job.

[OWOX Data Marts](https://www.owox.com/app-signup) is built for that job. An analyst defines the entities, such as orders, purchases, customers, sessions and traffic sources, as Data Marts on the warehouse, with SQL they wrote and descriptions the business can read. Reports on them are delivered to Google Sheets or Data Studio (the former Looker Studio) on a schedule. The [E-commerce Data Model](/data-models/e-commerce) is a ready structure of such Data Marts to start from.

The honest boundaries: OWOX Data Marts does not track anything on your site and has no GA4 connector. The GA4 events reach your warehouse through Google’s own export, orders can be loaded from Shopify, and ad spend from the ad platforms. The SQL that turns events into sessions and orders into revenue is the analyst’s. The product publishes it, runs it on a schedule and keeps one definition in use.

## Your New Normal

Turn your data into decisions.

Governed data marts give you the clean foundation ML needs to actually work.

*   No AI hallucinations
*   Analyst-governed definitions
*   Every number traces to SQL

[Get started free](https://www.owox.com/app-signup)

## FAQ

## Frequently Asked Questions

Why is GA4 e-commerce revenue missing or wrong?

The usual causes are a missing value or currency parameter, a value sent as text, an empty items array, a purchase tag that fires twice or not at all, and an ecommerce object that was not cleared before the push. Check the event in GTM preview mode and in GA4 DebugView.

How do I set up e-commerce tracking in Google Analytics 4?

Have the site push Google's recommended e-commerce events, such as view\_item, add\_to\_cart, begin\_checkout and purchase, to the data layer with an items array. In Google Tag Manager, create one GA4 Event tag with the event name {{Event}} and Send Ecommerce data set to Data Layer, triggered by a Custom Event trigger that lists those events. Test in preview mode and DebugView, then publish.

Does enhanced measurement in GA4 track e-commerce?

No. Enhanced measurement collects page views, scrolls, outbound clicks, site search, video engagement, file downloads and form interactions. E-commerce events are not part of it and have to be implemented on the site.

Why does GA4 revenue differ from my shop system?

GA4 records what the browser reported. Blocked scripts, declined consent and closed tabs remove purchases, phone and marketplace orders never arrive, and refunds are often incomplete. The shop system is the record for money; GA4 connects orders to sessions and traffic sources.

Which e-commerce events should I track in GA4?

Start with view\_item, add\_to\_cart, begin\_checkout and purchase, which give the funnel and the revenue. Add view\_item\_list, select\_item, add\_shipping\_info, add\_payment\_info, refund and the promotion events when a question needs them.

What is the difference between Enhanced Ecommerce in Universal Analytics and e-commerce in GA4?

Universal Analytics used hits with an ecommerce object per action type and names such as productClick and addToCart. GA4 uses events with parameters and an items array, with names such as select\_item and add\_to\_cart. A Universal Analytics data layer has to be rewritten for GA4.

How do I enable Enhanced Ecommerce in Google Analytics 4?

There is nothing to enable. GA4 has no Enhanced Ecommerce setting; its e-commerce reports fill in when the recommended events arrive with an items array.

## Who wrote this

![Alyona Samovar](https://cdn.owox.ai/www/webflow/6799099d337aa8a997b03b56_Alyona-Samovar.png/public)

[Alyona Samovar](/team/alyona-samovar) · Senior Digital Analyst

Alyona Samovar is a Senior Digital Analyst who spent years at OWOX helping enterprise clients design analytics systems, build BigQuery reporting pipelines, and optimize marketing measurement. She specializes in SQL-based analytics, data modeling, and turning raw marketing data into actionable insights. Alyona writes about practical analytics workflows, BigQuery best practices, and data-driven decision-making.

[GA4](/blog/topics/ga4)

## Related articles

[Marketing Analytics · Google Analytics for mobile apps: a GA4 and Firebase guide · October 14, 2026](/blog/articles/guide-to-mobile-app-analytics)

[GA4 · Google Analytics 4 checklist and best practices · November 28, 2023](/blog/articles/google-analytics-ga4-checklist-and-best-practices)

[GA4 · GA4 Measurement Protocol: what it is and how to use it · October 3, 2023](/blog/articles/ga4-measurement-protocol)

[See all articles →](/blog/articles)

## Book a call

You are booked. The invitation is on its way to , with the calendar invite and the meeting link.

[Reschedule](#)

[Cancel](#)

## Links

Pages this page links to, on this site and on docs.owox.com. Where the page has a Markdown twin, its address follows the link.

- [GA4](https://www.owox.com/blog/topics/ga4) — /blog/topics/ga4.md
- [Alyona Samovar](https://www.owox.com/team/alyona-samovar) — /team/alyona-samovar.md
- [Book a Demo](https://www.owox.com/book-a-call) — /book-a-call.md
- [duplicate transactions in GA4](https://www.owox.com/blog/articles/duplicate-transactions-in-google-analytics) — /blog/articles/duplicate-transactions-in-google-analytics.md
- [how to install Google Tag Manager](https://www.owox.com/blog/articles/how-to-install-gtm) — /blog/articles/how-to-install-gtm.md
- [GA4 tags in GTM](https://www.owox.com/blog/articles/set-up-ga4-tags-using-gtm) — /blog/articles/set-up-ga4-tags-using-gtm.md
- [what (not set) means in GA4](https://www.owox.com/blog/articles/not-set-in-google-analytics) — /blog/articles/not-set-in-google-analytics.md
- [GA4 Measurement Protocol](https://www.owox.com/blog/articles/ga4-measurement-protocol) — /blog/articles/ga4-measurement-protocol.md
- [data sampling in GA4](https://www.owox.com/blog/articles/data-sampling-in-ga4) — /blog/articles/data-sampling-in-ga4.md
- [connecting GA4 to BigQuery](https://www.owox.com/blog/articles/google-analytics-4-to-bigquery-guide) — /blog/articles/google-analytics-4-to-bigquery-guide.md
- [how to query GA4 event data in BigQuery](https://www.owox.com/blog/articles/query-ga4-event-data-in-bigquery) — /blog/articles/query-ga4-event-data-in-bigquery.md
- [OWOX Data Marts](https://www.owox.com/app-signup)
- [E-commerce Data Model](https://www.owox.com/data-models/e-commerce) — /data-models/e-commerce.md
- [Marketing Analytics · Google Analytics for mobile apps: a GA4 and Firebase guide · October 14, 2026](https://www.owox.com/blog/articles/guide-to-mobile-app-analytics) — /blog/articles/guide-to-mobile-app-analytics.md
- [GA4 · Google Analytics 4 checklist and best practices · November 28, 2023](https://www.owox.com/blog/articles/google-analytics-ga4-checklist-and-best-practices) — /blog/articles/google-analytics-ga4-checklist-and-best-practices.md
- [See all articles →](https://www.owox.com/blog/articles) — /blog/articles.md
