Guide: Complete WooCommerce Ecommerce Tracking
Set up end-to-end WooCommerce ecommerce tracking with CleanClicks using the WordPress plugin (v1.6.1), three-layer server-side conversion capture, and analytics proxies.
This guide walks through setting up end-to-end ecommerce tracking for a WooCommerce store with CleanClicks. Every product view, cart action, and purchase is captured first-party and relayed to your ad platforms.
What You'll Set Up
- WordPress plugin — captures browsing events, injects tracking scripts, and auto-creates the server-side conversion webhook
- Analytics proxies — routes GA4, Usermaven, and Plerdy through your first-party subdomain (Signal+ plans)
- Ad platform connections — routes conversion data to your platforms
The previous version of this guide separated the WordPress plugin and the server-side webhook into two manual steps. As of plugin v1.5.2, the webhook is auto-created on activation — no manual setup required.
Prerequisites
- CleanClicks account on Clarity plan or higher (WooCommerce ecommerce tracking requires Clarity+; analytics proxies layer in automatically on Signal+ subscriptions)
- Domain added and DNS verified in CleanClicks
- WordPress site with WooCommerce active
- Admin access to WordPress
Step 1: Install the WordPress Plugin
- In CleanClicks, go to Configuration → Ecommerce tab
- Download the plugin zip
- In WordPress Admin, go to Plugins → Add New → Upload Plugin
- Upload the zip and click Install Now
- Click Activate
- Go to Settings → CleanClicks (or WooCommerce → CleanClicks if WooCommerce is active)
- Enter your Inbound API Key (copy it from CleanClicks → Configuration → Integrations tab) and Save Changes
That's the entire setup. The plugin handles domain auto-detection, remote config fetch, smart defaults, and webhook auto-creation. See WordPress Setup for the full plugin reference.
Events Tracked
| Event | When It Fires |
|---|---|
view_item | Product page view |
view_item_list | Shop/category page view |
add_to_cart | AJAX or form-based add-to-cart |
remove_from_cart | Item removed from cart |
begin_checkout | Checkout page load + checkout-intent click from cart |
purchase | Order completed (both client-side and server-side) |
Each event includes enhanced product data: SKU, brand, up to 5 category levels, and variant info for variable products.
Step 2: Server-Side Conversion Capture (Automatic)
The plugin handles server-side conversion capture through three coordinated layers. All three activate automatically when the plugin is installed — there's nothing to configure for the standard WooCommerce checkout.
Layer 1: Auto-Webhook
On activation, the plugin creates a WooCommerce order.created webhook pointed at your CleanClicks proxy, signed with your Inbound API Key. Verify it in WordPress Admin → WooCommerce → Settings → Advanced → Webhooks — look for "CleanClicks Conversion Capture."
Layer 2: woocommerce_payment_complete Hook
Backstops subscription renewals, offsite checkout returns (PayPal, Klarna, etc.), and any case where the standard order.created webhook fires before payment confirmation. The plugin de-duplicates between Layer 1 and Layer 2 via a 24-hour key, so a single order never doubles in your data.
Layer 3: Configurable purchase_paths Allowlist
Catches custom thank-you pages that don't trigger the standard woocommerce_thankyou hook. Default patterns cover /order-received/, /thank-you/, /order-confirmation/, and /my-account/view-subscription/. For custom flows (subscription confirmations, membership signups, branded thank-you URLs), add your URL pattern on the plugin settings page under Custom Thank-You Paths.
See WordPress Setup → Server-Side Conversion Capture for the full three-layer reference and per-customer custom-thank-you-path examples.
Webhook Status Card
The plugin settings page shows a live status card for the auto-created webhook. If the webhook is ever missing or in an error state, the card shows why and offers a Recreate Webhook button.
Step 3: Connect and Configure Platforms
Same as any CleanClicks setup:
- Go to Connections and connect your ad platforms
- Go to Configuration → Vendors and enable + configure each platform
Step 4: Enable Analytics Proxies (Signal+ Plans)
If you use GA4, Usermaven, or Plerdy:
- Go to Configuration → Advanced tab
- Enable the proxy toggle for each analytics platform you use
- Save
The WordPress plugin detects these settings via the /__cc/wp-config endpoint and automatically injects the proxied versions of your analytics scripts. No theme code changes needed.
On v1.6.1, if your account has GA4 First-Party Mode fully configured (server-side proxy enabled + Measurement ID present), the plugin auto-enables the GA4 First-Party Proxy checkbox on fresh installs via smart defaults — you don't need to flip the toggle manually.
Step 5: Test
- Open your WooCommerce store in an Incognito window
- Browse to a product page
- Add to cart
- Complete a test order
- Check CleanClicks dashboard for events
- Check each ad platform (allow 15-30 minutes)
Important: GA4 Measurement Protocol
If you use the CleanClicks WordPress plugin with GA4, disable GA4 Measurement Protocol for the customer's primary GA4 property in Configuration → Vendors.
Why? The plugin pushes GA4 ecommerce events to the dataLayer client-side, and the GA4 First-Party Proxy routes those through your subdomain. If Measurement Protocol is also enabled against the customer's primary property, GA4 receives every event twice — once client-side (properly attributed) and once server-side (attributed to "Unassigned"). This causes inflated event counts and broken attribution.
The plugin + GA4 First-Party Proxy gives you full ad-blocker bypass without needing Measurement Protocol against the primary property. See GA4 Connections for the full platform rules.
Cookie Banner Compatibility
Plugin v1.6.0 ships fixes (Phase 1.6 v2) that recover click-ID correlation when visitors reject your cookie consent banner. These activate automatically — no configuration required:
- CleanClicks first-party visitor cookies (
cc_pid,cc_click_ids,cc_attribution,cc_session_id) self-classify asfunctional, so WP-Consent-API-compatible CMPs allow them under reject. - Tracking splits into Phase 1 (functional, always-on — click ID capture, identify, session init) and Phase 2 (analytics, consent-gated — conversion POSTs and dataLayer pushes). Phase 2 events are queued and drained on consent grant.
- OneTrust is bridged to the WP Consent API automatically — no custom JavaScript snippet needed.
- WP Consent API v2.0+ service-level consent is preferred over category-level, so customers can grant or deny CleanClicks individually in Complianz, CookieYes, or iubenda service-toggle UIs.
For per-CMP configuration guidance (CookieYes, Cookiebot, Complianz, iubenda, OneTrust), see CMP Configuration.
Caching Considerations
If your WordPress site uses a caching plugin (WP Rocket, W3 Total Cache, etc.):
- The CleanClicks plugin handles most caching conflicts automatically
- After installing or updating the plugin, clear all cache layers in order:
- Your caching plugin's cache
- Your hosting provider's CDN cache (WP Engine, Kinsta, Cloudflare, etc.)
- Your browser cache
- Verify by checking the page source for the correct plugin version in the
?ver=parameter
WP Rocket Specific
WP Rocket delays JavaScript execution until user interaction. The CleanClicks plugin is designed around this — cc.js loads with async (WP Rocket ignores async scripts), cc-wp.js is excluded from WP Rocket's defer + lazy-load via the documented filter hooks, and analytics proxy scripts are injected via wp_head to bypass WP Rocket's RocketLazyLoadScripts.
Attribution Flow
When someone clicks your ad and buys on WooCommerce:
- Visitor clicks ad → lands on your store with click ID + UTMs in the URL
- CleanClicks tag (via plugin) captures click IDs and UTMs into first-party cookies
- Plugin tracks browsing events (product views, cart adds)
- Plugin server-renders a pre-purchase identify on checkout (Blocks + classic) so the hashed email lands in CleanClicks's correlation store before the order completes
- Visitor completes purchase → both the client-side
purchaseevent and the server-sideorder.createdwebhook fire; CleanClicks de-duplicates and matches the order to the visitor session - Each connected platform receives the conversion with proper attribution — Enhanced Conversions for Google Ads, Conversions API for Meta, etc.
Related: WordPress Setup | Ecommerce Configuration | CMP Configuration | GA4 Connections
Last updated 6 days ago
Built with Documentation.AI