Guide · GA4 e-commerce
How to set up GA4 purchase tracking
If GA4 shows traffic but no purchases or revenue, your store isn't sending e-commerce events. Here's what GA4 needs, how to set it up on common platforms, and how to check it works.
The four events a store needs
GA4 doesn't know what a sale is until your site tells it. It does that with recommended e-commerce events. Purchase is the one that matters most; the other three give you the shopping funnel.
| Event | Sent when | Must include |
|---|---|---|
view_item | A product page is viewed | currency, value, items |
add_to_cart | A product is added to the cart | currency, value, items |
begin_checkout | The shopper starts checkout | currency, value, items |
purchase | The order is confirmed | transaction_id, currency, value, items |
items is a list of the products involved, each with at least an
item_id or item_name. Without it, GA4's
product reports stay empty even when revenue is recorded.
Set it up on your platform
Shopify
Install Shopify's Google & YouTube app, connect your Google account and choose your GA4 property. It sends all four events, including purchase from the order status page. If you previously pasted a gtag snippet into your theme or checkout settings, remove it once the app is connected, or orders will be counted twice. For anything custom, use Shopify's Customer events (custom pixels) rather than theme code, because checkout pages no longer run theme scripts.
WooCommerce
Install the official Google Analytics for WooCommerce
extension and enter your GA4 measurement ID (it starts with G-).
It sends the e-commerce events from product, cart, checkout and order-received pages. Turn
off any other plugin that also sends GA4 events, so each event is sent once.
Custom site or Google Tag Manager
Send each event when it happens, with the parameters above. With gtag.js, the purchase event on your order confirmation page looks like this:
gtag("event", "purchase", {
transaction_id: "T-10482", // unique per order — GA4 drops duplicates
currency: "USD", // without it, revenue is recorded as 0
value: 128.00, // order total you want counted as revenue
tax: 9.60,
shipping: 6.00,
items: [
{ item_id: "SKU-THROW-01", item_name: "Linen Throw Blanket", price: 89.00, quantity: 1 },
{ item_id: "SKU-MUG-02", item_name: "Stoneware Mug", price: 19.50, quantity: 2 }
]
});
With Tag Manager, push the same object to the dataLayer under an
ecommerce key and fire a GA4 Event tag named
purchase with "Send e-commerce data" enabled.
Check it's working
- In GA4, open Admin → DebugView, or install the Google Tag Assistant extension and enable debug mode.
- Place a test order (use a discount code or your platform's test payment mode).
-
Confirm
purchaseappears with atransaction_id,currencyandvalue, and that its items are listed. - Wait 24–48 hours, then check Reports → Monetization → E-commerce purchases. Standard reports lag behind DebugView.
Why GA4 shows zero purchases
- No purchase event at all. Common after a theme change, a checkout upgrade, or switching apps.
- Revenue is 0 but purchases aren't. The event is
missing
currency, orvalueis sent as text with a currency symbol. - Checkout on another domain. If checkout runs on a payment provider's domain and the confirmation page never loads on yours, the event never fires. Fire it from a page you control, or from the platform's server-side integration.
- Consent banner blocking tags. If GA4 waits for consent that's never given, purchases go unrecorded. Check your consent mode setup.
- Duplicate transaction IDs. GA4 keeps only one
purchase per
transaction_id; reusing a placeholder ID drops real orders. - Sudden zero days. If purchases drop to zero while traffic stays normal, tracking broke that day. The GA4 Instant Dashboard flags these automatically.
Then see what's working
Once purchases are flowing, the free GA4 e-commerce dashboard shows revenue, conversion rate by channel and device, the shopping funnel and your top products, with plain-English findings — in about ten seconds, in your browser.