
Guides · E-Commerce
GA4 Ecommerce Tracking for Shopify and WooCommerce: Setup and How to Check It Works
Guide • GA4 Ecommerce Tracking • Shopify and WooCommerce
Most store owners install Google Analytics 4, see revenue appear in the reports and assume the setup is done. Then the numbers drift away from the store admin, a campaign looks better or worse than it is, and nobody can say which figure to trust.
GA4 ecommerce tracking is the set of events and parameters that tell Analytics what shoppers viewed, added to the cart and bought. When it is set up well, you can see where shoppers leave the funnel, which channels bring revenue, and which products sell. When it is set up badly, you get double-counted orders, missing revenue and ad platforms that optimize toward the wrong signal.
This guide covers the recommended ecommerce events and the parameters Google says you need, how to set up tracking on Shopify and WooCommerce, how to test it with Tag Assistant and DebugView, how to mark key events, and why GA4 revenue will never match your store admin exactly. If you want a team to audit or fix your tracking alongside your ad accounts, see our performance marketing services.
Editorial note: this article contains no affiliate links. Facts were checked against Google Analytics Help, Google’s developer documentation, the Shopify Help Center and WooCommerce documentation on November 10, 2026. No press reports were used. Google, Shopify and WooCommerce update their integrations often, so confirm current details in each platform’s documentation before you change a live store.
Quick answer: On Shopify, connect GA4 through the Google & YouTube app, which sends the main ecommerce events automatically. On WooCommerce, install the free Google Analytics for WooCommerce extension and add your G- Measurement ID. On either platform, remove any older tracking code, place a real test order, confirm the purchase event in DebugView with a unique transaction ID, value, currency and items, and expect GA4 revenue to run somewhat below the store admin.
- The core events are view_item_list, view_item, add_to_cart, begin_checkout, add_shipping_info, add_payment_info, purchase and refund.
- Google says to send currency whenever you send value, and each item needs at least an item_id or item_name.
- GA4 deduplicates purchases that share a transaction ID, so every order needs its own ID.
- The purchase event is a key event by default. Other funnel events can be starred in Admin under Events.
- Consent choices, ad blockers, refunds, tax and shipping handling, time zones and currency conversion all explain gaps between GA4 and the store admin.
Each block is one section, sized by how long it is. The orange block is the longest: Setting Up GA4 Ecommerce Tracking on Shopify (about 1 min). Tap a block to jump.
What GA4 Ecommerce Tracking Measures
GA4 records everything as events. For online stores, Google’s developer documentation defines a set of recommended ecommerce events. Using Google’s exact names matters, because the Monetization reports, funnel explorations and Google Ads imports are built around them. A custom name such as order_complete will be collected, but it will not fill the ecommerce reports.
These are the events most stores need, with what each one means according to Google:
| Event | When it fires | Key parameters | Shopify (Google & YouTube app) |
|---|---|---|---|
view_item_list | Items are shown in a list, such as a collection or search results page | item_list_id, item_list_name, items | Sent |
view_item | A shopper views a product detail page | currency, value, items | Sent |
add_to_cart | An item is added to the cart | currency, value, items | Sent |
begin_checkout | The first step of checkout | currency, value, coupon, items | Sent |
add_shipping_info | Shipping details are submitted | currency, value, shipping_tier, items | Sent only with Checkout Extensibility |
add_payment_info | Payment details are submitted | currency, value, payment_type, items | Sent |
purchase | An order is completed | transaction_id, value, currency, tax, shipping, items | Sent |
refund | A refund is issued | transaction_id, value, currency, items | Not listed in Google’s Shopify mapping |
The Parameters That Make Revenue Work
An event without the right parameters is just a count. Most setups go wrong on the purchase event, so check these first.
transaction_id
Google Analytics Help says every order needs a unique transaction ID, such as the order confirmation number. GA4 deduplicates purchases that share an ID, which protects you when a shopper reloads the thank-you page. Reusing IDs works against you, and Google warns it could make you “significantly undercount” key events. Never send an empty string or customer details in the ID.
value and currency
Google says that when you set value, currency is required for revenue metrics to be computed accurately. Use a three-letter ISO 4217 code such as USD. In Google’s purchase example, value is the sum of price times quantity, with tax and shipping sent separately.
items
Google says each item only requires item_id or item_name, though sending both is recommended, and the array can hold up to 200 items. Add price and quantity, and match the item_id format of your Merchant Center feed if you run Shopping ads.
Setting Up GA4 Ecommerce Tracking on Shopify
Shopify’s Help Center points merchants to the Google & YouTube sales channel app, which tracks certain ecommerce events automatically. Google’s Shopify setup article gives the steps.
- Create the GA4 property and web data stream. Note the Tag ID that starts with G-.
- Install the Google & YouTube app from the Shopify App Store and connect the Google account that has access to the property.
- Connect the Analytics property from the app’s Overview page. Google calls this “strongly preferred” over adding the tag manually.
- Confirm the detected tags and select Complete setup. You cannot change settings later until this is done.
- Turn off private mode. Shopify says Google Analytics cannot track events until you deactivate private mode for your online store.
- Remove legacy tags. Delete old gtag.js code from your theme and any custom pixel that also sends GA4 events. Google says to remove legacy tags to prevent duplicate measurement.
What the app sends
Google’s Shopify event reference maps Shopify customer events to Google events. For example, checkout_started becomes begin_checkout and checkout_completed becomes purchase. The app also sends view_item_list, view_cart, remove_from_cart, add_payment_info and search, each with a shopify_event_name parameter you can filter on.
Two details matter. add_shipping_info is only sent in checkouts with Checkout Extensibility enabled. And purchase values were updated on April 24, 2025 to take discounts into account.
Customer events and consent
The app runs as a pixel under Settings > Customer events. Shopify says pixels load on the storefront, checkout, Thank you page and Order status page. In consent-required markets, usually the EEA and UK, they run only when visitors have given the needed permissions. Adding your own GA4 custom pixel there as well will send every event twice.
Setting Up GA4 Ecommerce Tracking on WooCommerce
WooCommerce’s free Google Analytics for WooCommerce extension is the official route.
- Install and activate the extension.
- Copy your Measurement ID. In GA4, go to Admin, then Data streams, select your web stream and copy the ID that begins with G-.
- Add the ID under WooCommerce > Settings > Integration > Google Analytics.
- Choose tracking options. These include purchases, add and remove from cart, product impressions and clicks on listing pages, product detail views and checkout initiated.
- Add a consent tool. The extension has no cookie banner, so WooCommerce recommends a consent plugin that works with the WP Consent API.
- Remove duplicate code. WooCommerce warns that multiple tracking code instances can cause issues. Check your theme and other analytics plugins.
WooCommerce says the connection can take up to 48 hours to start working. Purchase tracking requires a payment gateway that redirects to the order received page, so test every gateway. The free extension’s documentation does not mention refund tracking. The paid Google Analytics Pro extension by SkyVerge lists refund and cancellation tracking ($79 a year on WooCommerce.com when checked).
Using Google Tag Manager instead
Some stores use Google Tag Manager for more control, with a data layer pushing the recommended events. Google’s developer documentation includes Tag Manager versions of each event. Do not run the extension and a GTM ecommerce setup together. For help with WordPress tracking and technical SEO, see our WordPress SEO services.
How to Test With Tag Assistant and DebugView
You do not need to wait 24 hours for reports. Google provides two tools that show events as they happen.
Tag Assistant
Open tagassistant.google.com, enter your store URL and browse in the window it opens. Google says this turns on debug mode for your device. WooCommerce advises granting consent on your cookie banner first, then simulating cart and checkout actions.
DebugView
With debug mode on, go to Admin and, under Data display, open DebugView. Pick your device, then click any event to see its parameters. Confirm that the purchase event carries the right transaction_id, value, currency and items.
Google says events will not appear if client-side privacy controls are in place, or if consent mode is active and you have not accepted analytics cookies. Disable ad blockers while you test. On WooCommerce, stay logged out, because the extension does not track logged-in admin users.
Run a Test Order and Verify Every Event
A real order is the only way to check the purchase event end to end. Use a low-priced product, pay with each gateway you offer, then refund or cancel the order.
GA4 test-order checklist
Based on Google, Shopify and WooCommerce documentation as of November 10, 2026.
→ view_item_list fires on a collection or category page
→ view_item fires once on the product page with a price
→ add_to_cart fires once per click, with currency and value
→ begin_checkout fires when checkout opens
→ add_shipping_info and add_payment_info fire if your setup supports them
→ purchase fires once, with the real order number as transaction_id
→ The order appears in the Transactions report under Monetization
→ Purchase revenue matches the order total you expect, in the right currency
→ Tax and shipping show as separate values, not blank
→ Item names and quantities appear in the ecommerce purchases report
→ Reloading the thank-you page did not create a second order
→ Your refund or cancellation of the test order is handled the way you planned
Google says purchase data reaches reports after about 24 hours. Find the order in the Transactions report by its Transaction ID. Google defines purchase revenue there as purchases plus in-app purchases plus subscriptions, minus refunds.
If the purchase is missing, check the confirmation flow first: on WooCommerce, the gateway redirect; on Shopify, that app setup was completed and consent was granted in your test browser.
Mark Purchase and Funnel Events as Key Events
GA4 calls the events you treat as business goals key events. Google says purchase is a key event by default, and linking Google Ads with Ads Personalization can add defaults such as begin_checkout.
To mark another event:
- In Admin, under Data display, click Events.
- Find the event in the Recent events list.
- Click the star icon to mark it as a key event.
You need the Editor role or above. Standard properties allow up to 30 key events. Marking an event affects reports from then on, not historical data.
Key events are separate from Google Ads conversions. You can create Ads conversions from GA4 key events, but they are managed in Google Ads. Keep one primary purchase conversion so bidding does not count a sale twice. For tool options, see our guide to the best conversion tracking software.
Why GA4 Revenue Never Matches Your Store Admin
Your store admin records every order. GA4 records only what a browser or server sends to it. A gap is normal. The goal is a gap that is small, stable and explained.
Consent mode
When visitors decline analytics cookies, their events are not tied to a persistent identifier. Behavioral modeling can estimate the missing activity only if the property qualifies. Google lists at least 1,000 events a day with analytics_storage denied for 7 days, and at least 1,000 daily consented users on 7 of the previous 28 days. Modeled data shows only with the Blended reporting identity.
Ad blockers and privacy tools
Browser extensions and privacy settings can stop tags from loading. Those orders still appear in your store admin but never reach GA4.
Refunds and cancellations
GA4 subtracts refunds only if a refund event was sent. Google’s Shopify event reference does not list one, so Shopify refunds will not reduce GA4 revenue unless you add them another way.
Tax, shipping and discounts
Check whether your value includes tax and shipping, and compare it with the same definition in your store reports.
Duplicates and missing IDs
Two tags sending the same purchase inflate revenue. A missing or reused transaction_id can do the opposite, because GA4 removes purchases it thinks are duplicates.
Time zones and currency
GA4 assigns events to days using the property time zone, so match it to your store. Google notes that time zone changes only apply going forward. Multi-currency stores also see small differences because GA4 converts revenue using the prior day’s exchange rate.
Orders that skip the online checkout
Orders created by staff or through other channels may never load a thank-you page, so no purchase event fires. Compare GA4 against online store orders only. For reconciliation tools, see the best ecommerce analytics software.
How to Track Refunds in GA4
Google’s developer documentation says to send a refund event with the original transaction_id, adding items with item_id and quantity for a partial refund.
Refunds happen in the admin, not the shopper’s browser, so they usually go through Google’s Measurement Protocol, which sends events from servers. Google says it augments tag-based collection rather than replacing it. Your options:
- Shopify: a third-party app or a custom integration that listens for refunds and sends the event through the Measurement Protocol.
- WooCommerce: the paid Google Analytics Pro extension, which lists refund tracking, or a custom integration.
- Either platform: leave refunds out of GA4 and compare against gross online sales in your admin, as long as everyone knows which figure is which.
Frequently Asked Questions
Do I need Google Tag Manager for GA4 ecommerce tracking?
No. Shopify’s Google & YouTube app and WooCommerce’s Google Analytics extension both send ecommerce events without GTM. GTM is useful when you need custom events or more control.
Which events are required for GA4 ecommerce reports?
Google does not require every event. At minimum, send purchase with transaction_id, value, currency and items. Add view_item, add_to_cart and begin_checkout to see funnel drop-off.
Why does GA4 show fewer orders than Shopify or WooCommerce?
Declined consent, ad blockers, gateways that skip the thank-you page and orders created outside the online checkout are the usual causes. A small, steady gap is normal.
Why does GA4 show more revenue than my store?
Usually a duplicate tag, such as old theme code running alongside an app or extension. Check DebugView for events that fire twice.
How long does GA4 take to show ecommerce data?
DebugView and Realtime show events within minutes. Google says purchase data appears in standard reports after about 24 hours.
Are GA4 key events the same as Google Ads conversions?
No. Key events live in GA4. You can import them into Google Ads as conversions, but the Ads conversion settings are managed in Google Ads.
Does Shopify send refunds to GA4 automatically?
Google’s Shopify event reference does not list a refund event, so plan on a separate integration if you need refunds in GA4.
Can GA4 track a Shopify store that is in private mode?
No. Shopify says Google Analytics cannot track events until private mode is turned off. Test with a low-priced order once the store is public.
Final Take
GA4 ecommerce tracking is easier to set up than it was a few years ago. Shopify’s Google & YouTube app sends most recommended events on its own, and WooCommerce’s free extension covers the main funnel and purchases. The hard part is proving the data is right: one tag source, a unique transaction ID on every order, currency sent with every value, and a real test order checked in DebugView.
Once that is in place, mark the events you care about as key events, decide how refunds and tax will be handled, and write down the expected gap between GA4 and your store admin. If you want help auditing your tracking before you scale ad spend, our performance marketing team can review it with you.
Sources
- Google for Developers: Measure ecommerce
- Google for Developers: Set up a purchase event
- Google for Developers: Measurement Protocol
- Google for Developers: Shopify event parameters
- Google Analytics Help: Minimize duplicate key events with transaction IDs
- Google Analytics Help: Shopify: Set up your Google tag
- Google Analytics Help: Monitor events in DebugView
- Google Analytics Help: Mark events as key events
- Google Analytics Help: Behavioral modeling for consent mode
- Google Analytics Help: Transactions report
- Google Analytics Help: Currency and revenue metrics
- Google Analytics Help: Create an Analytics account (time zone and currency)
- Shopify Help Center: Setting up Google Analytics 4
- Shopify Help Center: Tracking additional Google Analytics events
- Shopify Help Center: Pixels overview
- WooCommerce.com: Google Analytics for WooCommerce documentation
- WordPress.org: Google Analytics for WooCommerce plugin
- WooCommerce.com: Google Analytics Pro
