Websites & landing pages7 min readReviewed by the Softivum team,

What does UK cookie law require for a business website?

Short answer

Under PECR, a UK website needs a visitor's consent before it stores or reads anything on their device, unless an exception applies. Strictly necessary items, such as a basket cookie, are exempt. Advertising pixels never are. Valid consent needs a clear, positive choice, and refusing must be as easy as accepting.

A business owner reviewing their website on a laptop at a shop-front desk.

The key points

  • The rule covers cookies, pixels, web storage, scripts and fingerprinting, not only cookies.
  • Advertising and cross-site tracking always need consent; a basket or login cookie does not.
  • Consent must be a clear action, with reject as easy as accept and nothing set beforehand.
  • Analytics can be exempt only when it meets every condition in the ICO's statistical-purposes exception.
  • A cookie inventory comes first; the banner is built from it.

Which law covers cookies on a UK website?

The Privacy and Electronic Communications Regulations 2003 (PECR) cover them, with the UK GDPR applying on top whenever personal data is involved. The Information Commissioner's Office (ICO) now calls its guidance storage and access technologies, because the rule is about storing or reading information on a visitor's device, not about one file type.

The rules apply to any organisation running an online service, whatever its size, and to UK organisations whose sites are hosted overseas (ICO: What are the PECR rules?). A two-page brochure site and a large shop are under the same rule. What differs is how many technologies each one uses.

Consent under PECR means the same thing as consent under the UK GDPR. That is why a banner that nudges people towards Accept, or sets tracking before anyone has chosen, fails even when the wording looks polite.

Which technologies count, besides cookies?

The ICO lists six: cookies, tracking pixels, link decoration, device fingerprinting, web storage and scripts or tags (ICO: What are storage and access technologies?). A site that avoids cookies but loads a tracking script or writes to local storage is still inside the rule.

This matters when a developer says the site is cookie-free. The test is whether anything is stored on, or read from, the visitor's device without an exception applying.

  • Cookies: small text files set by a web server, used to remember a basket or to track browsing.
  • Tracking pixels: a small image or code snippet that tells a server a page or email was viewed.
  • Link decoration: extra information added to a link's URL, sometimes used to follow someone across sites.
  • Device fingerprinting: combining software and hardware details until they identify one device.
  • Web storage: data kept in the browser, also called local storage.
  • Scripts and tags: JavaScript that gathers data about visitors, often added through a tag manager.

Consent is not needed when one of five narrow exceptions applies: communication, strictly necessary, statistical purposes, appearance, or emergency assistance (ICO: What are the exceptions?). Each depends on the sole purpose of the technology, judged from the visitor's side, not yours.

The ICO is clear about the other direction too. Advertising cookies are never strictly necessary, and neither is cross-site or cross-device tracking or social media tracking. The comparison table further down sets out how the guidance treats the items most business sites use.

How does the analytics exception work?

Analytics can run without consent only if its sole purpose is statistical information used to improve your service or website. The ICO adds conditions: the results must be aggregate and not personal data, they must not be used to make decisions about individuals, and visitors must get clear information and a simple, free way to object.

If a third party runs the analytics, it must act as your processor, may share information only to help you improve your service, and must not link it with other data. Page visits, scroll depth, device and browser types, referrers, coarse location such as city, load speed and A/B testing fit the exception. Recordings of individual visits, ad-view measurement and profiling visitors do not.

Analytics tools often ship with advertising or vendor data-sharing settings switched on. That is why we check the vendor settings against each condition before treating analytics as exempt. If you cannot confirm every condition, ask for consent. Your adviser confirms how the exception applies to your set-up.

A clear, positive action by the visitor, with information given before they choose (ICO: How do we manage consent in practice?). Continuing to browse is not consent, and neither is a pre-ticked box. If a visitor ignores the banner and clicks through to another page, you must not set anything that needs consent.

The ICO's good-practice examples show Accept all and Reject all with equal prominence, and optional categories switched off by default. A banner with no reject option is bad practice. Visitors must also be able to withdraw consent as easily as they gave it, and you must be able to show what each visitor chose.

