Code BLACKGO: cookie banner free for a year. Create an account →

Publications / Guides

Cookie banner in WooCommerce – what needs consent in a shop and how to set it up

The cart and payments work without consent, analytics, pixels and email marketing do not. Which services of a WooCommerce shop need consent, how to install the banner and what to check after setup.

Author: Robert.S Published: Updated: 6 min read

Cookie banner in WooCommerce – what needs consent in a shop and how to set it up

In a WooCommerce shop, only the things needed for selling may run without consent: the cart, login, payments and delivery. Google Analytics, Google Ads, the Meta pixel, TikTok or email marketing tools have to wait until the customer agrees. This follows from Article 5(3) of the ePrivacy Directive and the national laws that implement it. Below: what needs consent in a typical shop, how to install the banner and what to check after setup.

The category depends on what the service does, not on whether it is “useful for the shop”. A typical split – this is how the consetgo module assigns services by default. In the module, analytics and advertising tools cannot be moved to categories that do not need consent; you can assign functional services differently if they play another role in your shop.

ServiceWhat it is forCategory
WooCommerce cart and session, loginplacing an ordernecessary
Stripe, PayPal, Przelewy24paying for the ordernecessary
Google reCAPTCHAprotecting forms against spamnecessary
InPost Geowidgetchoosing a parcel locker on a mapfunctional
Opineo, TrustMateshop reviewsfunctional
Google Analytics 4traffic and sales statisticsanalytics
Google Ads, Meta Pixel, TikTok Pixel, Pinterestconversion measurement, remarketingmarketing
Klaviyo, Ceneo (Zaufane Opinie)email marketing, tracking purchases for reviews and adsmarketing

Przelewy24, InPost, Opineo, TrustMate and Ceneo in the table are examples from Poland, taken from the module’s service database. The “functional” category also needs consent – it differs from marketing in purpose, not in legal basis. Be careful with the parcel locker map: without consent to functional cookies the InPost script will not load and the customer may not be able to choose a parcel locker. If the map is used only to deliver the order the customer asked for, you can assign it to necessary in the module – but check in the InPost documents that the widget does not collect data for other purposes.

Order attribution in WooCommerce

Newer versions of WooCommerce have an order attribution feature: a shop script stores in the browser where the customer came from (cookies with the sbjs_ prefix). This is traffic source measurement, so it is not strictly necessary for selling. Check in the WooCommerce settings (Advanced → Features) whether you use it; if not, turn it off. If you do, describe these cookies in your cookie policy and treat them as analytics.

Installing the consetgo banner in WooCommerce

WooCommerce runs on WordPress, so you install the consetgo plugin for WordPress (WordPress 5.8 or newer, PHP 7.2 or newer):

  1. Download the file consetgo-wordpress.zip from your consetgo account.
  2. In WordPress go to Plugins → Add New Plugin → Upload Plugin, choose the file and click Install Now, then Activate.
  3. Open the Cookie consent → Open the consent panel menu.
  4. In the Scanner tab enable scan mode and go through the shop as a customer: home page, product, cart, checkout, account. The browser scan also shows tags added by Google Tag Manager.
  5. In the Services and categories tab check the assignments, and in Banner appearance – the design and the button order.
  6. In the Cookie policy tab copy the table into the shop’s privacy policy.

The plugin loads the module before the theme and other plugins, so it also blocks scripts added by marketing plugins (e.g. Meta or Google integrations). Blocking works on the server: the code of these services does not reach the browser until the customer gives consent. Details: instructions for WordPress.

The “Online shop” plan

The module detects WooCommerce on the server. A shop needs the “Online shop” plan – with a licence for the “Website” plan, the panel shows a notice about changing the plan. Prices: pricing.

Cache plugins

The banner works with cache plugins that run PHP – including WP Super Cache, W3 Total Cache and WP Rocket. The page of a visitor who gave consent is not stored in the cache, so other customers will not get their version. If the hosting serves pages from the cache without running PHP, the module panel shows “limited mode” – in that case exclude those pages from the cache.

Google Analytics 4 and Google Ads in the shop

With GA4 and Google Ads, the module passes Google Consent Mode v2 signals (default values “denied” before the Google tags, an update after the customer decides). By default advanced mode runs: the Google tags load straight away but set no cookies until consent to their category; other tags load only after consent. Sales reports in GA4 and conversions in Google Ads will show less data than before the banner – this is the result of refusals, not a drop in sales. More: GA4 and cookie consent and Google Consent Mode v2.

Checklist for the shop

  • Scan done on a product page, in the cart and in the checkout, not only on the home page.
  • The cart, login and payment work after clicking “Reject all”.
  • After refusal: no _ga, _gcl_au, _fbp, _ttp cookies and no requests to advertising services – also on the thank-you page after the order.
  • Choosing a parcel locker works after refusing consent (or the map is deliberately assigned to necessary); review widgets do not load before consent.
  • WooCommerce order attribution turned off or described in the cookie policy.
  • Licence plan “Online shop”.
  • The table from the Cookie policy tab pasted into the shop’s privacy policy.

We describe the full browser test in the article How to check whether a site sets cookies before consent.

Questions and answers

Do WooCommerce cart cookies need consent?

No. The cart and the customer session are needed to place an order the customer asks for, so they are necessary cookies. Analytics, advertising and marketing tools need consent.

Do payment gateways have to wait for consent?

Payment scripts that handle the order (e.g. Stripe, PayPal, Przelewy24) are in the necessary category by default in consetgo, so they run without consent. If the same service also does more, e.g. advertising, check this in the service description.

Which consetgo plan do I need for WooCommerce?

The “Online shop” plan. The module detects WooCommerce on the server; with a licence for the “Website” plan, the panel shows a notice about changing the plan.

Will the banner work with a cache plugin?

Yes, with plugins that run PHP – including WP Super Cache, W3 Total Cache and WP Rocket. The page of a visitor who gave consent is not stored in the cache. If the server serves pages from the cache without PHP, the module panel shows limited mode.

Read also

How should a proper cookie banner work?

How should a proper cookie banner work?

Guides

The banner should offer a real choice, and the website should carry it out: a refusal that is easy to find, separate purposes, scripts blocked after refusal and a permanent link for changing the decision. A short checklist using GA4, Meta Pixel and GTM as examples.

· 3 min read

How to choose a cookie consent management tool – 8 criteria

How to choose a cookie consent management tool – 8 criteria

Guides

Eight questions worth asking before you choose a cookie consent tool: blocking before consent, Consent Mode v2, consent log, languages, CMS integration, where the data is stored, price and support. Plus: free or paid module.

· 6 min read