Blog / How the internet works /

Cookie banners: what the law asks for

Everyone has clicked “Accept all” without reading, just to make a banner go away. If you run a website, you’ve also probably wondered whether you need one, what it should say and whether the one you have is any good. This is a plain-words guide to what the law broadly asks for. It isn’t legal advice, and the rules differ by country, so treat it as a map and not a ruling.

Why banners exist

Cookies are small files that a site stores in your browser. Some are essential: they keep you logged in, remember what’s in your basket, or keep the site secure. Others are for analytics, advertising and tracking you across sites.

In Europe, two pieces of law matter. The ePrivacy rules (the “cookie law”) say that storing or reading information on someone’s device generally needs their consent, unless it’s strictly necessary to provide what they asked for. The GDPR sets the standard for what valid consent is, and covers the personal data collected.

The UK has its own version of both, which follows a similar approach. Many other countries have privacy laws with different details. Nigeria’s data protection regulation dates from 2019, and a new Data Protection Act was signed in 2023. If you have visitors from Europe, though, their rules can apply to you wherever you are based.

This is the part most banners get wrong. Under the GDPR, consent has to be:

  • Freely given. Visitors shouldn’t be forced to accept in order to read the page.
  • Specific. Separate choices for separate purposes, like analytics and advertising.
  • Informed. Plain language on what each category does and who’s involved.
  • Unambiguous. A clear action. Scrolling or carrying on browsing isn’t consent. Pre-ticked boxes aren’t either.
  • Easy to withdraw. Taking consent back should be as easy as giving it.

European regulators have also pushed on design. A common view is that rejecting should be as easy as accepting: if “Accept all” is a big button on the first layer, “Reject all” should be there too, not buried three clicks deep.

Crucially, non-essential cookies shouldn’t be set before the visitor agrees. A banner that sets Google Analytics and ad cookies on page load and then asks for permission is for show.

Cookies that are strictly necessary: login sessions, shopping baskets, load balancing, security, remembering the choice you made on the banner itself. You should still mention them in your privacy or cookie policy.

Analytics is where opinions differ. In some countries, certain low-intrusion analytics can be exempt. In others, it needs consent. This is one reason to check with your local regulator’s guidance, or a lawyer, for anything beyond a basic site.

What a decent banner does

  1. Explains in one or two sentences what it’s for.
  2. Offers accept and reject with equal weight.
  3. Lets visitors choose by category, such as essential, analytics, marketing.
  4. Blocks non-essential scripts until the visitor says yes.
  5. Remembers the choice and doesn’t nag on every page.
  6. Links to a policy listing the cookies, their purpose and how long they last.
  7. Lets people change their mind later, with a link in the footer.

Most consent management tools do this. Many are free for small sites and paid for larger ones. Look at what they actually block, not just how nice the box looks.

What to do on a small site

Say you run a small business WordPress site with Google Analytics and a contact form.

  • List what’s actually running. Open your browser’s developer tools, look under Application, then Cookies, and see what’s set on first load. Also check scripts from social buttons, embedded videos and ad pixels.
  • Remove what you don’t need. Fewer trackers, simpler banner.
  • If you keep analytics and marketing tags, put them behind consent, using your tag manager or consent tool.
  • Write a short cookie policy that matches reality.
  • Test it in a private window. Before clicking anything, check that no non-essential cookies were set.
  • Re-test after plugin or theme updates, since new scripts creep in.

If you use Google’s tools, there’s a feature that adapts tags to a visitor’s consent choice. I’ll cover it in more detail in a later post, so for now, just know it exists.

Common mistakes

  • “By using this site you accept cookies.” Not valid consent in the GDPR sense.
  • A banner with only “OK”. No real choice.
  • Tags that fire anyway. The banner is cosmetic if scripts load regardless.
  • Dark patterns: a bright accept button and a faint grey reject link.
  • Copying a policy from another site. It won’t match your cookies.
  • Setting and forgetting. New plugins mean new cookies.

And for non-European visitors?

If your audience is elsewhere, a banner may not be legally required, but it can still be good practice and good for trust. Where your visitors come from matters more than where you sit. Check your analytics to see how many are in Europe or the UK.

Key takeaways

  • Consent must be free, specific, informed, unambiguous and easy to withdraw.
  • Don’t set non-essential cookies until the visitor agrees.
  • Rejecting should be as easy as accepting.
  • Strictly necessary cookies don’t need consent but should be disclosed.
  • Fewer trackers means a simpler banner and fewer legal worries.

Open your site in a private window and look at which cookies appear before you click anything. Are there any you can’t explain?