Guide

Cookie consent for WooCommerce analytics: what needs it, and how to connect it

The cart can run without consent; analytics, ads and recordings usually can't. What needs consent on a store, and how to connect your banner to every tool.

Updated

The short answer

For a WooCommerce store selling to the EU, the usual approach to analytics and consent:

  • the cart and session cookies the store needs can run without consent;
  • analytics, advertising and recording tools wait until the visitor agrees;
  • “Reject” is as easy as “Accept”, and the choice can be changed later;
  • every tool reads the same answer — through the WP Consent API or your banner's own integration.

This is general guidance, not legal advice — rules differ by country, so check yours.

In the EU, storing or reading information on a visitor's device generally needs their consent unless it is strictly necessary for the service they asked for. For a store, that line usually falls like this:

  • Usually necessary: the cart, the checkout session, the login, security.
  • Usually needs consent: analytics, advertising pixels, remarketing, session recording, most chat and review widgets that track.
  • “Accept” and “Reject” on the first layer, equally easy.
  • Nothing ticked in advance, and nothing loaded before the visitor answers.
  • A short explanation of what each category does, and a link to your privacy policy.
  • A way to change the answer later — a link in the footer.

Connecting the banner to your tools

  • WP Consent API. If your banner plugin and your analytics plugins support it, the visitor's choice reaches all of them without code.
  • Google Consent Mode for Google Analytics and Google Ads: the banner tells Google's tags what was allowed.
  • Each tool's own call for the rest — most analytics and recording tools have a function the banner can call when the visitor accepts.
  • Global Privacy Control: treat a browser that sends it as having opted out.

Testing it

  1. Open the store in a private window and, before answering the banner, check the browser's storage and network: no analytics or ad requests.
  2. Reject, reload, and check again.
  3. Accept, and confirm the tools start.
  4. Change your answer from the footer link and confirm they stop.

What declining costs your data

Visitors who decline aren't in your analytics. That is the point, and it means analytics will always count fewer visitors than really came — while your store still records every order. Compare trends, not absolute numbers, and take revenue from the store.

Consent in StorePilot

  • Require consent, one switch per site: nothing is stored on the visitor's device and nothing is sent from their browser until your banner signals consent — enforced on the server too, and nothing buffered meanwhile.
  • The WP Consent API is supported: a visitor who declines through a banner that uses it is not tracked.
  • Global Privacy Control is always honoured, on every site.
  • Orders still arrive from your store's server whatever the visitor answered — they are your record of a sale, not tracking of the visit. From the next plugin release, contact forms a visitor submits arrive too: a message they chose to send, linked to their browsing only with consent.

Install the WordPress plugin, see store analytics, or read about the privacy settings.

FAQ

Questions about this guide

Do WooCommerce's own cookies need consent?

Cookies the store needs to work — the cart and the shopper's session — are generally treated as strictly necessary, which in the EU don't need consent. Analytics, advertising and recording tools are a different matter. Check with your own adviser for your country.

What is the WP Consent API?

A WordPress standard that lets a consent banner tell other plugins what the visitor agreed to. With a banner and analytics plugins that both support it, the visitor's choice reaches every plugin without custom code.

What is Google Consent Mode?

A way to pass the visitor's consent choice to Google's tags, so they adjust what they store and send. Google requires consent signals for its advertising features for visitors in the EEA, the UK and Switzerland.

What is Global Privacy Control?

A signal a visitor's browser can send to say they opt out of the sale or sharing of their data. Some US state laws treat it as a binding opt-out. Respecting it is simple and increasingly expected.

Analytics that waits for your consent banner

Install the plugin, and switch on one setting to collect nothing until a visitor agrees — orders still arrive.

Start for free

Every feature on the Free plan, for 100 visitors a month. No card required.

Choose a plan

Plans from €29 a month, priced by your monthly visitors and the websites you connect.