Third parties that will receive data, such as an advertising network, are named clearly and specifically in that information. A vague line such as 'we use partners to improve your experience' does not meet it.

What does a compliant build look like?

It starts with an inventory, not a banner. Every cookie, local-storage key and third-party tag is listed with who sets it, how long it lasts and why. Anything that fails the exceptions is blocked at the source until the visitor accepts, which means the tag manager is configured to wait, not just hidden behind a pop-up.

The same discipline covers fonts and embeds. The ICO says font libraries can fit the appearance exception when the provider uses the data only to serve the font, and suggests self-hosting as an option. An embedded video from a platform that also tracks is a different case and usually needs a consent gate or a click-to-load notice.

When marketing adds a new pixel later, the inventory shows whether the banner still tells the truth. We build this into website development scopes and re-check it in website maintenance. The pre-launch pass sits alongside the other checks in our website launch checklist, and consented analytics events feed the reports described in how to track enquiries in GA4.

The inventory is handed over with the staging site, so the legal reading happens before launch rather than after. The wider setup for UK businesses is on our United Kingdom page.

How the ICO's guidance treats common items on a business website

How the ICO's guidance treats common items on a business website
ItemConsent needed?Why
Basket or checkout cookieNoStrictly necessary for a service the visitor asked for
Login session for a signed-in userNoStrictly necessary while the visit lasts
Cookie that remembers the consent choiceNoStrictly necessary when used only for that purpose and the visitor is told
Language or dark-mode preferenceNo, if used only for thatAppearance exception, with clear information and a free way to object
Aggregate analytics for improving the siteNo, if every condition is metStatistical-purposes exception; otherwise consent
Advertising pixel or retargeting tagYesAdvertising is never strictly necessary or statistical
Cross-site or social media trackingYesNever strictly necessary, even for non-members
Session recordings of individual visitorsYesOutside the statistical-purposes exception

How to audit a site for cookie consent

  1. List everything that is stored or read

    Use the browser's storage panel and a network log to list cookies, local-storage keys, pixels and tags, noting who sets each and how long it lasts.

  2. Give each item a purpose

    Write the sole purpose of each one. If the purpose is mixed, such as analytics that also feeds advertising, treat it as needing consent.

  3. Match each purpose to an exception

    Check each item against the ICO's five exceptions and conditions. Anything that does not clearly match goes behind consent.

  4. Block before consent, not after

    Configure the tag manager so consent-dependent tags do not load until the visitor accepts, and test with a fresh browser profile.

  5. Build and test the banner

    Equal Accept and Reject options, categories off by default, a way to change the choice later, and a stored record of each choice.

Cookie consent checklist for a UK business site

  • Do you have a current list of every cookie, storage key and tag?
  • Is every consent-dependent tag blocked until the visitor chooses?
  • Are Accept and Reject equally easy, with optional categories off by default?
  • Can a visitor withdraw consent from the same place they gave it?
  • Is each analytics tool checked against the statistical-purposes conditions?
  • Are third parties named clearly in the cookie information?
  • Is the inventory re-checked whenever a new tag is added?

Sources

Rules and guidance this answer relies on. Policies change, so check the current version before acting on it.

  1. ICO: Guidance on the use of storage and access technologies
  2. ICO: What are the PECR rules?
  3. ICO: What are the exceptions?
  4. ICO: How do we manage consent in practice?
  5. ICO: What are storage and access technologies?

Questions people also ask

Only if it uses something that needs consent. A site using only strictly necessary items and analytics that meets the exception needs no banner, though it still gives clear information and a simple, free way to object to the analytics. Add advertising or social tracking and consent is required, whatever the site's size.

No. The ICO says continuing to use a site is not valid consent, and neither is a pre-ticked box. Consent needs a clear, positive action, and non-essential items must not be set before it.

Not by law. The ICO notes a platform can help record choices, but the duty is to obtain valid consent and show it. A well-built custom banner with a stored record meets the same duty.

Want this applied to your business?

Tell us what you are planning in a free 30-minute call, or have your current website checked first with no call needed.

Get a Free 2-Minute Website Audit

Free 30 minutes · no obligation

WhatsAppCall