Skip to content
🚀 Find us on Product Hunt

Google Analytics 4 Tracking Setup for WooCommerce

Quick answer: Use the free container builder wizard to select Google Analytics 4 and your events, enter your tracking ID, then import the generated file into Google Tag Manager - no manual tag setup needed for any of the 23 events below.

GA4 configuration and ecommerce event tracking via a native Google tag. This container uses a native GTM tag type for this platform.

Build my Google Analytics 4 container →

Events you can track

ecommerce events

engagement events

How the container is built

Page View uses GTM's native Page View trigger. The other 22 events each get their own Custom Event trigger, matched to a dataLayer.push({event: '...'}) call with the same name as the event key (e.g. purchase, add_to_cart) - every Google Analytics 4 tag is then wired to its matching trigger automatically.

For that reason, events other than Page View generally require your site to actually push the matching dataLayer event - the container listens for it rather than generating it. Use GTM's Preview mode after import to confirm each event fires as expected.

Requirements:

Frequently asked questions

What is Google Analytics 4 tracking for WooCommerce?

GA4 configuration and ecommerce event tracking via a native Google tag.

Do I need to write code to set up Google Analytics 4 tracking?

No. The container builder wizard walks you through selecting events and entering your tracking ID, then generates a ready-to-import Google Tag Manager container JSON file - no manual tags, triggers, or variables to configure by hand.

How many Google Analytics 4 events can I track?

This guide covers 23 trackable events. The free tier lets you generate a container covering up to 3 events at once; unlocking full access covers all of them in a single container.

Does the generated container use a native GTM tag or Custom HTML?

Google Analytics 4 has a native tag type in Google Tag Manager, so the generated container uses that built-in tag rather than a Custom HTML workaround.

How do I import the container into Google Tag Manager?

In GTM: Admin > Import Container > choose the downloaded JSON file > select "Merge" into a new workspace. Verify everything fires correctly in Preview mode before publishing to your live container.

Does this work with GTM server-side tracking or Google Analytics 4's Conversions API?

This builds a standard client-side (browser) GTM Web Container for Google Analytics 4 - it covers the events that fire from the customer's browser. If you're also running a GTM server-side container or Google Analytics 4 Conversions API to recover conversions lost to ad blockers, Safari ITP, and iOS App Tracking Transparency, the two set ups complement each other: this container still handles the client-side/browser-side events that feed into your server-side setup, it doesn't replace it.

Share with