Docs / WooCommerce

WooCommerce Integration

Protect your WooCommerce store from click fraud with automatic conversion tracking.

Overview

The ClickLens WordPress plugin automatically detects WooCommerce and enables e-commerce specific features. When a customer completes a purchase, the plugin sends a conversion signal to ClickLens, marking that session as a verified human. This trains the scoring engine to better distinguish your real customers from bot traffic, reducing false positives over time.

Installation

  1. Install and activate the ClickLens plugin from the WordPress plugin directory. See the WordPress guide for detailed steps.
  2. Go to Settings → ClickLens and enter your site key.
  3. If WooCommerce is active, you'll see a WooCommerce section in the settings. Conversion tracking is enabled by default.

No additional configuration is needed. The plugin automatically detects WooCommerce and activates e-commerce features.

Features

Automatic conversion tracking

When a customer completes an order and lands on the thank-you page, the plugin automatically reads the ClickLens session key from sessionStorage and sends it to the ClickLens conversion API. This marks the session as a verified human visitor.

This happens transparently — no code changes or GTM tags needed. The conversion data feeds into the efficacy dashboard and improves future scoring accuracy.

Page type detection

The plugin adds a data-page-type attribute to the tracking tag, identifying the type of page being viewed. This gives ClickLens richer context for scoring decisions.

Page Type WooCommerce Function
product Single product page
cart Cart page
checkout Checkout page
shop Shop archive page
category Product category page

Standard WordPress page types (home, post, page, archive) are also detected on non-WooCommerce pages.

Settings

WooCommerce settings appear in Settings → ClickLens when WooCommerce is active.

Setting Default Description
Conversion Tracking Enabled Automatically fire a conversion signal when an order is completed. Disable if you handle conversion tracking separately (e.g., via GTM).

How conversion tracking works

  1. A visitor arrives on your store. The ClickLens tag stores a session key (cl_sk) in sessionStorage.
  2. The visitor completes an order and reaches the thank-you page.
  3. The plugin reads the session key and sends it to the ClickLens conversion API.
  4. ClickLens marks the session as a verified human. This data appears in the efficacy dashboard and improves future scoring.

The conversion call is fire-and-forget and does not affect page load or order processing. See the conversion tracking guide for the full API reference.

Requirements

  • WordPress 5.0 or higher
  • PHP 7.4 or higher
  • WooCommerce 5.0 or higher
  • ClickLens plugin v1.1.0 or higher

FAQ

Do I need to set up conversion tracking separately?

No. If WooCommerce is active and the ClickLens plugin is configured, conversion tracking works automatically. You don't need to add any code, GTM tags, or API calls.

What if I already have conversion tracking via GTM?

Duplicate conversion signals are safe — ClickLens deduplicates by session key. However, you can disable the WooCommerce conversion tracking in plugin settings if you prefer to use a single method.

Does the page type data affect my score?

Page type data provides additional context for the scoring engine. Sessions that visit product, cart, and checkout pages in a natural progression are more likely to be scored as human. This is one of many signals the engine considers.

Will it slow down my checkout?

No. The conversion tracking script runs asynchronously after the order is complete. It does not block the thank-you page from rendering or affect order processing.