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.
What counts as a cookie for these laws?
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.
Which cookies don't need consent?
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 is | What the law expects | Banner needed? |
|---|---|---|
| EU and EEA | Opt-in consent before non-essential cookies (GDPR + ePrivacy) | Yes, with Accept and Reject |
| UK | Opt-in consent (UK GDPR + PECR) | Yes, with Accept and Reject |
| Switzerland | Transparency and an easy way to refuse; many sites use opt-in to match the EU | In practice, yes |
| Quebec | Opt-in for tracking technologies, privacy by default (Law 25) | Yes |
| California and other US states with privacy laws | Notice and an opt-out of sale, sharing or targeted ads; honour Global Privacy Control | An opt-out link or banner |
| Most other places | Varies; often a notice in your privacy policy is enough | Optional |
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:
- 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.
- 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.
- Choices are specific. Visitors can choose categories (analytics, marketing, preferences), not just all or nothing.
- No pre-ticked boxes. The EU's top court ruled in the Planet49 case (2019) that pre-ticked boxes aren't valid consent.
- Visitors can change their mind later, through a link or button that reopens the settings.
- 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.