Cookie Consent for UK Websites: A Practical Guide

Getting cookie consent right on UK websites is more than a legal formality. The Information Commissioner's Office actively enforces the rules, and users increasingly expect proper consent mechanisms. This guide explains what the law requires and how to implement it properly.

The Two Laws That Apply

UK websites must comply with two overlapping pieces of legislation:

PECR requires consent before you place non-essential cookies. UK GDPR sets the standard for what valid consent looks like.

What Counts as a Cookie?

The rules apply to any technology that stores or accesses information on a user's device:

If it stores data on the user's device or identifies them across sessions, it needs consent (unless it's strictly necessary).

Essential vs Non-Essential Cookies

Strictly necessary cookies don't require consent. These are cookies that:

Everything else requires explicit consent before being set:

Common mistake: Many sites argue that analytics cookies are "strictly necessary" because they help improve the website. The ICO has explicitly stated this is not a valid argument. Analytics cookies require consent.

What Valid Consent Looks Like

Under UK GDPR, consent must be:

What This Means in Practice

Building a Compliant Cookie Banner

First Layer: The Banner

Your cookie banner should appear before any non-essential cookies are set and include:

Second Layer: Preference Centre

The preference centre should allow users to:

Third Layer: Cookie Policy

Your full cookie policy should detail:

Implementing Cookie Consent

Option 1: Cookie Consent Platforms

Services like Cookiebot, OneTrust, or Cookie Information handle the complexity for you:

Option 2: Self-Hosted Solutions

Open-source tools like GDPR Cookie Consent or custom implementations give you more control:

Technical Implementation

The key technical requirement: non-essential cookies must not fire until consent is given. This typically means:

  1. Loading tracking scripts conditionally based on consent status
  2. Using a consent management platform's tag manager integration
  3. Storing consent status in a cookie (which is itself "strictly necessary")

Common Compliance Failures

Based on ICO enforcement actions, these are the most common mistakes:

Testing Your Implementation

To verify your cookie consent works properly:

  1. Clear all cookies and visit your site in a private browser window
  2. Check the network tab in browser developer tools - no analytics or advertising requests should fire
  3. Click "Reject All" - non-essential cookies should not be set
  4. Verify the consent preference persists across sessions
  5. Test that withdrawing consent actually stops tracking

Record Keeping

UK GDPR requires you to be able to demonstrate compliance. Keep records of:

Most cookie consent platforms handle this automatically. If you're building your own solution, you need to implement consent logging.

Penalties

The ICO can issue fines up to £17.5 million or 4% of global turnover for serious GDPR breaches. In practice, enforcement against small businesses typically starts with:

Fines are reserved for serious or persistent non-compliance. But the reputational damage from ICO action can be significant.

Quick Implementation Checklist

Building a new website? I implement proper cookie consent as standard on every UK business website I build. Get in touch to discuss your project.