Blog / Build with AI /
Cookie banners and consent for small tools
You’ve built a small web tool, perhaps with AI help, and now someone asks: “Where’s your cookie banner?”
Maybe you need one. Maybe you don’t. Often the best answer is to design the tool so you need less consent in the first place. This post explains the thinking in plain words, then shows how to build the simplest honest version.
A caution first: I’m not a lawyer and this is not legal advice. Rules vary by country, and they change. Use this to understand the shape of the problem, and ask a qualified person about anything high-stakes.
What a cookie banner is actually for
A cookie banner exists because some laws, most famously in Europe and the UK, require informed consent before storing or reading certain data on someone’s device, with exceptions for things that are strictly necessary. It’s not really about cookies specifically. The same thinking applies to local storage and similar browser techniques.
So the question isn’t “do I use cookies?” It’s:
- What am I storing on the visitor’s device or collecting about them?
- Is each thing strictly necessary for what they asked for?
- Where are my visitors?
Laws often apply based on where your visitors are, not where you live. A tool built in one country, used by people in another, can fall under the second country’s rules.
Usually needs consent
- Advertising and retargeting pixels
- Analytics that track individuals across visits or sites (the rules differ between tools, and some privacy-focused analytics avoid personal identifiers)
- Embedded third-party widgets that set their own cookies, such as some video players, chat widgets and social buttons
- A/B testing and heatmap tools that record behaviour
Often doesn’t need consent
- Remembering a login session the user asked for
- Keeping items in a shopping basket
- Security features, such as protection against forged requests
- Storing a setting the user chose, like dark mode or language, where it’s clearly necessary for the feature to work
The word “often” is doing real work there. Details matter, and regulators interpret them differently. When in doubt, ask for consent or collect less.
The cheapest compliance: collect less
For a small tool, the strongest move is design, not paperwork.
- Do you need analytics at all? Many small tools only need to know roughly how many people visit. A simple, privacy-friendly counter may do.
- Can the tool work entirely in the browser, storing nothing on a server? Then there’s little to consent to. See privacy-first tools: keeping user data local.
- Can you drop the third-party embeds? A link to a video is lighter than an embedded player that loads trackers.
- Do you really need that chat widget? Adding a chatbot to a website: do you really need one? asks the same question from a different angle.
Every tracker you remove is one less thing to ask permission for, and one less thing to slow the page down.
What a decent banner does
If you do need consent, the rules of thumb across most regulators are similar:
- Nothing non-essential loads before consent. The banner has to actually block the scripts, not just display a message while they run anyway.
- Accept and reject are equally easy. A big green “Accept” next to a tiny grey link is the kind of design regulators object to.
- No pre-ticked boxes.
- Plain language. “We use analytics to see which pages are useful” is better than a paragraph of legal text.
- A way to change your mind, such as a small link in the footer that reopens the settings.
- A record of the choice, stored so you don’t ask on every page.
- Link to a short privacy policy that names what you collect and why.
Build it, or use something ready-made?
You have three options.
1. Use a consent platform or plugin
Many exist, free and paid. Good if you have a standard site and want regular updates as rules change. Check what it really blocks, not just what the settings page promises.
2. Use what your builder offers
Site builders such as Framer, Webflow, Shopify and WordPress have consent tools or plugins. Whichever you pick, the interface is the easy bit. The tricky part is making sure the right scripts wait for the visitor’s choice.
3. Build your own with AI
Fine for a small tool with one or two scripts. Ask for something specific:
Build a small cookie consent banner in plain JavaScript. It should show “Accept all” and “Reject all” buttons with equal visual weight, store the choice in localStorage, load an analytics script only after acceptance, and include a footer link to reopen the choice. No external libraries.
Then test it properly. The most common AI-written mistake is a banner that looks right but still loads the analytics script immediately. Open your browser’s developer tools, go to the Network tab, reload with a clean profile, and watch what loads before you click anything. If the analytics request appears before consent, the banner isn’t working.
Check the same in the Application tab for cookies and local storage. Do it again after clicking Reject.
A small build checklist
That last line matters. Banners rot. Someone adds a new widget six months later and the old consent setup doesn’t know about it.
Common myths
“A banner makes me compliant.” It doesn’t. It is one part. What you load and what you say in your policy matter as much.
“I’m too small to matter.” Regulators do pursue small sites, and users are increasingly aware. More importantly, respecting visitors is good practice at any size.
“Everything needs a banner.” Not if you only use strictly necessary storage. Some sites legitimately have none.
“Copy a template policy and I’m done.” A policy that doesn’t match your actual tool is worse than none, since it makes a promise you’re not keeping.
Key takeaways
- Consent is about storing or reading data on a device, not just cookies.
- Strictly necessary functions are usually exempt; analytics and ads usually aren’t.
- Collecting less is the cheapest form of compliance.
- A working banner blocks scripts until the visitor chooses.
- Test with developer tools, not by eye, and re-test after every change.
Related reading
Open your own tool in a clean browser profile, watch the Network tab and count what loads before any consent. Is the number higher than you expected?