Short answer: in the EU a cookie banner must ask before any non-essential cookie is set, offer a reject option on the first screen that is as easy as accepting, have no pre-ticked boxes, let visitors change their mind later, and keep a record of each choice. Technically it must also stop analytics and ad tags until consent, and pass the choice to Google tags through Consent Mode v2. Test it in a private window: refuse, then check that no _ga, _fbp or _gcl_au cookies appear.
Which law requires a cookie banner?
Two rules work together. Article 5(3) of the ePrivacy Directive says that storing or reading information on a visitor's device needs consent, except when it is strictly necessary for the service they asked for. The GDPR defines what valid consent is: freely given, specific, informed and unambiguous, given by a clear action, and as easy to withdraw as to give. Each EU country put the directive into its own law, so the details differ slightly, but the core is the same everywhere.
Strictly necessary cookies, such as a shopping cart, a login session or the cookie that remembers the consent choice itself, do not need consent. Analytics (GA4, Clarity, Hotjar), advertising (Google Ads, Meta Pixel, TikTok) and most embedded videos do.
What regulators look at
In 2023 the European Data Protection Board's cookie banner taskforce compared how national authorities handle complaints. France's CNIL, which coordinated the work, summarised the main points:

The taskforce also confirmed that pre-ticked boxes do not give valid consent, even on the second layer, and that a reject link placed outside the banner or hidden in plain text is a problem. On colours there is no fixed rule, but a reject button designed to be overlooked will not pass a review.
What your banner must do
- Reject on the first layer. "Reject all" or "Only necessary" next to "Accept all", not two clicks deep.
- No pre-ticked categories. Analytics and marketing switches start off.
- Clear purposes. Short text saying what each category is for, with a link to the cookie policy.
- Easy to change. A link in the footer or a small icon that reopens the banner, so withdrawing is as easy as agreeing.
- Consent log. Proof of what each visitor chose and when. Hosted platforms store this for you.
- Real blocking. Tags wait for consent. A banner that only shows text while GA4 already runs is a failure we see often in audits.
The tools behind the banner matter less than the configuration. Our comparison of Cookiebot, CookieYes and Complianz shows the vendors' own banners, all of which put reject on the first screen.
How the banner should control tags
- Load the banner first. In Google Tag Manager its tag fires on Consent Initialization - All Pages, before anything else.
- Set a default of denied for all four Consent Mode v2 signals, then update them when the visitor chooses. GA4 and Google Ads read these signals themselves.
- Block tags that do not read Consent Mode, such as Meta Pixel, TikTok, Hotjar and Microsoft Clarity, with the banner's script blocking or with consent checks in GTM.
Test your cookie banner in five minutes
- Open the site in a private window. Is there a reject option on the first screen?
- Open the settings. Are all optional categories off?
- Click reject, then open the browser's developer tools, Application → Cookies. There should be no
_ga,_gid,_fbp,_gcl_auor_clck. - Connect Tag Assistant and check that the consent state is denied before you click and stays denied after refusing.
- Find the link or icon that reopens the banner and change your choice.
For a quick first look without a browser test, our website tracking checker shows whether a known banner and a Consent Mode default command exist in the page code.