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.
On this page
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.
The principle: no consent, no tracker
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).
Which cookies do not need consent?
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.
Google Consent Mode v2 in plain language
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
Open your site in a private browsing window and open the browser’s developer tools (Application or Storage tab, and Network tab).
Before clicking anything, check that no advertising or analytics cookie is present and that no request goes to advertising or tracking services.
Check that “Reject all” is as visible as “Accept all”.
Click “Reject all”, browse a few pages: still no tracking cookie, no tracking requests.
Reopen the settings from the footer link and check that you can change your choice.
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?
Can I use a “cookie wall” that blocks the site until visitors accept?
How often should I ask visitors again?
Will refusing cookies ruin my statistics?
Is your cookie banner compliant?
We check what your pages really load and fix what needs fixing.