WooCommerce GA4 and GTM setup
Install GTM and GA4 on WooCommerce, enable the ecommerce data layer and check page views before mapping product and purchase events.
Shahzada Ali Hassan, founder of Crisperchecked against 8 sources
The short answer
Set up WooCommerce GA4 tracking by installing GTM once, connecting the Google tag and enabling the store's ecommerce data layer. GTM4WP's instructionsgtm4wp.com require Track e-commerce before its ecommerce events reach GTM. This guide is for store owners preparing the page-view and product-data foundation for individual event tags.
- If another plugin already sends GA4 events, inspect it before adding GTM tags.
- Google's default page-view behaviordevelopers.google.com sends
page_viewwithout a separate manual event tag. - GTM4WP supplies data; GA4 Event tags send the ecommerce actions.
- Steps and settings checked against Google and GTM4WP documentation on 25 October 2026.
FREE CALL
30 MINMeta stopped counting your leads? Get them counted again.
- Pick a time
Check your Meta account with Hassan- See what to do next
On a free 30-minute call, Hassan checks your Meta account with you and shows you what to do next.
Not ready to talk? Run a free check
01Does installing GTM automatically track WooCommerce sales?
No. GTM loads tags, while ecommerce tracking also needs the store's product and order data. Google's ecommerce guidedevelopers.google.com describes separate events for product views, carts, checkout and purchases.
The video shows the older GA4 Configuration tag method; the written steps use the current Google tag setup.
The data layerdevelopers.google.com is a JavaScript object that passes event names and values from the store to GTM.
02How do I install GTM on WooCommerce?
Use one installation route and the intended web container ID.
1. Check the container installation
- On a staging copy, inspect the current plugin and theme tracking settings.
- If no integration owns the container, install and activate GTM4WPwordpress.org.
- Enter the intended GTM container ID in its settings.
The plugin inserts the container code, so do not add a second theme installation.
Done when GTM Previewsupport.google.com connects to that container.
03How do I enable the WooCommerce data layer?
Enable ecommerce tracking in the installed data-layer integration.
2. Turn on ecommerce data
GTM4WP's current guidegtm4wp.com places Track e-commerce in the WooCommerce section's General group; its older 1.x versions use Integration > WooCommerce.
- Turn on Track e-commerce in that location.
- Save that setting on the staging store.
Done when Preview shows product data after viewing a product and adding it to the cart.
04How do I connect GA4 to the GTM container?
Use the store's GA4 web-stream Measurement ID in the Google tag.
3. Configure the Google tag
Google's setup guidesupport.google.com documents the Google Analytics destination and the alternate Google tag method.
- Reuse the store's Google tag and GA4 web stream.
- For Google's alternate methodsupport.google.com, enter the stream's Measurement ID as Tag ID.
- For that method, use an Initialization trigger.
Done when the saved ID matches the intended stream.
Google's page-view guidedevelopers.google.com says page views are sent automatically by default. Keep that behavior for this setup and do not add a second manual page_view tag.
05How do I check page views and product data?
Check GA4 receipt separately from the ecommerce data visible inside GTM.
4. Verify the test session
- Open GTM Preview.
- Load a storefront page.
- Check that the Google tag fires with the intended stream ID.
- Enable debug mode for the test session.
- Open GA4 DebugView.
- Check that page_view shows the URL and title of the page you opened.
- Visit a product.
- Add it to the cart.
- Start checkout.
Done when the Google tag fired with the intended stream ID, page_view showed the page you opened, and Preview shows the matching ecommerce payloads, ready for separate event tags.
Google's DebugView guidesupport.google.com explains how to enable debug mode and inspect event parameters. Seeing ecommerce data in Preview alone does not establish that an ecommerce tag sent it.
06When is this GTM setup the wrong fix?
If an existing integration already sends correct data, diagnose that installation instead of adding a second sender.
- Two Google tags can make the same page view difficult to trace. Inventory the current plugins and theme scripts first.
- No ecommerce payload means the event tag has no products to send. Enable and test the plugin's ecommerce option.
- A page-view tag is not a purchase tag. Add an order-backed purchase mapping only after the data layer is ready.
07Which ecommerce event should I configure next?
Start with WooCommerce view_item tracking, then add_to_cart. Finish with purchase tracking so order identifiers and amounts get their own checks.
08What changed in this guide
- 25 October 2026: Replaced the legacy GA4 Configuration tag with current Google tag instructions, clarified GTM4WP ecommerce settings and separated page views from ecommerce event delivery.
Sources
8 sources
- 1Google's default page-view behaviordevelopers.google.com↩
- 2GTM4WP's instructionsgtm4wp.com↩
- 3Google's ecommerce guidedevelopers.google.com↩
- 4data layerdevelopers.google.com↩
- 5GTM4WPwordpress.org↩
- 6GTM Previewsupport.google.com↩
- 7Google's setup guidesupport.google.com↩
- 8Google's DebugView guidesupport.google.com↩


