GDPR cookie consent for small sites, without the dark patterns
Published 2026-11-06
What the rules ask
In the European Union and the United Kingdom, storing or reading information on a visitor's device needs prior consent unless it is strictly necessary for a service the visitor asked for. Session cookies and security tokens are necessary. Analytics and advertising cookies generally are not, so they must wait for a clear, informed yes.
Categorise honestly
Sort what you use into four groups: strictly necessary, functional preferences such as language and theme, analytics, and marketing. Only the first is always on. Describe each group in plain words, and let the preferences panel list the exact cookies with their duration, so the list is generated and never out of date.
Load scripts only after consent
The banner is only meaningful if the scripts really wait. Gate the analytics tag and the advertising loader on the stored consent state, rendered by the server so they never fire early. Outside regions where consent is required you may load them by default, which means detecting the visitor's region and still honouring an explicit refusal.
No dark patterns
- Refusing should be as easy as accepting, with equal visual weight.
- No pre-ticked boxes for optional categories.
- No cookie wall that blocks the content for those who decline, unless there is a genuine alternative.
- Let people change their mind later from a link in the footer.
Keep the banner out of search snippets
Banner text can end up as the description under your result in search. Mark the banner container so search engines do not use it for snippets, and keep the policy pages free of the banner so they can be read before choosing.
Walking through a typical small site
A small public site usually has three kinds of storage. A session cookie and a security token keep forms and sign-in working and are strictly necessary. Language and theme choices stored in the browser are functional preferences. Analytics and advertising scripts are the only part that tracks people across visits, and they are the part consent is really about.
Start by listing what the site actually sets, using the browser developer tools on a clean profile. The list is almost always shorter than people expect, and it becomes the basis for both the banner and the cookie policy.
Keeping the policy true
A cookie policy that does not match reality is worse than none. Review it whenever you add a script, a font host, an embed or a new provider, because each one can set its own storage. Date the policy, name the categories in plain words, and say how to change the choice later: a link in the footer that reopens the preferences is the usual answer.
Remember that consent is per browser and can expire. Store the choice, honour it on every page, and ask again only when the categories change or after a sensible period.
Outside the European Union
Other regions have their own rules and some are looser. A simple approach is to apply the stricter behaviour to everyone, or to detect the region and only ask where the law requires it. Whichever you choose, document it in the privacy policy so that what the site does and what it says always agree.