Do I need a cookie banner on my website?

By Toby · Published April 2026 · Last updated April 2026

If your website sets any non-essential cookies — including analytics trackers, marketing pixels, or social media embeds — then yes, PECR Regulation 6 requires you to inform visitors and get their consent before those cookies are set. The only exception is for cookies that are strictly necessary for a service the user has explicitly requested.

The short answer for most websites is: you almost certainly need a cookie banner. But the detail matters — what kind of banner, when it needs to appear, and what it must do. This guide walks you through a simple decision process and explains exactly what the law requires.

What counts as a cookie under UK law

Before working out whether you need a banner, you need to understand what PECR considers a "cookie." The regulations use technology-neutral language — Regulation 6 covers any technology that stores information on or accesses information from a user's device. This includes:

If any of these technologies are present on your website for non-essential purposes, the consent requirement applies.

The flowchart: do you need a cookie banner?

Work through these questions to determine your obligations:

Does your website set any cookies at all?

If your website genuinely sets zero cookies, local storage entries, or tracking technologies, you do not need a cookie banner. This is rare — most websites set at least some cookies, even if just from the content management system or hosting platform. To check, open your browser's developer tools (F12), navigate to the Application or Storage tab, and look for cookies, local storage, and session storage entries.

Are all cookies strictly necessary?

If every cookie your site sets is strictly necessary for providing a service the user has requested, you need to inform users about those cookies but you do not need to ask for consent. Strictly necessary cookies include authentication sessions, shopping cart functionality, load balancing, and security tokens. In this scenario, a simple informative notice is sufficient. However, this situation is uncommon — most websites include at least one non-essential technology.

Do you use analytics tools?

If you use Google Analytics 4, Hotjar, Microsoft Clarity, or similar analytics platforms, these set non-essential cookies. You need a consent banner that blocks these tools until the user opts in. The only analytics tools that typically do not require consent are cookieless alternatives like Fathom Analytics, Plausible, and Simple Analytics.

Do you use marketing or advertising tools?

If you use Meta Pixel (Facebook Pixel), Google Ads conversion tracking, LinkedIn Insight Tag, TikTok Pixel, or similar marketing tools, all of these set non-essential cookies. You need consent before loading any of them.

Do you embed third-party content?

Embedding YouTube videos, Google Maps, social media feeds, or third-party chat widgets can set cookies from those third-party domains. Check whether each embed sets cookies — if it does, you need consent for it. Consider using privacy-enhanced embed modes (YouTube offers a no-cookie embed URL) or facade patterns that show a static placeholder until the user consents.

What "strictly necessary" actually means

The ICO defines strictly necessary cookies as those that are essential to provide a service the user has explicitly requested. The key word is "requested" — the service must be something the user actively wanted, not something you decided to provide.

Examples of strictly necessary cookies:

Examples of cookies that are NOT strictly necessary:

Common tools that DO require consent

These widely-used tools set non-essential cookies and require consent under PECR:

Common tools that DON'T require consent

These tools operate without setting non-essential cookies:

For a detailed comparison of analytics options, see our guide to analytics alternatives.

Not sure what cookies your website sets?

Our free scan detects cookies, trackers, and third-party scripts on your site automatically.

Scan your website free

What a compliant banner looks like

A PECR-compliant cookie banner is not just a notification — it is a functional consent mechanism. It must:

For tools that handle these requirements, see our comparison of cookie consent tools for UK websites.

How to check what cookies your site sets

Common mistakes

Cookie walls that block access

A cookie wall prevents users from accessing your website unless they accept all cookies. The ICO considers this problematic because consent must be freely given. If the only option is "accept everything or leave," that is not a genuine choice. Provide a way to use the site with only strictly necessary cookies.

Pre-ticked consent boxes

Loading your cookie banner with all categories pre-selected and requiring users to untick boxes they do not want is not valid consent. The Planet49 ruling established that pre-ticked boxes do not constitute consent. All non-essential categories must be off by default, requiring an affirmative action to enable them.

"By continuing to browse, you agree"

Scrolling, clicking a link, or simply continuing to use a website is not an affirmative act of consent. This approach was common in the early days of cookie regulation but has been explicitly rejected by the ICO and European data protection authorities. You need an active opt-in — a click on an "Accept" button or a toggle switched on by the user.

No granular options

Offering only "Accept All" and "Reject All" without the ability to consent to specific categories (analytics, marketing, functional) does not meet the informed consent standard. Users should be able to accept analytics cookies while rejecting marketing cookies, for example. Provide category-level controls at a minimum.

Banner does not actually block cookies

The most dangerous mistake: your banner looks compliant but does not technically prevent non-essential cookies from loading before consent. Many basic cookie banner plugins simply display a notice without integrating with your actual scripts. Test this by opening developer tools before interacting with your banner — if analytics or marketing cookies appear before you have clicked anything, your implementation is broken.

Frequently asked questions

What if I only use analytics cookies?

You still need consent. Analytics cookies like those set by Google Analytics 4 are classified as non-essential under PECR because they are not strictly necessary for providing a service the user has requested. The ICO's position is clear: analytics cookies require informed consent before they are set. The alternative is to use a cookieless analytics tool like Fathom Analytics or Plausible, which do not set cookies and therefore do not require a consent banner for that specific purpose.

Is Google Analytics exempt from cookie consent requirements?

No. Google Analytics 4 sets cookies on the user's device and is not considered strictly necessary under PECR. You must obtain consent before loading GA4 scripts. Google's own consent mode can help by adjusting GA4's behaviour when consent is not given, but the default implementation still requires a consent mechanism. There is no special exemption for Google Analytics or any other analytics platform that uses cookies.

What about WordPress session cookies?

WordPress sets several cookies depending on your configuration. Session cookies for logged-in administrators are generally considered strictly necessary for providing the admin service. However, if your WordPress site uses plugins that set cookies for analytics, marketing, social sharing, or comments, those cookies are non-essential and require consent. Common offenders include Jetpack (WordPress.com Stats), social sharing plugins, and comment system plugins. Audit your specific WordPress installation to identify all cookies being set.

Can I just use a cookie notice instead of asking for consent?

Only if all your cookies are strictly necessary. If every cookie on your site is essential for providing a service the user has requested (such as authentication or shopping cart functionality), you need to inform users about these cookies but you do not need to ask for consent. A simple notice is sufficient in this case. However, if you use any non-essential cookies — analytics, marketing, social media embeds — you must obtain active consent before those cookies are set. A notice alone is not enough.

What is the minimum I need for a compliant cookie banner?

At minimum, a compliant cookie banner must: clearly explain what cookies you use and why, provide a way to accept or reject non-essential cookies before they are set, not use pre-ticked boxes or assume consent from continued browsing, offer granular options so users can consent to some categories while rejecting others, and provide an easy way to change preferences later. The banner must actually block non-essential cookies until consent is given — it is not enough to just display a notice while cookies load in the background. For tools that handle this correctly, see our comparison of cookie consent tools.

Want to check if your website meets these requirements?

Our free scan checks your cookies, consent setup, and compliance in under 60 seconds.

Scan it free