Free, independent guides since 2010

Security & privacy

Cookie consent banners done right

How cookie consent works under EU rules: which cookies need consent, what a compliant banner looks like, rejecting as easily as accepting, consent records, Consent Mode and how to avoid needing a banner at all.

<guide section="Security & privacy" type="article" read="1 min"/>

The rules on cookies come from the ePrivacy directive; the GDPR defines what valid consent is. National data protection authorities, including the Belgian one, have fined websites for misleading banners. This page explains what a good banner looks like – and how to avoid needing one. It is not legal advice.

TypeConsent needed?
Strictly necessary (cart, login session, security, consent choice)No
Preferences (language, layout), if not strictly necessaryUsually yes
AnalyticsUsually yes
Marketing, advertising, social media trackingYes

The same applies to similar technologies: local storage, pixels and fingerprinting.

A compliant banner

  • “Accept” and “Reject” on the first layer, equally visible.
  • No pre-ticked categories.
  • Clear information on purposes and third parties.
  • No tracking before a choice is made.
  • Easy to change or withdraw consent later (a link in the footer).
  • Consent records stored as proof.

Google’s Consent Mode passes the visitor’s choice to Google tags. Since March 2024 Google requires it for advertisers who use its ad features with visitors from the EEA. It does not replace a compliant banner – see Consent Mode and analytics.

Avoiding the banner

  • Self-host fonts and scripts.
  • Use cookie-less, privacy-friendly analytics (see privacy-friendly analytics).
  • Load videos and maps only after a click.
  • Skip social media tracking pixels if you do not use them for ads.

Frequently asked questions

Do I need a banner for analytics?

For most analytics tools that use cookies or identifiers, yes. Some privacy-friendly tools work without cookies; whether they need consent depends on their setup and national guidance.

Is “by continuing to browse you accept cookies” valid?

No. Consent must be a clear, active choice. Scrolling or continuing to browse is not consent.