Skip to main content

Cookie Script

Cookie Script is the second-highest ranked consent management platform (CMP) in our CMP ranking. The Pixel Manager integrates with it automatically. This page explains how the integration works, which settings we recommend, and the two topics that come up in support.

Short answer

Short answer

Cookie Script is supported and compatible with the Pixel Manager for WooCommerce, in the free and in the Pro version, whether you use the Cookie Script WordPress plugin or the hosted script from cookie-script.com. Enable Explicit Consent Mode in the Pixel Manager and run version 1.65.0 or newer.

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

  1. The CookieScriptConsent cookie. Cookie Script writes it already on the first page view, before the visitor has decided, to store its Google Consent Mode mapping. At that point the cookie holds no decision. The Pixel Manager only reads it as a decision once it carries an accept or reject action or a category list, the same rule Cookie Script uses internally. Until then it logs Cookie Script cookie detected, but the visitor hasn't made a choice yet. Ignoring it. and keeps every category denied.
  2. Three events on document: CookieScriptAccept, CookieScriptAcceptAll and CookieScriptReject. The Pixel Manager listens for all three and applies the choice on the same page view, without a reload.

Cookie Script categories map to the Pixel Manager's consent categories like this:

Cookie Script categoryPixel Manager category
strictly necessarynecessary (always granted)
functionalitypreferences
performancestatistics
targetingmarketing

A category the visitor did not approve is denied. The Pixel Manager never grants a Cookie Script category by default.

Install modes. The cookie and the events come from the Cookie Script code itself, so the storefront integration works whether that code is delivered by the Cookie Script WordPress plugin or by the snippet from your cookie-script.com account. Every support case we have handled used the hosted script without the plugin, and detection worked in each of them.

The admin card. The "Consent Management Platforms" card in the Pixel Manager settings lists Cookie Script only when the WordPress plugin is active. With the hosted script it says "None detected on this site" while the storefront integration works. The card is informational. See Your CMP shows as "None detected".

Cookie Script support is not a Pro feature.

  1. Update the Pixel Manager to 1.65.0 or newer. Older versions read Cookie Script's pre-decision cookie as full consent. See Troubleshooting.
  2. Enable Explicit Consent Mode in WooCommerce > Pixel Manager > Consent Management, so that the Pixel Manager follows the decision made in Cookie Script instead of firing pixels before the visitor answers. Details in the Consent Management overview.
  3. Run Google Consent Mode in one place. We recommend enabling Google Consent Mode v2 in the Pixel Manager and leaving Cookie Script's Google Consent Mode setting off. The Pixel Manager sets the defaults to denied, sends the update after the choice, and configures url_passthrough and ads_data_redaction. Two tools issuing default consent blocks on the same page compete with each other.
  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. That is a compliance decision, not a tracking fix.

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:
Pixel Manager: Cookie Script cookie detected, but the visitor hasn't made a choice yet. Ignoring it.
Pixel Manager: Consent mode: explicit. Initial defaults: ...

and, if Google Consent Mode is on, Google requests carrying gcs=G100.

  1. Click "Accept all". The Pixel Manager logs Updated consent state (source: cmp), loads the approved pixels on the same page, and Google requests switch to gcs=G111. On the next page load you see:
Pixel Manager: Cookie Script CMP consent detected
Pixel Manager: CMP consent applied from: Cookie Script
  1. Run pmw.consent.categories.get() in the console to read the current state.

Troubleshooting

On Pixel Manager versions before 1.65.0, Cookie Script's pre-decision cookie was read as a full consent. In Explicit Consent Mode that set the visitor as "has chosen", loaded every pixel, and sent the Google Consent Mode update from denied to granted before any interaction. The symptom is gcs=G111 in Google requests on a fresh session with the banner untouched, or a consent update with everything granted in the data layer right after page load.

Update to 1.65.0 or newer. The fix applies the rule Cookie Script uses itself: the cookie only counts once it holds an accept or reject action or a category list.

GA4 shows no purchases although Google Ads records conversions

When a shopper declines the statistics category in Cookie Script, the Pixel Manager suppresses the server-side GA4 purchase for that order. If a GA4 Measurement Protocol secret is configured, that server-side event is the shop's only GA4 purchase channel, so the shopper contributes a GA4 session and a Google Ads conversion but no GA4 transaction. This is by design.

To measure the size of the effect, leave the logger at level Info for a day (Pixel Manager > Support > Logger) and count the lines reading Consent denied (statistics) against your order count. The setting "Always send server-side events" under Server-Side > General overrides this behaviour; treat it as a compliance decision. Background: Consent and server-side GA4 events.

A visitor who declined once stays declined longer than the banner intends

Cookie Script sends its own gtag('consent', 'update') after a choice. The Pixel Manager currently records that Google Consent Mode update as a local decision, which can keep a decline active after Cookie Script's own cookie has expired or been cleared. Clicking "Accept all" in the banner clears it immediately. We are changing this so that decisions owned by the CMP are no longer stored by the Pixel Manager.

Pixels do not load after accepting

Check for script optimisation first. Plugins that defer or delay JavaScript can load the Pixel Manager before Cookie Script's events fire, 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.

Version history

  • 1.65.0 (August 2026): the pre-decision cookie is no longer read as consent.
  • 1.32.4 (July 2023): consent detection fixed for shops with Google Consent Mode enabled in Cookie Script.
  • 1.12.4 (January 2022): improved reading of the consent cookie.
  • Late 2021: Cookie Script support 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 Cookie Script runs as the WordPress plugin or as the hosted script, and whether its Google Consent Mode setting is on.
  • 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

Yes. Cookie Script is supported and needs no configuration to be detected.

Yes. The hosted script writes the same cookie and fires the same events. Only the informational admin card cannot see it.

In the Pixel Manager. Enable it in one place only.

Because Cookie Script writes its cookie before the visitor decides. The Pixel Manager waits for an accept or reject action, or a category list, before it reads the cookie as a decision.

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

Make more money from your ads with high-precision tracking