To set up GA4 ecommerce tracking on WooCommerce, you need a plugin that sends cart and order data to GA4. Pasting the basic Google tag is not enough: it records page views, not products, carts or revenue.
This guide compares the two common methods, walks through each, and ends with the tests that catch duplicate purchases. For stores where tracking needs more than a plugin, our GA4 ecommerce tracking setup service builds and verifies it.
Two ways to set up GA4 ecommerce tracking on WooCommerce
WooCommerce stores usually choose between a dedicated extension and Google Tag Manager. Both send the same kind of GA4 ecommerce events; they differ in control.
| Google Analytics for WooCommerce | GTM4WP with Google Tag Manager | |
|---|---|---|
| What it is | WooCommerce’s free extension | A WordPress plugin that fills the GTM data layer |
| Setup | Paste the G- Measurement ID in WooCommerce settings | Enable the WooCommerce option, import the GA4 template in GTM |
| Events | Purchases, cart adds and removals, product lists, clicks, views, checkout start | Ecommerce actions such as product clicks, add to cart and purchase, through the template |
| Control | Settings in WooCommerce only | Every tag, trigger and variable in GTM |
| Best fit | A standard store sending only to GA4 | Stores that also feed Google Ads, Meta or a server container |
Pick one. Running both sends every event twice.
The GA4 ecommerce events a store needs
GA4 measures ecommerce through a set of recommended events with item details attached. Google lists the actions to measure: viewing lists and items, cart changes, checkout, purchases and refunds (Google for Developers).
| GA4 event | The shopper action | Why it matters |
|---|---|---|
| view_item_list | Sees a list, such as a category or related products | Shows which lists lead to product views |
| select_item | Clicks a product in a list | Connects lists to products |
| view_item | Views a product page | The top of the product funnel |
| add_to_cart / remove_from_cart | Changes the cart | Cart intent, and what gets dropped |
| begin_checkout | Starts checkout | Where checkout drop-off begins |
| purchase | Completes an order | Revenue; needs a transaction ID |
The purchase event carries the most weight, because it holds revenue. Google marks the transaction ID as required for purchases and refunds (same source). It is what lets platforms spot a duplicate order.

Method 1: the Google Analytics for WooCommerce extension
The Google Analytics for WooCommerce extension is WooCommerce’s own free integration. It connects the store to a GA4 property for basic ecommerce and site analytics (WooCommerce).
- Install the extension from WooCommerce.com and activate it.
- Copy your Measurement ID from GA4: Admin, Data streams, your web stream. It begins with G-.
- Add it in WooCommerce: Settings, Integration, Google Analytics, then paste the ID.
- Turn on the tracking options you need, such as purchases, add to cart and checkout.
WooCommerce notes that the connection can take up to 48 hours to start working. Purchase tracking needs a payment gateway that returns the customer to the order received page after payment (same source).
Method 2: Google Tag Manager with GTM4WP
GTM4WP is a WordPress plugin that pushes WooCommerce data into the Google Tag Manager data layer. Its author publishes a GA4 container template for WooCommerce (GTM4WP).
- Install GTM4WP and add your GTM container ID.
- Turn on the WooCommerce integration in the plugin settings. GTM4WP says it is off by default, and while it is off no ecommerce data reaches the data layer.
- Add a Google tag in GTM with your GA4 Measurement ID, if you do not have one.
- Import the GTM4WP GA4 template into your container and merge it.
- Set the GA4 Measurement ID in the template’s constant variable.
- Pause the template’s Google Ads tags until you set them up. GTM4WP notes they ship with placeholder IDs.
Before you publish, open Preview and place a test order. The Tags tab should list the GA4 purchase tag as fired on the order received page.
A purchase in the data layer should match Google’s own Tag Manager example: transaction ID, value, currency and items (Google for Developers):
// The shape GA4 expects for a purchase (Google's ecommerce guide).
dataLayer.push({ ecommerce: null }); // Clear the previous ecommerce object.
dataLayer.push({
event: 'purchase',
ecommerce: {
transaction_id: 'T_12345', // required for purchases and refunds
value: 30.03,
tax: 1.11,
shipping: 3.33,
currency: 'USD',
items: [{ item_id: 'SKU_12345', item_name: 'Stan and Friends Tee', price: 10.01, quantity: 3 }]
}
});
GTM4WP writes this for you. In Preview, the Data Layer tab shows the push exactly as your tags will read it.
The template’s data layer variables pass these values to each tag: the order ID, order total, currency and items. Check that the order ID matches the WooCommerce order number, then publish.
Use one method, never both
Two tracking methods on one store send every ecommerce event twice. WooCommerce’s own troubleshooting notes that multiple tracking code instances on the same page can cause issues (WooCommerce).
Duplicates are easy to create and hard to see. A theme, a marketing plugin and a GTM container can each add a GA4 tag without anyone noticing.
Our audits show the pattern on other platforms too. Toolab’s store sent GA4 events from three sources, and Vegepod’s site fired Meta’s AddToCart event twice for one action. Before adding any WooCommerce plugin, list every tag already on the site.
Test the setup before you trust it
In a working WooCommerce GA4 setup, checkout tracking records one purchase per real order. Test it with a real order before you rely on the reports.
- Log out of WordPress first. WooCommerce notes that page views are not tracked for logged-in admin users.
- Open GA4 DebugView, which shows events as they arrive in real time (Analytics Help).
- Place a test order and note its number in WooCommerce.
- Check the purchase in GA4: it appears once, with that order number as the transaction ID, and the right value and items.
- Compare a week of GA4 purchases and revenue with WooCommerce orders.
Expect a small gap, not none. Consent, ad blockers and refunds all move the numbers. A purchase count above your order count always means duplicates.
If you also send purchases to Google Ads
A Google Ads purchase conversion needs its own tag, with the same transaction ID. If two conversions arrive with the same transaction ID, Google Ads counts only the first (Google Ads Help).
In the GTM4WP template, add your conversion ID and label to the Google Ads tags, then place a test order. The conversion action’s status in Google Ads updates once real conversions are recorded.
Google explains the warning statuses. No recent conversions can simply mean no ad clicks converted in the last 7 to 14 days. Inactive or Needs attention often points to a misconfigured tag or a tag not found on the site (Google Ads Help).
Consent and the gap you should expect
WooCommerce warns that consent requirements can create a discrepancy between store and Google data. Visitors must grant consent for analytics data to be captured on Google’s platforms (same source as Method 1).
For data to flow after consent, your consent tool must update the consent state when a visitor accepts. Test it: accept cookies, place a test order, and confirm the purchase reaches DebugView. We explain why the two reports never match exactly in GA4 vs Google Ads conversions.
When a plugin is not enough
A plugin covers the standard store. Stores with subscriptions, several currencies, custom checkouts or heavy ad spend often need more control than a plugin’s settings allow.
Those cases usually move to Google Tag Manager with a custom data layer, and sometimes to a server container. Our server-side tracking setup guide covers that step. The GA4 ecommerce tracking service page sets out what we build for WooCommerce, Shopify and custom stores.
Sources (8)
All checked on 15 October 2026.
- WooCommerce, Google Analytics for WooCommerce documentation
- GTM4WP, GA4 enhanced ecommerce tracking setup
- Google for Developers, Measure ecommerce (gtag.js)
- Google for Developers, Measure ecommerce (Tag Manager)
- Analytics Help, Monitor events in DebugView
- Google Ads Help, Use a transaction ID to minimize duplicate conversions
- Google Ads Help, Manage conversion goals from the conversions summary
- BlazeByte client audit reports, named with permission: Toolab (May to July 2026) and Vegepod (June 2026).


