Basics

Do I Need a Cookie Banner? A Straight Answer

You need a cookie banner if your site uses analytics, ads, pixels or embeds and gets visitors from the EU, UK, Quebec or many US states. Here's how to tell.

By the allowedit team · · 7 min read

The short answer

  • If your site only uses cookies it needs to work (a login, a cart, a security check), you don't need consent for them, though you still need to explain them.
  • If you use analytics, ad pixels, heatmaps or embedded videos and maps, and you get visitors from the EU, the UK, Switzerland or Quebec, you need consent before those load.
  • In California and other US states with privacy laws, the rule is different: tracking can run, but visitors must be able to opt out of the sale or sharing of their data.
  • Most small sites use more third-party tools than their owners think, so scan before you decide.

You need a cookie banner if your site sets cookies or similar trackers that aren't strictly necessary, like analytics, ad pixels, heatmaps or embedded videos, and you get visitors from places with consent laws: the EU and EEA, the UK, Switzerland and Quebec. In California and many other US states, you need a way for visitors to opt out of the sale or sharing of their data instead. If your site only uses cookies it needs to work, you don't need consent, but you still need to explain them in your privacy policy.

The hard part isn't the rule. It's knowing what your site actually loads. This guide walks through the questions to ask.

More than cookies. The EU's ePrivacy rules (Article 5(3) of the ePrivacy Directive, which every EU country has put into its own law) cover storing information on a visitor's device, or reading information already there. That includes:

  • Cookies, first-party and third-party.
  • Local storage and session storage.
  • Tracking pixels and the identifiers they set.
  • Device fingerprinting, where a script reads browser details to recognise a visitor.

So "we don't use cookies, we use local storage" doesn't get you out of it. What matters is what the technology does, not what it's called.

Cookies that are strictly necessary to provide something the visitor asked for are exempt. Regulators read "strictly" narrowly. Typical examples:

  • A session cookie that keeps someone signed in.
  • A shopping cart cookie.
  • A load-balancing or security cookie (for example, bot protection on a form).
  • The cookie that remembers the visitor's consent choice.

What's not strictly necessary, even if it feels important to you:

  • Analytics, including Google Analytics.
  • Advertising and retargeting pixels (Meta, Google Ads, TikTok, LinkedIn, Pinterest).
  • Heatmaps and session recording (Hotjar, Microsoft Clarity).
  • Embedded YouTube videos and Google Maps, which set their own cookies when they load.
  • Chat widgets and A/B testing tools, in most configurations.

Which visitors trigger the rules?

The law that applies depends on where your visitors are, not only where your business is.

Where the visitor isWhat the law expectsBanner needed?
EU and EEAOpt-in consent before non-essential cookies (GDPR + ePrivacy)Yes, with Accept and Reject
UKOpt-in consent (UK GDPR + PECR)Yes, with Accept and Reject
SwitzerlandTransparency and an easy way to refuse; many sites use opt-in to match the EUIn practice, yes
QuebecOpt-in for tracking technologies, privacy by default (Law 25)Yes
California and other US states with privacy lawsNotice and an opt-out of sale, sharing or targeted ads; honour Global Privacy ControlAn opt-out link or banner
Most other placesVaries; often a notice in your privacy policy is enoughOptional

For the EU, the important point is that the GDPR also applies to businesses outside the EU that monitor the behaviour of people in the EU. Running analytics or ad pixels on visitors counts as monitoring. A small shop in Ohio with a steady stream of German visitors can be in scope.

For the US, the picture is different. There's no single federal cookie law. Instead, California and a growing list of states (we cover 19 of them, including Virginia, Colorado, Connecticut, Texas and Oregon) give residents the right to opt out of the "sale" or "sharing" of their data, and ad pixels usually count as sharing. Many of these laws only apply to businesses over certain size or data thresholds, so check whether yours qualifies. Our CCPA and Global Privacy Control guide has the details.

So, do you need one? Five questions

Work through these in order.

1. Does your site load anything from a third party?

Look for analytics, ad pixels, embedded videos, maps, fonts, chat widgets and social buttons. If the answer is "nothing but my own code and necessary cookies", you probably don't need a consent banner.

2. Do those things set cookies or read from the device?

Most analytics and all ad pixels do. Some embeds do too: a YouTube player sets cookies when it loads, unless you use the privacy-enhanced mode, and even then it stores data in the browser.

3. Do you get visitors from opt-in regions?

