How does the cookie banner on my site work?

The banner is the bit of your site that asks visitors about cookies. You don't build it, style it or switch it on — it looks after itself, and this is what it does.

When it appears, and when it goes away

It appears when your site starts doing something that needs permission, and not before. Switch bernard's measuring on and the banner arrives with it. Switch measuring off and the banner disappears, because there's nothing left to ask about. A site with nothing optional running shows no banner at all — not a hidden one, not a dismissed one: none.

That's also the answer to "how do I get rid of it". There's no hide button, deliberately. Hiding the question while still doing the thing is exactly the practice the rules exist to stop. Removing the tool is the off-switch.

What a visitor actually sees

A small bar at the bottom of the page, in your site's own colours, saying what's happening in one sentence — and two buttons:

  • Reject optional cookies
  • Allow analytics

They are deliberately the same size, same weight, same everything. Refusing is not a faint link tucked under a big coloured "Accept" — it's the same button with a different word on it, because a no that's harder to press than a yes isn't really a choice. There's also a Cookie details link for anyone who wants the full list, which goes to your site's cookies page (Can I change the cookies page on my site?).

The bar doesn't lock the page. Visitors can scroll, read and click around while they decide, and nothing optional starts while they do.

Why nothing runs before they answer

The measuring tag is on the page from the start, but parked — present and switched off. If the visitor says yes it starts; if they say no it never runs at all. Asking first and acting afterwards is the whole difference between a real choice and a notice.

Why the answer sticks for 12 months

Their choice is written into their own browser and honoured for 12 months, so they're asked once rather than on every visit. When they come back, the banner doesn't reappear — their earlier yes is applied straight away, or their earlier no continues to be respected.

The one thing that brings the question back is a change in what your site runs. If you add or remove something that needs permission, the old answer was about a different set of tools, so visitors are asked afresh. That's not a bug — answering about one thing isn't agreement to another.

What it does to your numbers

Your visitor counts are the people who said yes. Your real traffic is a bit higher than the figure you see, and always will be on a site that asks honestly. It's worth knowing when you compare against numbers from a site that never asked — you're not losing visitors, you're counting fewer of them.

For what's on the list in the first place, see What's tracking my visitors on my site?; for what cookies are and why the optional ones need asking about, see What are cookies, and why does my site need a banner?.

The prompt

Tell me whether my site is showing a cookie banner at the moment, what it says, and what it's asking my visitors to agree to.

The [bracketed] parts are yours to fill in. First time? Connect bernard to your AI over MCP — a one-time setup in bernard → your site → Use your own AI — then paste the prompt above.

Questions people ask

Can I turn the banner off?
Not while something optional is running — that's the point of it. The banner appears because your site does something that needs the visitor's permission, so hiding it would mean doing that thing without asking. The real off-switch is removing the tool: switch measuring off and the banner goes with it, by itself, with nothing for you to approve.
Do visitors get asked on every page?
No. Their answer is remembered for 12 months, so they're asked once and then left alone — on that page and every page after it. They're only asked again if the set of tools on your site changes, because that's a genuinely different question from the one they answered.
What happens between the page loading and someone choosing?
Nothing optional runs. The measuring tag is loaded but parked — sitting there switched off — and it only starts if the visitor says yes. That's what makes the choice a real one rather than a notice after the fact.
Do my visitor numbers still work if people say no?
They work, but they count fewer people: your numbers are the visitors who agreed to be counted, so your real traffic is a bit higher than the figure you see. That's the honest trade, and it's the same for every site that asks properly. Nothing about your measuring set-up changes without your approval, so the figure never shifts under you unexpectedly.

You might also want to…