Guide: Complete WooCommerce Ecommerce Tracking
Set up end-to-end WooCommerce ecommerce tracking with CleanClicks using the WordPress plugin, three-layer server-side conversion capture, and analytics proxies.
This guide walks through the supported WooCommerce setup. Acceptance requires a bounded order fixture, deduplication result, and receipt from each intended destination.
What You'll Set Up
- WordPress plugin — captures browsing events, injects tracking scripts, and auto-creates the server-side conversion webhook
- Analytics connections — configures the supported GA4 and Usermaven paths
- 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. The current plugin auto-creates the webhook on activation, so there is no manual webhook setup.
Prerequisites
- CleanClicks account on Signal plan or higher (WooCommerce ecommerce tracking requires Signal+; analytics proxies are included on Signal+ as well)
- 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
- In your WordPress Admin sidebar, click CleanClicks
- Enter your Inbound API Key (copy it from CleanClicks → Configuration → Inbound keys 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.
Refunds and cancellations: when a WooCommerce order is refunded or cancelled, the plugin sends a reversal event carrying the refunded value. To subtract that value from a connected ad platform, map the refund (and cancellation) event for that platform in Configuration → Vendors — without an explicit mapping the reversal is recorded in CleanClicks but not uploaded (this stops a refund from being sent as a purchase-shaped conversion).
Step 2: Server-Side Conversion Capture (Automatic)
The plugin uses three coordinated WooCommerce order paths: two server-side, plus a client-side fallback for custom thank-you pages. The two server-side paths post to the same CleanClicks webhook endpoint, /__cc/woocommerce/webhook, where CleanClicks de-duplicates by order ID so one order produces one conversion.
Layer 1: Auto-Webhook
On activation the plugin creates a WooCommerce order.created webhook pointed at https://cleanclicks.yourdomain.com/__cc/woocommerce/webhook, signed with your Inbound API Key by default. You can see it in WordPress Admin → WooCommerce → Settings → Advanced → Webhooks, listed as "CleanClicks Conversion Capture."
Layer 2: woocommerce_payment_complete Hook
The payment-complete hook provides a second server-side order path, covering subscription renewals and offsite checkout returns where the order.created webhook can fire before payment is confirmed. CleanClicks de-duplicates by order ID across both paths, using a 48-hour order dedupe window (configurable up to 7 days), so one order still produces one conversion.
Layer 3: Configurable purchase_paths Allowlist
On every front-end page load the plugin checks the current URL against an allowlist of purchase-completion paths. The defaults are:
/order-received/
/thank-you/
/order-confirmation/
/my-account/view-subscription/
If your store redirects somewhere else, add that path under Custom Thank-You Paths in Advanced settings on the plugin page. One path per line, substring match against the request URL path.
Webhook Status
The plugin page shows a live status card for the auto-created webhook. If the webhook ever goes missing or lands in an error state, the card says why and gives you 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)
The proxy checkboxes live on the plugin page in WordPress, not in the CleanClicks dashboard.
- In WordPress Admin, click CleanClicks.
- Open Advanced settings.
- Under Analytics Proxies, tick the box for each platform you use: GA4 First-Party Proxy, Usermaven Proxy, or Plerdy Proxy.
- Click Save Changes.
The plugin pulls your GA4 Measurement ID and proxy routes from CleanClicks on its own, so leave the GA4 Measurement ID field blank unless you need to override it. The GA4 First-Party Proxy box is on by default.
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)
GA4 Purchase Events
Purchase events reach GA4 through the API secret saved when you connected GA4. There is nothing else to add.
The plugin also pushes GA4 ecommerce events to the dataLayer client-side, and the GA4 First-Party Proxy routes those through your own subdomain so they keep their traffic source. Installing the plugin is not on its own a reason to change the GA4 server-side setting. If GA4 starts showing duplicate purchases, contact support instead of flipping that setting yourself.
The first-party proxy cuts your dependence on third-party request paths. Browser rules, consent state, caching, and which GA4 property you are looking at still affect what lands. See GA4 Connections.
Cookie Banner Compatibility
Consent behavior depends on the deployed plugin version, the site's CMP, its configuration, and the customer's legal and policy choices.
Test the current installation under accept, reject, later grant, Global Privacy Control, and CleanClicks opt-out states. Verify which identifiers are stored and which vendor events are sent in each state. CleanClicks support for WP Consent API or a named CMP does not choose a legal basis or consent category for the customer.
For what the plugin stores and how it reads consent (cookie and storage classification, service-level consent, the OneTrust bridge), see WordPress Setup → Cookies, Storage, and Consent. See CMP Configuration for the bounded test matrix.
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 configured platform can receive the supported conversion data. Verify the accepted event and attribution result in that destination.
Related: WordPress Setup | Ecommerce Configuration | CMP Configuration | GA4 Connections