Skip to main content

CookiePro (OneTrust)

CookiePro by OneTrust is one of the top three consent management platforms (CMPs) in our CMP ranking. The Pixel Manager integrates with it automatically. This page explains how the integration works, which settings we recommend, and one thing to verify about your OneTrust category configuration.

Short answer

Short answer

CookiePro by OneTrust is supported and compatible with the Pixel Manager for WooCommerce, in the free and in the Pro version. Enable Explicit Consent Mode in the Pixel Manager. Nothing needs to be configured for detection.

The "Consent Management Platforms" card in the Pixel Manager admin will always say "None detected" for OneTrust. That is expected and has no effect on tracking. See below.

How the Pixel Manager detects CookiePro

The integration runs in the visitor's browser and relies on two things OneTrust provides:

  1. The OptanonConsent cookie. OneTrust writes it when the visitor decides. Its groups field lists each category with a 1 (allowed) or 0 (denied). The Pixel Manager reads the cookie on every page load.
  2. The consent.onetrust event on document, which carries the list of active groups. The Pixel Manager listens for it and applies the choice on the same page view, without a reload.

The integration expects the default group IDs of the CookiePro WordPress plugin:

OneTrust group IDCategoryPixel Manager category
1Strictly necessarynecessary
2Analytics / performancestatistics
3Functionalpreferences
4Targeting / advertisingmarketing
Check your group IDs

The Pixel Manager reads the numeric groups 1 to 4. If your OneTrust configuration uses other group identifiers, for example the C0001 to C0004 scheme of some OneTrust templates, or custom groups you created, the Pixel Manager cannot find the decision in the cookie and falls back to treating the categories as allowed. Verify with the Console Logger that the logged consent state changes when you decline categories in the banner. If it does not, contact support with a copy of your OptanonConsent cookie value.

Install modes. The cookie and the event come from the OneTrust script itself, so the storefront integration works with the CookiePro WordPress plugin and with the OneTrust script added by other means, as long as the group IDs match the table above.

The admin card never lists OneTrust. The "Consent Management Platforms" card in the Pixel Manager settings is built on the server from a list of WordPress plugins it can check for. OneTrust is not on that list, so the card reads "None detected on this site" even when the integration works. The card is informational and has no effect on tracking. Use the Console Logger to confirm detection. See also How the Pixel Manager detects your CMP.

CookiePro support is not a Pro feature.

  1. Enable Explicit Consent Mode in WooCommerce > Pixel Manager > Consent Management, so that the Pixel Manager follows the decision made in OneTrust instead of firing pixels before the visitor answers. Details in the Consent Management overview.
  2. Enable Google Consent Mode v2 in the Pixel Manager and do not let OneTrust issue its own Google Consent Mode default block on the same page. Two default blocks compete with each other. The Pixel Manager sets the defaults to denied and sends the update after the choice.
  3. Keep the default group IDs 1 to 4 in your OneTrust category setup, or verify with the Console Logger that decisions are read correctly if you changed them.
  4. Leave Explicit Consent Regions empty unless you deliberately want implicit tracking outside certain regions. See Explicit Consent Regions.
  5. Keep "Always send server-side events" off under Server-Side > General, unless you have decided to send server-side events regardless of the banner answer.

Verify the integration

  1. Open your shop in a private browser window, logged out of WordPress. Tracking is off for administrators by default.
  2. Append ?pmwloggeron to the URL and open the browser console. See the Console Logger guide.
  3. Before you answer the banner you should see Consent mode: explicit with all non-essential categories denied.
  4. Reject everything except strictly necessary cookies, then reload. You should see:
Pixel Manager: OneTrust CMP consent detected
Pixel Manager: CMP consent applied from: OneTrust

followed by a consent state with statistics, marketing and preferences set to false. If they read true after you rejected, the group IDs in your OneTrust configuration do not match the table above.

  1. Accept all, and confirm the pixels load. Run pmw.consent.categories.get() in the console to read the current state at any time.

Troubleshooting

The admin card says "None detected"

Expected for OneTrust, see above. Verify detection with the Console Logger instead.

Almost always a group ID mismatch. Copy the value of the OptanonConsent cookie from the browser's cookie inspector and look at its groups part. If it does not contain the numeric groups 1, 2, 3 and 4, the Pixel Manager cannot read the decision. Send us the cookie value through support.

Pixels do not load after accepting

Check for script optimisation first. Plugins that defer or delay JavaScript can load the Pixel Manager before OneTrust fires its event, and "Remove Query Strings" options in caching plugins can serve a stale Pixel Manager bundle after an update. The console then shows Consent module failed to load - falling back to deny-by-default, which is deliberate. Switch the option off, purge caches, and exclude the Pixel Manager from JavaScript delay. The Caching and Optimization Exclusions page lists what to exclude.

OneTrust's autoblocker rewrites scripts it wants to hold back. If the Pixel Manager's own configuration script is affected, the console stays empty. Add the Pixel Manager to OneTrust's allowlist or switch to manual blocking, since the Pixel Manager handles the blocking of tracking scripts itself.

Version history

  • 1.28.0 (January 2023): fixed a typo in the group parsing of the OneTrust cookie.
  • 1.25.0 (October 2022): support for CookiePro by OneTrust added.

When to contact support

Send us the following so we can reproduce your setup in one pass:

  • Your store URL.
  • The debug information from WooCommerce > Pixel Manager > Support.
  • Whether OneTrust runs as the CookiePro WordPress plugin or as a script you added yourself.
  • The value of the OptanonConsent cookie after you declined all optional categories.
  • Which caching, script optimisation, or tag manager plugins are active.
  • A screenshot of the browser console with ?pmwloggeron, taken in a private window while logged out of WordPress, before and after accepting the banner.

Pro customers use the support form. Free users find help in the WordPress.org support forum.

Frequently asked questions

Is CookiePro by OneTrust compatible with the Pixel Manager for WooCommerce?

Yes. It is supported and scores 90 in our CMP ranking. No configuration is needed for detection.

Why does the Pixel Manager admin say no CMP is detected when I use OneTrust?

Because the admin card only checks for a fixed list of WordPress plugins, and OneTrust is not on it. The storefront integration works regardless. Verify with the Console Logger.

Does the integration work with the enterprise OneTrust script, not only the CookiePro plugin?

Yes, as long as the OptanonConsent cookie uses the numeric groups 1 to 4. Check your group IDs with the Console Logger.

Is OneTrust support a Pro feature?

No. All CMP integrations are included in the free version.

Make more money from your ads with high-precision tracking