GuidesEcommerce: WooCommerce

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

  1. WordPress plugin — captures browsing events, injects tracking scripts, and auto-creates the server-side conversion webhook
  2. Analytics proxies — routes GA4, Usermaven, and Plerdy through your first-party subdomain (Signal+ plans)
  3. 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

  1. In CleanClicks, go to ConfigurationEcommerce tab
  2. Download the plugin zip
  3. In WordPress Admin, go to PluginsAdd NewUpload Plugin
  4. Upload the zip and click Install Now
  5. Click Activate
  6. Go to SettingsCleanClicks (or WooCommerceCleanClicks if WooCommerce is active)
  7. Enter your Inbound API Key (copy it from CleanClicks → ConfigurationIntegrations 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

EventWhen It Fires
view_itemProduct page view
view_item_listShop/category page view
add_to_cartAJAX or form-based add-to-cart
remove_from_cartItem removed from cart
begin_checkoutCheckout page load + checkout-intent click from cart
purchaseOrder 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 → WooCommerceSettingsAdvancedWebhooks — 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:

  1. Go to Connections and connect your ad platforms
  2. Go to ConfigurationVendors and enable + configure each platform

Step 4: Enable Analytics Proxies (Signal+ Plans)

If you use GA4, Usermaven, or Plerdy:

  1. Go to ConfigurationAdvanced tab
  2. Enable the proxy toggle for each analytics platform you use
  3. 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

  1. Open your WooCommerce store in an Incognito window
  2. Browse to a product page
  3. Add to cart
  4. Complete a test order
  5. Check CleanClicks dashboard for events
  6. 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.

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 as functional, 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:
    1. Your caching plugin's cache
    2. Your hosting provider's CDN cache (WP Engine, Kinsta, Cloudflare, etc.)
    3. 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:

  1. Visitor clicks ad → lands on your store with click ID + UTMs in the URL
  2. CleanClicks tag (via plugin) captures click IDs and UTMs into first-party cookies
  3. Plugin tracks browsing events (product views, cart adds)
  4. 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
  5. Visitor completes purchase → both the client-side purchase event and the server-side order.created webhook fire; CleanClicks de-duplicates and matches the order to the visitor session
  6. 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