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. Analytics and advertising cookies, in many places including the UK and the EU, must wait until the visitor agrees. If you set them, you need a banner that asks first, remembers the answer and can be reopened, and 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:
- Strictly necessary: what the site can't work without, such as the basket, a login session, security tokens and the record of the visitor's cookie choice.
- Everything else: analytics, advertising and remarketing tags, and embedded services such as social media widgets or video players that set cookies of their own.
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. In the UK and 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. A site that sets only strictly necessary cookies doesn't need to ask. Elsewhere the rules differ: California, for example, treats the Global Privacy Control signal some browsers send as an opt-out of selling or sharing personal data. This guide is not legal advice; your country's data-protection regulator publishes the rules that apply to you.
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.
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.
- What your site stores on a first visit is the inventory: the cookies and browser storage a first visit leaves behind, for information.
- Cookies before consent fails when trackers or tracking beacons fire before consent, and warns when third-party fonts load before it.
- Cookie consent banner fails when there is no consent banner where one is needed, and Cookie policy when the site sets tracking cookies but publishes no cookie policy.
- Cookie lifetimes match the policy fails when a cookie lasts longer than the site's own cookie policy says it does.
- Visitors who opt out of tracking are respected fails when the homepage still sets tracking cookies for a visitor whose browser sends the Global Privacy Control opt-out.
- A cookie choice is remembered and can be changed fails when the banner asks again after the visitor has answered, or there is no way to change the answer later.
- Third-party cookies lists cookies set for other companies' domains, which browsers increasingly block.
Putting it right
- 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.
- Hold back what needs consent. 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.
- 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.
- Respect the opt-out signal. Most consent tools have a setting for Global Privacy Control; switch it on so a browser that sends it is treated as a "no".
- 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.
- 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
- WordPress: a consent plugin, or a consent service's plugin, provides the banner and blocks tags. Check that it also covers tags added outside it, such as code pasted into the theme's header.
- Shopify, Wix and Squarespace each have a built-in cookie banner in their privacy settings. Check what it controls: a built-in banner manages the platform's own tags, but code you pasted in yourself may still load before anyone answers.
- A hand-built site or ASP.NET: load your tags through a consent tool or Google Tag Manager with consent mode rather than pasting them straight into the layout. Cookies the server sets for logins and sessions are strictly necessary, but should carry the Secure, HttpOnly and SameSite flags (OWASP explains why); the security settings guide has the lines.
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
- You have a list of each cookie the site sets, who sets it and why.
- Analytics and advertising tags wait until the visitor agrees.
- The banner makes refusing as easy as accepting, and remembers the answer.
- A "Cookie settings" link in the footer reopens the choice.
- The Global Privacy Control signal is treated as a no.
- The cookie policy lists what the site really sets, with true durations.
- Third-party cookies you rely on are known, and you have checked how they behave when blocked.
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.
- Cookies before consent
- Cookie consent banner
- Cookie policy
- What your site stores on a first visit
- Cookie lifetimes match the policy
- Visitors who opt out of tracking are respected
- A cookie choice is remembered and can be changed
- Third-party cookies
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.
- Google Tag Platform: Set up consent mode
- Privacy Sandbox: Prepare for third-party cookie restrictions
- OWASP Cheat Sheet: Session management
More guides
- How to get your business recommended by ChatGPT and other AI assistants
- Why AI assistants can't see your website, and how to fix it
- robots.txt for small businesses: what to allow, what to block
- IndexNow explained: tell Bing about new pages, and who doesn't use it
- The pages every small-business website needs
- How to turn more website visitors into enquiries
- Why your site is slow, and what to fix first
- How your business shows up in Google: titles, descriptions and headings
- One address for each page: www, https, canonical tags and redirects
- A sitemap for any site, including one built by hand
- Making your site usable by everyone
- Making your site work on a phone
- Security settings for a small-business website, by platform
- Stop people sending email as your business: SPF, DKIM and DMARC
- How your links look when people share them
- Getting your business details right for Google Maps and AI assistants