Skip to content

Tech news 5 min read

Cookie banner and CNIL rules: a compliant setup with Consent Mode v2

What the CNIL expects from a cookie banner, which cookies need consent, how Google Consent Mode v2 fits in, and a checklist to test your own site in ten minutes.

Illustration: a consent panel with two equal buttons, cookies, a padlock and a shield
On this page
  1. The principle: no consent, no tracker
  2. What the CNIL expects from a banner
  3. Which cookies do not need consent?
  4. Google Consent Mode v2 in plain language
  5. Test your site in ten minutes
  6. Compliance without killing performance
  7. Frequently asked questions

Cookie banners are among the most visible elements of a website, and among the most frequently non-compliant. In France, the CNIL (the data protection authority) checks them regularly and has fined companies of every size, including €150 million for Google and €60 million for Facebook in 2021 because refusing cookies was harder than accepting them. The rules are clear once you know them, and a compliant banner does not have to ruin your statistics. Here is what to do.

French law, applying the European ePrivacy rules, requires the prior consent of visitors before reading or writing information on their device, unless that information is strictly necessary. In practice: advertising cookies, social network pixels and most analytics tools may only be loaded after the visitor has said yes. Until then, they must not run at all.

What the CNIL expects from a banner

  • Refusing must be as easy as accepting: a “Reject all” button at the same level and with the same visibility as “Accept all”. A small “continue without accepting” link hidden in a corner is not enough.

  • Clear information: what the trackers are used for, which categories exist (measurement, advertising, social media) and who the partners are.

  • Free and specific choice: the visitor can accept some purposes and refuse others. No pre-ticked boxes.

  • Continuing to browse is not consent: closing the banner or scrolling must be treated as a refusal, not an acceptance.

  • Withdrawing consent must be easy at any time, typically through a “Cookie settings” link in the footer.

  • Proof: you must be able to demonstrate that consent was obtained, so choices are recorded.

The CNIL recommends keeping the visitor’s choice, whether acceptance or refusal, for about six months before asking again, and recommends a tracker lifetime of no more than 13 months (a strict condition for exempt audience-measurement cookies, whose data may be kept for 25 months).

  • Cookies strictly necessary for the service: session, shopping cart, login, security, load balancing, and the cookie that stores the consent choice itself.

  • Some audience measurement tools, when they are configured to meet the CNIL’s conditions (strictly anonymous statistics, no cross-site tracking, limited retention). The CNIL publishes the list of solutions that can be configured this way. Google Analytics, in its standard configuration, is not among them and requires consent.

Consent Mode is Google’s way of making its tags (Analytics, Ads, Tag Manager) respect the visitor’s choice. Your banner sends four signals to Google’s tags:

  • analytics_storage — can analytics cookies be used?

  • ad_storage — can advertising cookies be used?

  • ad_user_data — can user data be sent to Google for advertising?

  • ad_personalization — can data be used for personalised advertising and remarketing?

All four must be set to “denied” by default, then updated only when the visitor accepts. Since March 2024, Google requires these signals for advertisers who want to keep measurement and audience features for visitors in the European Economic Area. Consent Mode exists in two variants: in basic mode, Google tags do not load at all before consent; in advanced mode, they load and send data without cookies so that Google can model conversions. Basic mode is the most cautious choice under the CNIL’s approach.

Test your site in ten minutes

  1. Open your site in a private browsing window and open the browser’s developer tools (Application or Storage tab, and Network tab).

  2. Before clicking anything, check that no advertising or analytics cookie is present and that no request goes to advertising or tracking services.

  3. Check that “Reject all” is as visible as “Accept all”.

  4. Click “Reject all”, browse a few pages: still no tracking cookie, no tracking requests.

  5. Reopen the settings from the footer link and check that you can change your choice.

  6. Accept: the tags should now load, and Consent Mode signals should switch to “granted”.

Compliance without killing performance

Many banner tools are heavy scripts that slow down every page and shift the layout while they load, which hurts your Core Web Vitals. A lightweight banner that loads Google Tag Manager only after consent is both compliant and fast. We build this kind of setup, with Consent Mode v2 and a consent log, on the websites we develop, and we check existing sites during a website audit. The same privacy principles apply to AI assistants: see our guide to AI chatbots for small businesses. The CNIL’s full guidance is on cnil.fr. This article is general information, not legal advice: for your specific situation, check the official CNIL guidance or consult a lawyer.

Frequently asked questions

Do I need a cookie banner if I only use Google Analytics?
Yes. In its standard configuration, Google Analytics requires consent in France. Either ask for consent or switch to an analytics tool configured to meet the CNIL exemption conditions.
Can I use a “cookie wall” that blocks the site until visitors accept?
The CNIL considers that this can compromise free consent and assesses it case by case. For most websites, a banner with an equal “Reject all” option is the safe choice.
How often should I ask visitors again?
The CNIL recommends keeping the choice for about six months, whether it was an acceptance or a refusal, and asking again after that period.
Will refusing cookies ruin my statistics?
You will measure fewer visits with cookie-based tools. An exempt analytics tool or Consent Mode helps keep a reliable picture of your traffic while respecting the rules.

Is your cookie banner compliant?

We check what your pages really load and fix what needs fixing.

Request an audit

Newsletter

Practical notes on web, SEO and AI

One e-mail a month at most: new articles, checklists and what actually works for small businesses. No spam, unsubscribe in one click.

Your address is only used to send this newsletter, through our e-mailing provider Brevo. Privacy policy

Tech news 9 min read

European Accessibility Act: what your website must do now

Since 28 June 2025, the European Accessibility Act requires many online services to be accessible. Who is concerned, who is exempt, which standards apply and how to make your website compliant.

Roma Roterman

Web development 9 min read

Website security for small businesses: 10 practical measures

HTTPS and HSTS, updates, passwords and two-factor authentication, access rights, 3-2-1 backups, firewall, form protection, hosting, monitoring and what the GDPR requires after a breach: ten measures to secure a small business website.

Roma Roterman

Have a project in mind?

Tell us what you want to achieve: you get a clear proposal and a fixed price before any work starts.

Talk about your project