← Guides·Google Analytics 4

Google Analytics 4

GA4 ecommerce tracking: how to enable it and set it up

How to enable ecommerce in GA4: the recommended events, a purchase event example, where the data shows up and how to check it against your backend.

Rafael CampoamorDigital Marketing Freelancer
4 min read · 1024 words

TL;DR GA4 has no ecommerce switch to turn on. Ecommerce reports fill up when your site sends the recommended ecommerce events, from view_item to purchase, with an items array and the right parameters. Set them up through the dataLayer and GTM, or your platform's integration, check them in DebugView, and watch them after every release: most ecommerce data breaks quietly.

Infographic presenting the GA4 E-Commerce Analytics Journey, including global reach and real-time data, with icons for search insights, communication channels, actionable reports, and achieving business goals.

How to enable ecommerce in Google Analytics 4

Universal Analytics had an "Enable Ecommerce" setting. GA4 does not. A GA4 property shows ecommerce data as soon as it receives ecommerce events with product data, so enabling ecommerce means implementing those events:

  1. Create the property and a web data stream, and install the Google tag, directly or through Google Tag Manager. The GA4 setup guide covers this step.
  2. Choose how events reach GA4. Shopify, WooCommerce and most ecommerce platforms have an integration that sends the standard events for you. A custom store pushes them to the dataLayer and sends them with GTM.
  3. Push the ecommerce events to the dataLayer at each step of the funnel, with an items array (see the example below).
  4. Send them to GA4. In GTM, a GA4 event tag per event, with the ecommerce option that reads the data from the dataLayer turned on.
  5. Validate in DebugView before publishing, then check the Monetization reports after 24 to 48 hours.

The GA4 ecommerce events

Google's ecommerce measurement guide lists the recommended events. The ones most stores need:

Funnel stepEventWhat it carries
Product listview_item_list, select_itemThe list and the products in it
Product pageview_itemThe product viewed
Cartadd_to_cart, remove_from_cart, view_cartThe products and their quantity
Checkoutbegin_checkout, add_shipping_info, add_payment_infoThe cart, plus shipping tier and payment type
Orderpurchasetransaction_id, value, currency, tax, shipping and the items
After the orderrefundThe transaction_id of the order refunded
Promotionsview_promotion, select_promotionThe promotion and its creative

Use the names exactly as Google writes them. A Purchase or an order_complete event is a custom event, and it never reaches the Monetization reports.

A purchase event, step by step

The site pushes the order to the dataLayer on the confirmation page:

window.dataLayer = window.dataLayer || [];
window.dataLayer.push({ ecommerce: null });  // clear the previous ecommerce object
window.dataLayer.push({
  event: "purchase",
  ecommerce: {
    transaction_id: "T-10482",
    value: 129.90,
    tax: 22.54,
    shipping: 4.95,
    currency: "EUR",
    items: [{
      item_id: "SKU-2231",
      item_name: "Trail running shoes",
      item_brand: "Example",
      item_category: "Footwear",
      price: 124.95,
      quantity: 1
    }]
  }
});

Three rules prevent most revenue errors:

Where ecommerce data shows up in GA4

Once the events arrive, the Monetization section of Reports fills in:

For questions the standard reports do not answer, such as revenue by landing page for organic traffic, build an exploration: GA4 custom reports explains how.

How to check that ecommerce tracking is right

Step-by-step visual guide on setting up e-commerce tracking with GA4, detailing the establishment of a property, code integration, e-commerce tracking activation, data stream setup, and tracking validation.

Before release, go through the funnel in GTM preview mode and open DebugView in GA4: each event should appear once, with its parameters and items. After release, compare GA4 with the source of truth for orders, your backend:

The last check is the one a one-time setup misses. A release renames a dataLayer key, a checkout redesign drops the purchase push, a consent change blocks the tag on one market, and the reports keep rendering with less revenue in them. Trackingplan watches the ecommerce events on real traffic, learns their normal volumes and properties, and alerts the team that owns them when a purchase loses its currency, its items or its volume. For the checks to run on every conversion, see how to validate conversion tracking.

Using the data

Comparative infographic showing revenue optimization for e-commerce before and after implementing GA4, with focus areas for improving traffic, conversion, browsing behavior, and reducing cart abandonment.

With the events in place, the reports answer the questions stores ask most:

Frequently asked questions

How do I enable ecommerce in Google Analytics 4?

There is no setting to turn on. Send the recommended ecommerce events, such as view_item, add_to_cart, begin_checkout and purchase, with an items array, and GA4 fills the Monetization reports. Platform integrations (Shopify, WooCommerce) or a dataLayer with Google Tag Manager are the usual ways.

Why does GA4 show purchases but no revenue?

Usually because the purchase event has no currency, or value is sent as text. GA4 needs both a numeric value and a currency code to report revenue.

Why don't GA4 transactions match my backend?

Some gap is normal: ad blockers, declined consent and payment redirects that never return to the site. A large or sudden gap points to a tracking problem, such as a missing purchase on one template, duplicated transactions, or a new checkout that stopped pushing the event.

Rafael CampoamorDigital Marketing Freelancer

Digital Marketing Freelancer

Trackingplan

See everything. Miss nothing.

Your implementations audited around the clock with real-time, real-user data. Real-time alerts about errors or changes in your data, campaigns, pixels, privacy and consent. Let AI flag issues before they cost you.