Blog
How to Track Conversions in WooCommerce with Google Analytics 4

If you run a WooCommerce store, you can't afford to fly blind. Understanding how users find your site, what products they view, where they drop off in the checkout process, and which marketing channels drive actual revenue is not just helpful—it's essential for survival and growth. Google Analytics 4 (GA4) is the tool that provides this visibility, but only if it's set up correctly. An improper setup can lead to inaccurate data, missed opportunities, and wasted marketing spend.
For many WooCommerce merchants, GA4 feels like a black box. Unlike its predecessor, Universal Analytics, GA4 is built around an event-based data model. This model is incredibly powerful for tracking the granular actions that make up an eCommerce customer journey, but it requires a precise and deliberate implementation. Simply installing a generic tracking code on your site won't cut it; you'll miss out on crucial data like product views, cart additions, and, most importantly, revenue.
This guide is a step-by-step manual for marketers and developers to accurately implement GA4 conversion tracking for WooCommerce. We'll cover the core concepts, the different implementation methods, and how to turn the raw data into actionable insights that help you grow your business.
Core GA4 Concepts for eCommerce
Before diving into the setup, it's crucial to understand GA4's data model.
- Events: Everything in GA4 is an event. A
page_viewis an event, ascrollis an event, and anadd_to_cartis an event. For eCommerce, we use a specific set of recommended events to describe the customer's journey. - Parameters: Events have parameters that provide context. A
view_itemevent is useful, but it becomes powerful when it includes parameters likeitem_name,item_id, andprice. Theitemsarray is a special parameter that contains detailed information about the products involved in an event. - User Properties: These are attributes that describe your users, such as their geographic location, their first-visit date, or custom properties like
customer_tier(e.g., 'VIP'). - Conversions: A conversion is simply an event that you've marked as being important to your business. For any WooCommerce store, the
purchaseevent is the most critical conversion.
Recommended eCommerce Events for WooCommerce
Google recommends a standard set of events for measuring the entire shopping funnel. A proper WooCommerce integration should track most, if not all, of these:
view_item_list: When a user sees a list of products (e.g., a category page).select_item: When a user clicks on a product from a list.view_item: When a user views a product detail page (PDP).add_to_cart: When a user adds a product to their cart.begin_checkout: When a user starts the checkout process.add_shipping_info: When a user submits their shipping information.add_payment_info: When a user submits their payment information.purchase: The most important one—when a user completes a transaction.refund: When an order is refunded (this sends negative revenue to GA4).view_promotion/select_promotion: For tracking internal promotions or banners.
Implementation Methods: Choosing Your Path
There are three primary ways to get GA4 running on your WooCommerce store.
- Plugin-Based Integration: Several WordPress plugins aim to connect WooCommerce to GA4. They are often the easiest to set up but can vary widely in quality and the depth of data they track. Look for plugins that explicitly state they support the full GA4 eCommerce event schema.
- Google Tag Manager (GTM) with a Data Layer Plugin: This is the most robust and flexible method, recommended for most serious businesses. A plugin (like GTM4WP) injects a
dataLayerinto your site's code. ThisdataLayercontains all the structured eCommerce data. GTM then reads this data and sends it to GA4 in the correct format. This approach gives you full control over your tracking without needing to edit theme files. - Server-Side GTM: This is an advanced setup where you send data from your website to a server-side GTM container first, which then forwards it to GA4 and other platforms. It offers benefits like improved page speed, better data accuracy (bypassing ad blockers), and enhanced security. It's powerful but requires more technical expertise to implement.
For the purpose of this guide, we will focus on the Google Tag Manager with a Data Layer approach, as it offers the best balance of power, flexibility, and accessibility.
Step-by-Step Setup: GTM and the Data Layer
This process involves two main parts: getting the data from WooCommerce into the dataLayer, and then configuring GTM to read that data and send it to GA4.
Step 1: Install and Configure a Data Layer Plugin
- In your WordPress dashboard, install a well-regarded GTM integration plugin. GTM for WordPress (GTM4WP) is a popular and comprehensive choice.
- In the plugin's settings, enter your GTM Container ID (e.g.,
GTM-XXXXXXX). - Navigate to the integration settings within the plugin and enable "Track enhanced e-commerce." This is the key step that tells the plugin to generate the rich
dataLayerevents for WooCommerce actions.
Step 2: Verify Your Data Layer
After configuring the plugin, use GTM's "Preview" mode to verify that the data is being pushed correctly.
- Open your website in the GTM Preview mode.
- Perform an eCommerce action, like viewing a product.
- In the Preview debugger's left-hand sidebar, you should see an event named
view_item. - Click on this event and navigate to the "Data Layer" tab. You should see a structured block of code.
Example view_item Data Layer:
{
"event": "view_item",
"ecommerce": {
"currency": "USD",
"value": 42.00,
"items": [
{
"item_id": "SKU123",
"item_name": "Classic Hoodie",
"item_category": "Apparel",
"price": 42.00,
"quantity": 1
}
]
}
}
If you see this structured data for view_item, add_to_cart, and purchase, your data layer is working correctly.
Step 3: Configure Variables and Triggers in GTM
Now, you need to teach GTM how to read the information from the dataLayer.
- Create a GA4 Configuration Tag: This is your main tag that sends data to GA4. In GTM, create a new "Google Analytics: GA4 Configuration" tag. Enter your GA4 Measurement ID (e.g.,
G-XXXXXXXXXX). Set it to fire on the "Initialization - All Pages" trigger. - Create a GA4 Event Tag: This tag will handle all the eCommerce events.
-
- Create a new "Google Analytics: GA4 Event" tag.
- For the "Configuration Tag," select the one you just made.
- For "Event Name," you'll use a variable. Create a new "Custom Event" variable. This variable automatically captures the name of the event from the
dataLayer(e.g.,view_item). - Under "Event Parameters," check the box "Send Ecommerce data." GTM will automatically look for the
ecommerceobject in the data layer and format it for GA4.
- Create the eCommerce Trigger:
-
- Create a new "Custom Event" trigger.
- In the "Event name" field, use a regular expression (RegEx) that matches all the recommended eCommerce events. This tells the trigger to fire whenever any of these events occur.
- RegEx for eCommerce Events:
view_item_list|select_item|view_item|add_to_cart|begin_checkout|add_shipping_info|add_payment_info|purchase
Now, your single GA4 Event tag will dynamically capture all your eCommerce events and send them, with all their parameters, to Google Analytics.
Step 4: Mark purchase as a Conversion in GA4
- Go to your GA4 property.
- Navigate to Admin > Conversions.
- You should see
purchaseautomatically listed as a conversion event. If not, click "New conversion event" and enterpurchase. GA4 treats thepurchaseevent as a conversion by default, as it's fundamental to any business.
Testing and Troubleshooting
Your setup is live, but the work isn't done. Rigorous testing is crucial.
- GA4 DebugView: In the GA4 admin panel, go to "DebugView." As you browse your site in GTM Preview mode, you will see events stream into DebugView in real-time. Click on a
purchaseevent and verify that all parameters, especiallyvalue,currency, and theitemsarray, are present and correct. - Common Issues to Check:
-
- Duplicate Purchases: This often happens if a user reloads the thank you page. A good GTM plugin should only fire the purchase event once.
- Missing Currency/Value: If the
valueorcurrencyparameters are missing on yourpurchaseevent, no revenue will be recorded in GA4. This is a critical error. - Payment Gateway Redirects: Some payment gateways take the user off-site and then return them. This can sometimes break tracking sessions. Check your Referral Exclusion List (Admin > Data Streams > Configure tag settings > Show all > List unwanted referrals) and add your payment gateway's domain (e.g.,
paypal.com). - Cross-Domain Tracking: If your checkout process happens on a subdomain (e.g.,
checkout.yourstore.com), you must set up cross-domain tracking in your GA4 settings to maintain a single user session.
Turning Data into Action: Reports and Analysis
With accurate data flowing, you can now analyze performance.
Standard Reports
The Monetization reports section is your new home.
- Ecommerce purchases: A top-level view of revenue, transactions, and average purchase value.
- Purchase journey: This is a crucial funnel report showing the drop-off rates between
session_start>view_item>add_to_cart>begin_checkout>purchase. The biggest drop-off point is your top priority for optimization.
Custom Explorations
GA4's power lies in the "Explore" section, where you can build custom reports.
- Funnel Exploration: Re-create the checkout funnel with more specific steps like
add_shipping_infoandadd_payment_infoto pinpoint exact points of friction. - Path Exploration: See the most common paths users take before making a purchase. Do they go from a blog post to a product page? Or from the homepage to a category page?
- Cohort Exploration: Group users by their acquisition date and track their purchase behavior over time to measure customer retention and LTV.
Get a FREE Audit
We'll perform a comprehensive SEO, AEO, GEO & CRO audit of your website — completely free — and show you exactly how to outrank your competitors.
Don't have a site yet? Get in touch →
Your 30/60/90-Day Analytics Plan
- First 30 Days: Foundation and Validation
-
- Implement GA4 via GTM and a data layer plugin.
- Rigorously test every eCommerce event using DebugView and make a test purchase.
- Verify that revenue in GA4 matches the revenue in WooCommerce (allowing for small discrepancies from refunds/cancellations).
- Set up your Referral Exclusion List.
- First 60 Days: Analysis and Insight
-
- Analyze your primary checkout funnel. Identify your single biggest drop-off point and form a hypothesis to fix it (e.g., "Users are dropping off at the shipping step because shipping costs are unclear.").
- Build a custom exploration report to analyze which marketing channels (Source/Medium) are driving the most revenue.
- Identify your top 10 best-selling products in the GA4 reports.
- First 90 Days: Optimization and Growth
-
- Based on your funnel analysis, run an A/B test to address the biggest drop-off point.
- Create a segment of users who
add_to_cartbut do notpurchase. Use this audience for remarketing campaigns. - Build a simple dashboard in Looker Studio that tracks your core KPIs: Conversion Rate, AOV, Revenue Per Visitor (RPV), and Return On Ad Spend (ROAS).
Don't Guess, Measure
Accurate tracking is the bedrock of data-driven eCommerce. By implementing Google Analytics 4 correctly for your WooCommerce store, you move from guesswork to a clear, quantitative understanding of your customers and business performance. While the setup requires precision, the payoff is immense, providing the insights you need to reduce friction, optimize marketing spend, and build a more profitable online store.
Feeling lost in data layers and GTM tags? A faulty analytics setup can cost you more than you realize in missed opportunities. Book an analytics implementation sprint with ESEOSPACE. Our experts will manage your GA4 and GTM configuration to ensure you have accurate, reliable data you can trust to grow your business.
Make Your Website Competitive.
Leverage our expertise in Website Design + SEO Marketing, and spend your time doing what you love to do!






