About Tracking

Ad Platform Tracking

Meta Pixel + CAPI TikTok CAPI LinkedIn CAPI Snapchat CAPI Pinterest CAPI Quora Pixel Bing + UET Tag

Google Ecosystem

Google Ads Tracking GA4 Setup & Audit Google Tag Manager

Advanced Solutions

Server-Side Tracking Looker Studio Offline Conversion
Case Studies Blog Free Checklist Book Free Audit →

GA4 ecommerce tracking for WooCommerce gives you detailed reporting on product performance, checkout behaviour, and revenue attribution. When set up correctly, GA4 shows you which traffic sources drive the most purchases, where customers drop off in your checkout funnel, and which products have the highest and lowest conversion rates. Here is how to get it working.

Prerequisites

Step 1: Enable WooCommerce DataLayer Events in GTM4WP

Install the GTM4WP plugin if not already installed. In WordPress Admin, go to Settings → Google Tag Manager. In the eCommerce section, enable WooCommerce integration. This causes GTM4WP to push GA4-formatted ecommerce data to the dataLayer for all WooCommerce events: view_item, add_to_cart, begin_checkout, purchase, and more.

Step 2: Create the GA4 Configuration Tag in GTM

In GTM, create a new tag:

This is the base tag that loads GA4 and initiates tracking across all pages.

Step 3: Create GA4 Event Tags for WooCommerce Events

Create separate GA4 Event tags for each ecommerce event. GTM4WP pushes these events to the dataLayer with GA4-compatible naming and structure.

Purchase Event Tag

Add to Cart Event Tag

Begin Checkout Event Tag

View Item Event Tag

Step 4: Create DataLayer Variables

For each event parameter (value, currency, transaction_id, items), create a GTM DataLayer Variable pointing to the correct path in the dataLayer. GTM4WP uses the standard GA4 ecommerce schema:

Create one variable per path, then reference those variables in your GA4 event tags.

Step 5: Verify in GTM Preview Mode

In GTM Preview mode, navigate to a product page, add to cart, go through checkout, and complete a test purchase. In the Tag Assistant panel, verify:

Check the Variables tab to confirm all dataLayer variables are reading the right values.

Step 6: Verify in GA4 DebugView

In GA4, go to Admin → DebugView. With GTM Preview mode active, your GA4 events appear in DebugView in near real-time. Confirm the purchase event appears with the correct value and currency after your test order.

WooCommerce GA4 Plugin Alternative

If GTM setup feels complex, several WordPress plugins handle GA4 ecommerce tracking directly:

Plugin solutions are simpler to set up but offer less control over what data is sent and when. GTM is recommended for stores that need precise control over their tracking implementation.

Book your free audit here and we will assess your WooCommerce GA4 tracking and identify any gaps in your ecommerce reporting.

Leave a Reply

Your email address will not be published. Required fields are marked *