Web development
Cookies and consent on UK websites: a practical guide to UK GDPR and PECR
What cookies are, when you need consent, and how to set up a cookie banner properly. A plain-English guide for UK business websites, with the caveat that it is not legal advice.
By Zafirox Tech Team · · 3 min read
If your website uses analytics, advertising pixels or embedded content, you probably use cookies, and UK rules say you must handle them properly. This guide explains the basics in plain English. It is general information, not legal advice, and the rules and the regulator's guidance can change, so check current guidance from the Information Commissioner's Office (ICO) or take professional advice for your situation.
What are cookies?
Cookies are small files that a website stores on a visitor's device. Similar technologies, such as local storage and tracking pixels, work in comparable ways. They are used to remember settings, keep people logged in, measure traffic and show adverts.
The two sets of rules
- PECR (the Privacy and Electronic Communications Regulations) covers storing or accessing information on a person's device. In general you need consent first, unless the cookie is strictly necessary for something the visitor has asked for.
- UK GDPR applies when you process personal data, which can include online identifiers. It sets standards for what valid consent looks like, and requires transparency, a lawful basis and respect for people's rights.
Which cookies usually need consent?
Typically, consent is needed for:
- Advertising and remarketing cookies and pixels.
- Social media tracking.
- Most analytics tools, though the rules around some analytics cookies have been changing. Check the latest ICO guidance for your set-up.
- Embedded third-party content that sets cookies, such as some video and map embeds.
Strictly necessary cookies do not need consent. Examples include those that keep items in a basket, remember a security setting or keep an admin logged in. They should still be explained in your cookie information.
What valid consent looks like
- Clear and specific. Say what each category does in plain language.
- A real choice. "Accept" and "Reject" should be equally easy to find. Pre-ticked boxes do not count as consent.
- Nothing non-essential before consent. Analytics and marketing scripts must not run until the visitor agrees.
- Easy to withdraw. People should be able to change their mind as easily as they agreed, for example through a link in the footer.
- Recorded. Keep a record of what a visitor chose and when.
Setting up a compliant banner: a checklist
- Audit your cookies. Use your browser's developer tools or a scanning tool to list what your site actually sets, including those from plugins and embeds.
- Categorise them as necessary, analytics, marketing and so on.
- Block non-essential scripts until consent is given. Configuring the banner is not enough if the scripts still load.
- Write a cookie policy listing each cookie or type, its purpose and how long it lasts.
- Link to a privacy notice that explains what personal data you collect and why, who you share it with and how people can exercise their rights.
- Test it. Visit the site in a private window, decline cookies and confirm nothing non-essential is set.
- Review regularly. New plugins and tools add new cookies.
Common mistakes
- A banner that says "by continuing you agree" while analytics already runs.
- No simple "Reject" option.
- Copying another company's policy that does not match your actual cookies.
- Forgetting embeds such as videos, maps and chat widgets.
- Never revisiting the set-up after launch.
Does consent affect your analytics and SEO?
If many visitors decline, your analytics will under-report traffic. That is a normal consequence, and Google Search Console, which does not rely on your own cookies, is still a useful source of search data. It is worth knowing your numbers are a sample rather than a full count.
When we build websites we load analytics only after consent and document each cookie. If you want help auditing an existing site, see our website design and development service or contact us. For wider quality checks before going live, use our launch checklist.