WooCommerce cookie banner for GDPR: a CNIL-ready setup
Published November 13, 2026
A WooCommerce store needs a cookie banner as soon as it loads non-essential trackers such as Meta or Google Ads tags. Here is what the CNIL expects, what to gate, and how to test it.
A WooCommerce store needs a cookie banner when it loads trackers that are not strictly necessary, such as Meta or Google Ads tags. The banner must let visitors refuse as easily as accept, and those trackers must not run until the visitor agrees. WooCommerce's own cart cookies are a separate matter, covered below.
What does WooCommerce set on its own?
WooCommerce's cookie documentation lists the storefront cookies: woocommerce_cart_hash, woocommerce_items_in_cart, wp_woocommerce_session_, woocommerce_recently_viewed and store_notice. It states that these hold no personal information. The page does not describe a consent banner or say anything about GDPR, so do not assume the shop ships one: check what your theme and plugins add.
The CNIL's page on the rules lists trackers exempt from consent, including those that keep a shopping cart. That reading fits the cart cookies, but it is our interpretation, not a statement about WooCommerce by the CNIL. The same CNIL page says ad personalization and social-share cookies need consent.
What does the CNIL expect from the banner?
Three points from the CNIL's 2020 recommendation matter for a shop:
- Refusing must be as easy as accepting. The CNIL gives the example of "accept all" and "reject all" buttons at the same level and in the same format.
- Doing nothing counts as refusal. Any action other than a positive act of consent is read as a refusal.
- Keeping the visitor's choice, accept or refuse, for 6 months is described as good practice.
The CNIL also requires consent to be prior: non-exempt trackers cannot be written or read before the visitor agrees, per its rules page. Accepting general terms of use is not valid consent.
Which WooCommerce tags need to be gated?
List every script that runs on your store, then sort it.
- Needs consent: Meta Pixel, Google Ads remarketing and conversion tags, social widgets, retargeting scripts.
- Likely exempt: the cart and session cookies above, and security or authentication cookies.
- Depends on setup: analytics. In France, some audience measurement can be exempt if it meets the CNIL's conditions. See the exact conditions.
Marketing extensions often add their own tags. The Google for WooCommerce page does not mention consent handling, so look in the extension's settings and documentation for how it behaves before the choice. Do not rely on a product page to tell you.
How do you connect a banner to WooCommerce tags?
Pick a banner that can block scripts until consent, then wire each tag to it. There are two common routes.
- Tag manager route. Load tags through a tag manager, and fire each only after the banner reports consent for its category.
- WordPress route. The WP Consent API is a standard way for plugins to read consent categories such as statistics and marketing. It does not collect consent itself, so you still need a banner plugin that supports it, and the plugins that load your tags must support it too. If no plugin sets a consent type, the API treats all categories as allowed, so test that this does not happen on your site.
If you also use Google tags, Google Consent Mode can pass the visitor's choice to them, but it does not replace the banner. A deeper walk-through for the WordPress side is in our WordPress cookie banner guide.
How do you test that the banner works?
Test in a private window with a fresh session.
- Open the shop and do not click anything. Open the browser's network tab and check that no Meta or Google Ads request has fired.
- Click "Reject all". Reload, browse, add a product to the cart and start the checkout. Confirm that still no marketing request fires.
- Clear the site data, then click "Accept all". Confirm the tags now fire, once.
- Close the banner without choosing. It should count as refusal.
- Check that a visitor can change their mind later from a visible link.
Repeat on mobile, and again after each theme or plugin update, because a new extension can add a tag.
Where does Klickbee fit?
If you want audience measurement on WooCommerce without cookies, Klickbee Tracking installs with a script tag or the npm package, and there is no WooCommerce plugin. It is designed with the CNIL audience-measurement exemption in mind, and its optional built-in banner follows CNIL rules: "Reject all" as visible as "Accept all", closing means refusal, the choice asked again after 6 months. That banner only gates the ad pixels added in Klickbee, not the tags your other plugins load. The consent banner help page explains the settings, and you can start free.
This is information, not legal advice.
FAQ
Do I need a cookie banner on a WooCommerce store?
You need one if the store loads trackers that require consent, such as ad pixels or social widgets. A store that uses only exempt cookies, like the cart cookies, may not need consent for those. The answer depends on your exact setup.
Is the WooCommerce cart cookie exempt from consent?
The CNIL lists trackers that keep a shopping cart among the exempt ones. WooCommerce's cookie page describes its cart cookies as holding no personal information. Together they point to an exemption, but confirm it for your own setup.
Can I just close the banner and keep tracking?
No. Under the CNIL's recommendation, an action other than a positive act of consent is read as refusal. If the visitor closes the banner, ad trackers must stay off.
How long should I keep the visitor's choice?
The CNIL describes keeping both consent and refusal for 6 months as good practice. After that, ask again.