Consentl for WooCommerce

WooCommerce shops use the Consentl WordPress plugin. It keeps WooCommerce order attribution off until the visitor allows marketing, and works with full-page caching.

Loader first in <head>
Yes
Download
consentl-wordpress-1.1.0.zip · Version 1.1.0 · 248 KB · SHA-256

WooCommerce is supported by the same plugin as WordPress. Install and connect it as described in Consentl for WordPress; this page covers what is specific to shops.

Install and connect

  1. Download the plugin from Downloads and upload it under Plugins → Add New → Upload Plugin, then activate it.
  2. Go to Settings → Consentl → Connect to Consentl, sign in, and pick or create your shop's site. The connection is recorded as a WooCommerce site, so the banner uses shop wording ("store").
  3. Optional but recommended: install the WP Consent API (external site) plugin so other plugins follow the visitor's choice.

Order attribution

WooCommerce 8.5 and later records where orders come from with sourcebuster.js, which sets sbjs_* cookies. With Consentl:

  • order attribution starts only after the visitor allows marketing, on that page and every later page;
  • if the visitor withdraws consent, attribution stops and the sbjs_* cookies are removed;
  • the shop always renders "off" on the server, so this works with full-page caching;
  • cart, checkout and session cookies are strictly necessary and are never touched.

Order attribution data is therefore only filled in for visitors who agreed; orders from other visitors show the origin "Unknown". Developers can restore WooCommerce's default behaviour with the filter consentl_woocommerce_attribution_client_side set to false.

Shop pages

Add the cookie declaration, the privacy request form and, if you sell to consumers in the EU, the EU withdrawal form (Directive (EU) 2023/2673; Pro plan and higher, switched on in the dashboard) with the blocks or shortcodes listed in the WordPress guide.

Check that it works

  1. In a private window, open a product page from an opt-in region (or use ?consentl=preview).
  2. In the browser's developer tools → Application → Cookies, there are no sbjs_* cookies before you accept marketing.
  3. Accept: the sbjs_* cookies appear and stay on the next page. Reject again: they are removed.
  4. Add to cart and check out without accepting: everything works.

Limitations

  • Classic and block checkout are both supported. Checkout itself needs no consent banner changes.
  • Google Analytics, Meta and other channel plugins follow the choice when they use Consent Mode or the WP Consent API; check each plugin's settings.
  • All WordPress limitations apply.

Stuck? Write to [email protected] — we answer in English on business days.