Check your analytics by country. If even a modest share of traffic comes from the EU, the UK, Switzerland or Quebec, plan for opt-in consent.

4. Do you run ads or share data with ad platforms?

If you use the Meta Pixel, TikTok Pixel, Google Ads remarketing or similar, US state laws likely treat that as sharing. You'll need a "Do not sell or share my personal information" option for visitors in those states, and Google needs Consent Mode v2 signals for EEA traffic.

5. Could you remove the tracking instead?

Sometimes the cheapest compliance is deleting a script you don't use. An old heatmap tool or an abandoned pixel adds risk for no benefit. Remove it first, then decide.

What does a compliant banner need?

If the answer is yes, a banner alone isn't enough. It has to actually work:

  1. Nothing optional runs before consent in opt-in regions. The banner has to block scripts, not just display a message. See how to block scripts until consent.
  2. Reject is as easy as Accept. EU regulators expect a reject option on the first layer, as prominent as accept. Our post on the Reject all button explains why.
  3. Choices are specific. Visitors can choose categories (analytics, marketing, preferences), not just all or nothing.
  4. No pre-ticked boxes. The EU's top court ruled in the Planet49 case (2019) that pre-ticked boxes aren't valid consent.
  5. Visitors can change their mind later, through a link or button that reopens the settings.
  6. You can prove it. Keep a record of each choice, so you can show consent if a regulator asks. That's what a consent log is for.

The full list for the EU is in cookie banner requirements under GDPR.

What happens if you don't have one?

Enforcement varies by country and by size. Large companies get the big fines: France's CNIL fined Google and Facebook a combined €210 million in January 2022, because refusing cookies took more clicks than accepting them. Smaller businesses more often get a complaint, a warning or an order to fix things, though fines do happen.

The more practical risks for a small business are:

  • Complaints. Privacy groups such as noyb have filed hundreds of complaints about cookie banners, many against ordinary websites.
  • Lost ad data. Without Consent Mode v2 signals, Google limits how it uses EEA traffic for remarketing and measurement.
  • Customers who notice. Privacy-aware visitors check, and a missing reject button looks careless.

Can a banner be simple?

Yes. A good banner is short: one sentence about what you use cookies for, three buttons (Accept all, Reject all, Customise), and a link to your privacy page. It should look like your site, not like a legal document.

allowedit's cookie banner comes in bar, box or modal layouts, uses your site's font and colours, shows Reject all on the first layer by default, and picks the visitor's language automatically from English, French, German, Spanish, Italian, Dutch and Portuguese. The region rules show opt-in in the EU, the UK, Switzerland and Quebec, an opt-out in the US states with privacy laws, and a notice or nothing elsewhere, your choice. It's free for one site with unlimited page views.

The short version

If you only use what your site needs to work, you don't need a consent banner. If you use analytics, ads, pixels or embeds and you have visitors from the EU, the UK, Switzerland or Quebec, you need one that blocks those tools until people say yes. If you have visitors from US states with privacy laws, you need an easy opt-out. Scan your site, remove what you don't use, and set up the rest properly once.

This article is general information, not legal advice. Laws and how regulators apply them change, so check with a lawyer for your situation.

Frequently asked questions

My business is outside the EU. Do European rules still apply to me?

They can. The GDPR applies to businesses outside the EU that offer goods or services to people in the EU, or monitor their behaviour, and tracking visitors with analytics or ad pixels counts as monitoring. If you have EU visitors and track them, assume the cookie rules apply.

Does Google Analytics need consent?

In the EU, the UK and similar opt-in places, yes. Analytics cookies aren't strictly necessary, so regulators expect consent before they're set. Some regulators allow narrow exemptions for privacy-friendly analytics configured to their rules, but standard Google Analytics doesn't qualify.

Do I need a banner if I don't use cookies at all?

Not for consent. The ePrivacy rules cover any information stored on or read from a device, so local storage and fingerprinting count too. If you truly store and read nothing that isn't needed, a banner isn't required, but you still need a privacy policy.

Is a notice that says 'by using this site you accept cookies' enough?

Not in the EU, the UK or Quebec. Continuing to browse isn't valid consent. Consent has to be a clear action, like clicking Accept, and visitors must be able to refuse just as easily.

What's the cheapest way to add a compliant banner?

allowedit is free for one site with unlimited page views, including the banner, region rules, Google Consent Mode v2, automatic blocking, a monthly scan and a consent log. Pro is $10 a month for 3 sites.