Cherry Seed

How do I track WooCommerce conversions in GA4?

ga4 woocommerce measurement-protocol server-side conversions ecommerce

Quick Answer

Track WooCommerce conversions in GA4 using a plugin that supports the GA4 Measurement Protocol for server-side event delivery. Configure your GA4 Measurement ID and API Secret in the plugin settings, and it will send purchase events with full order data directly from your WordPress server to GA4's collection endpoint. According to Google's Measurement Protocol documentation, server-side events bypass ad blockers and browser restrictions that cause client-side gtag.js to miss 15-30% of purchase events. Enhanced e-commerce events including view_item, add_to_cart, and begin_checkout are auto-tracked through WooCommerce's built-in action hooks without additional configuration.

Full Answer

Tracking WooCommerce conversions in GA4 requires connecting your store's e-commerce events to Google's analytics collection — and the method you choose determines how much of your actual revenue GA4 can see.

The standard approach uses GA4's gtag.js snippet, which fires JavaScript events in the visitor's browser when they complete actions like viewing products, adding to cart, and purchasing. This works but has a structural weakness: any visitor using an ad blocker, privacy-focused browser, or strict cookie settings may never execute the tracking script, and those purchases vanish from your GA4 reports.

The GA4 Measurement Protocol offers a server-side alternative. Instead of relying on browser JavaScript, your WordPress server sends event data directly to GA4's collection API endpoint. The event payload includes the same information — event name, transaction ID, revenue, item details — but the transmission happens from your infrastructure, not the visitor's browser.

For WooCommerce, the implementation works through WordPress action hooks. When a customer completes checkout, WooCommerce fires the woocommerce_payment_complete hook. A tracking plugin listens for this hook, packages the order data into GA4's event format, and transmits it via the Measurement Protocol.

The practical difference in data completeness is significant. Server-side purchase events capture 100% of completed orders because the transmission does not depend on the buyer's browser environment. Setup requires your Measurement ID and an API Secret — enter both in your plugin settings, map the events, and verify delivery using GA4's DebugView.

Sources

Programmatic Access

GET https://seresa.io/wp-json/cherry-tree-by-seresa/v1/seeds/794

Cite This Answer

Cherry Tree by Seresa - https://seresa.io/seed/wordpress-woocommerce/easiest-woocommerce-tracking-ga4-woocommerce