Cookie banners: what UK law asks of your website
Analytics and advertising cookies need consent in the UK. What a compliant banner does, and the common mistakes that make one unlawful.
In the UK, the rules on cookies come from the Privacy and Electronic Communications Regulations (PECR), read alongside UK GDPR. In short: a cookie that isn’t needed to run the site needs the visitor’s consent before it is set.
Which cookies need consent?
Essential cookies, such as the one that remembers items in a basket, usually don’t. Analytics and marketing cookies, such as Google Analytics and advertising pixels, do. Check each tool you add to your site, because some set cookies as soon as the page loads.
What a valid banner does
- It asks before any non-essential cookie is set. Nothing loads first and asks later.
- It offers a clear way to refuse, at the same level as accepting.
- It explains, in plain words, what each cookie group is for.
- It lets people change their mind later through a link, usually in the footer.
Common mistakes
Many sites load analytics first and show the banner afterwards. Others treat scrolling or closing the banner as consent. Neither is reliable. A banner that is only decoration does not make a site compliant.
What we do
The websites we build load Google Analytics only after a visitor accepts, and a visitor who declines can still use the whole site. If you use analytics today, check when it loads and whether a refusal is respected.
Questions people ask
Do I need a cookie banner if I only use Google Analytics?
Yes, in most cases. Analytics cookies are not strictly necessary, so you need consent before they are set. Check the current ICO guidance for your exact setup.
Is a banner with only an Accept button allowed?
Refusing should be as easy as accepting. A banner that only offers Accept, or hides the refuse option behind several screens, is unlikely to count as valid consent.