Cookies and consent: what your site sets and when you need a banner

Last updated

The short answer

Find out what your site actually stores on a visitor's first visit. Cookies the site needs to work (a basket, a login, remembering the visitor's cookie choice) can stay. In the UK and the EU, analytics and advertising cookies usually must wait until the visitor agrees, so you need a banner that asks first, remembers the answer and can be reopened. In most US states they may run from the first page, but you must say so and offer a way to opt out. Either way, keep a cookie policy that matches what the site really sets.

What cookies are, and which kinds need consent

A cookie is a small piece of data a site stores in the visitor's browser. Sites also use similar browser storage that works the same way for these purposes. They fall into two groups:

Cookies set under your own address are first-party; cookies set by another company's address, from a script or embed on your page, are third-party. Browsers are restricting third-party cookies, and Google's guidance explains how to prepare for that.

When you need a banner depends on where your visitors are and what each cookie is for. In the EU, cookies that aren't strictly necessary need the visitor's consent before they are set, so a site with analytics or advertising tags needs a way to ask. UK guidance now allows a few limited exceptions: statistics used only to improve your own site or service can run without consent, if you tell visitors clearly and give them a simple, free way to object. That doesn't cover advertising or tracking people, so check the regulator's conditions before relying on it. A site that sets only strictly necessary cookies doesn't need to ask. The US works differently, as the next section explains. This guide is not legal advice; your country's data-protection regulator publishes the rules that apply to you.

If your visitors are in the US

In most US states, analytics and advertising tags may run from the first page without asking first. The site still has to:

Some states, and sensitive data such as health information, need more. The CCPA applies only to businesses above certain thresholds, which California's Attorney General sets out; ask a lawyer which laws apply to you. For visitors in the UK and the EU, asking first remains the rule, with the UK statistics exception above.

Why it matters to a small business

A banner that asks but loads the tracking tags anyway gives the impression of consent without the substance, and a cookie policy that doesn't match the site is easy for anyone to check against it. It also matters for your own numbers: if your analytics tags load before anyone has answered, the figures you rely on include people who later said no. What a banner that holds analytics back does to your visitor numbers is in how many people visit my website?.

How the free scan decides

The scan visits the homepage as a new visitor who hasn't answered any banner, and records what is stored and what is loaded.

Putting it right

  1. Start from the inventory. Take the list from your report and, for each cookie, note who sets it, what it is for and how long it lasts. Remove the tags and embeds you no longer use; each one gone is one less thing to ask about.
  2. Hold back what needs consent. Where consent is required, use a consent tool that blocks analytics and advertising tags until the visitor agrees, and only then loads them. If you use Google's tags, consent mode passes the visitor's answer to them. It doesn't ask for consent or make the site compliant on its own. In its basic form, Google's tags wait until the visitor agrees; in its advanced form, they still send requests without cookies while consent is refused. So check the network requests as well as the stored cookies, after refusing and after withdrawing consent.
  3. Make the banner fair. Offer accepting and refusing with equal ease, remember the answer, and put a permanent "Cookie settings" link in the footer that reopens the choice.
  4. Respect the opt-out signal. Where the CCPA applies, a browser that sends Global Privacy Control has opted out of the selling or sharing of personal information. That is narrower than refusing every cookie. Most consent tools have a setting for it; switch it on, then check that the tags that share data stop.
  5. Write the policy from the inventory. A table with each cookie's name, who sets it, its purpose and how long it lasts, linked from the banner and the footer. When the scan finds a cookie lasting longer than the policy says, correct whichever of the two is wrong.
  6. Look again after changes. A new plugin, app or embed often brings its own cookies; add it to the inventory and the policy when you add it to the site.

Where to set it up, by platform

How to check yours

Open your homepage in a private window and, before touching the banner, open the browser's developer tools and look at the stored cookies (in Chrome, Application › Cookies). Anything for analytics or advertising there has been set without consent. Then refuse, reload and look again. The free scan does the same as a new visitor and lists each cookie with who set it; the sample report shows the layout.

Checklist

What the free scan checks for this

These are the FocalScore checks that cover this guide's subject. Each one in your report says what it found, shows the evidence and gives the fix.

Sources

Last checked . Documentation, settings and rules change; if one of these pages now says something different, it is right and this guide is out of date. Tell us at info@focalscore.com.

  1. Google Tag Platform: Set up consent mode
  2. Privacy Sandbox: Prepare for third-party cookie restrictions
  3. OWASP Cheat Sheet: Session management
  4. California Attorney General: California Consumer Privacy Act (CCPA)
  5. ICO: What are the exceptions? (storage and access technologies)

All 6 guides on accessibility, privacy and cookies · All guides