GA4 Ecommerce Tracking: How to Measure Sales on WooCommerce, Shopify and Webflow

GA4 ecommerce tracking means sending Google Analytics 4 a set of standard events (product view, add to cart, begin checkout, purchase) together with product and order value data. Set up properly, it shows you which pages, campaigns and funnel steps win or lose sales.
Plenty of stores have "installed Google Analytics" yet only measure page views. The symptoms are familiar: revenue in GA4 doesn't match the orders in the back office, purchases are counted twice or not at all, and marketing decisions are made on gut feeling.
This guide is for store owners, marketing teams and startups selling on WooCommerce, Shopify or Webflow. It covers which events to track, how to configure them on each platform, how to stay on the right side of consent rules, and how to check your numbers before a peak period like Black Friday.
Why GA4 ecommerce tracking matters
Complete ecommerce tracking turns GA4 from a traffic counter into a decision tool. You might discover, for instance, that most mobile shoppers who add to cart drop off at the shipping step, or that a social campaign brings plenty of visitors but almost no purchases.
The same data powers everything downstream: remarketing audiences, Google Ads bidding and your conversion rate optimization work. Without it, every A/B test or product page redesign rests on opinion rather than evidence.
The GA4 ecommerce events you should track
Google publishes a list of recommended events for online sales. Use these exact names: they are what populate GA4's "Ecommerce purchases" and "Purchase journey" reports.
| Journey stage | GA4 event | What it tells you |
|---|---|---|
| Product lists | view_item_list, select_item | Products seen and clicked in a category or search |
| Product page | view_item | Product detail views |
| Cart | add_to_cart, remove_from_cart, view_cart | Real purchase intent and hesitation |
| Checkout | begin_checkout, add_shipping_info, add_payment_info | Progress through each checkout step |
| Purchase | purchase | Completed order, revenue and products |
| After-sales | refund | Refunds and cancellations |
| Promotions | view_promotion, select_promotion | Performance of banners and offers |
The parameters that make purchase data usable
According to Google's GA4 ecommerce developer guide, the purchase event requires a unique transaction_id. Always add:
- value and currency: order total and currency code (EUR, USD, TND…), otherwise revenue stays empty;
- items: an array of products, each with at least
item_idoritem_name(Google recommends both), plus price, quantity, category and variant; - shipping, tax and coupon where relevant, so you can analyse the impact of delivery fees and discount codes.
Use your store's real order number as the transaction_id. It lets you reconcile GA4 with the back office and stops a reloaded confirmation page from recording the same sale twice.
Setting up GA4 ecommerce tracking on each platform
WooCommerce: the official extension or Google Tag Manager
The quickest route is the free Google Analytics for WooCommerce extension. Once installed, go to WooCommerce > Settings > Integration > Google Analytics, paste your Measurement ID (starting with "G-") and tick the events you want. It covers product impressions and clicks, product views, add and remove from cart, checkout start and purchases.
Two things to watch:
- Purchases are only recorded when the customer lands back on the "Order received" page. With an off-site payment gateway (Stripe Checkout, PayPal, or local providers such as those compared in our guide to Konnect, Flouci and Click to Pay), confirm the return redirect works, or some sales will vanish from GA4.
- The extension ships without a cookie banner. It relies on the WP Consent API, so you need a compatible consent management platform (CMP).
For deeper tracking (shipping and payment steps, feeding Meta or TikTok as well), a Google Tag Manager setup with a proper dataLayer remains the most flexible option. It is the kind of implementation we deliver in our WooCommerce development projects.
Shopify: the Google & YouTube app and customer events
On Shopify, the Google & YouTube app connects GA4 and sends the core events automatically, including add_to_cart, begin_checkout and purchase. For anything beyond that, use Customer events (Settings > Customer events) and the Web Pixels API, which exposes standard events such as checkout_completed.
Check your legacy scripts. Shopify has moved every store to the new Thank you and Order status pages (Plus stores in August 2025, all others on August 26, 2026). Code pasted into "Additional scripts" no longer runs on those pages, as explained in Shopify's upgrade documentation. If your purchase tracking lived there, it is most likely broken right now.
Webflow: the native integration and its limits
Webflow offers a Google Analytics integration in site settings. With Webflow Ecommerce enabled and ecommerce tracking switched on in GA4, product view, add to cart and purchase events are sent automatically. Intermediate checkout steps or custom parameters require custom code or Google Tag Manager. One firm rule: install the GA4 tag in one place only (native integration or custom code), never both.
| Platform | Native option | Events covered | When to go further |
|---|---|---|---|
| WooCommerce | Google Analytics for WooCommerce | Lists, product page, cart, checkout start, purchase | Shipping/payment steps, several ad platforms |
| Shopify | Google & YouTube app | Core events including cart, checkout, purchase | Detailed events via custom pixels or GTM |
| Webflow | Google Analytics integration | Product view, add to cart, purchase | Detailed checkout, custom parameters |
Consent and privacy: don't lose your data
If you sell to customers in Europe, consent is not optional. Google requires advertisers to collect consent from users in the European Economic Area and pass those signals through Consent Mode v2, including the ad_user_data and ad_personalization parameters. Without it, remarketing audiences and part of your ad conversion data stop working properly.
In practice: pick a Google-certified CMP, make sure the banner actually updates consent state after a click, and test the journey by declining and then accepting cookies. A badly wired banner can silently block all of your data.
Handling cash on delivery orders
In markets such as Tunisia, a large share of orders is still paid on delivery. GA4 records purchase when the order is placed, not when the money is collected, so refused parcels and cancelled orders inflate your reported revenue.
Two fixes work well together: send a refund event (server-side, via the Measurement Protocol) whenever an order is cancelled, and track your successful delivery rate alongside GA4 in your reporting.
How to test your tracking in 6 steps
- Turn on debug mode with Google Tag Assistant and watch events arrive live in Admin > DebugView.
- Place a real test order with every payment method (card, cash on delivery, bank transfer) and check that
purchasefires exactly once. - Reload the confirmation page: no second purchase should appear.
- Inspect the parameters:
transaction_id,value,currencyand the items array must all be populated. - Compare GA4 with your back office over a week. A gap of a few percent is normal (ad blockers, declined cookies); beyond 15 to 20%, look for a bug.
- Re-test after every change to your theme, plugins or payment gateway, and before sales peaks. Our Black Friday checklist includes this check.
Example: a fashion store with a 30% data gap
Take an illustrative case: a WooCommerce fashion store sees a 30% gap between GA4 revenue and back-office sales. The audit finds three causes: the GA4 tag is loaded both by the theme and by a plugin (duplicate purchases), the online payment gateway doesn't always send customers back to the confirmation page (missing purchases), and cancelled orders are never deducted.
The typical action plan: remove the duplicate tag, configure the gateway return URL, send cancellations as refund events and add add_shipping_info and add_payment_info. With trustworthy numbers, the team can finally see which checkout step loses customers and prioritise fixes.
GA4 ecommerce tracking checklist
- Only one GA4 tag installed on the site.
- Google's recommended event names, no home-made variants.
purchasesent withtransaction_id,value,currencyanditems.- Checkout steps tracked (
begin_checkout, shipping, payment). - Payment gateway return to the confirmation page verified.
- Consent Mode v2 connected to a working CMP.
- Cancellations and refunds sent as
refund. - GA4 versus back-office gap reviewed monthly.
Conclusion: reliable data before any optimization
GA4 ecommerce tracking isn't a cosmetic setting. It underpins every decision about your store, from redesigning a product page to setting your ad budget. A few hours of setup and testing are often enough to go from rough estimates to a funnel you can actually read.
Our team sets up, audits and fixes tracking for WooCommerce, Shopify and Webflow stores across Europe and North Africa, as part of our ecommerce website development and optimization work. Send us your store URL for a free GA4 tracking audit.