
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.
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.”
Signed in, Get my prompt fills in your site for you. Otherwise press Copy and fill in the [bracketed] parts. First time? Connect your AI to bernard once: Use your own AI (opens in a new tab).
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 buttons. How many buttons depends on what your site runs, and it sorts that out by itself.
If the only optional thing on your site is visit counting, there are two:
- Reject optional cookies
- Allow analytics
If you’ve also added something for advertising - a Facebook pixel, say - there are three, because there are now two separate questions to answer:
- Reject optional cookies
- Choose cookies
- Accept all
Choose cookies opens a short panel with one tick-box per kind, so a visitor can allow visit counting and refuse advertising, or the other way round. You don’t set any of this up; the middle button appears the day the second kind of tool does, and goes again if you remove it.
Whatever the count, the buttons 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 again. That’s not a bug - answering about one thing isn’t agreement to another.
They’re only asked about the part that changed, though. Add a Facebook pixel to a site that already counts visits and a returning visitor sees “We have added advertising cookies. Your analytics choice has not changed.” - one new question, and their old answer still standing. Saying no to the new thing doesn’t undo the yes they already gave.
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?.
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 - and then only about the part that changed.
- Why does my banner have three buttons when my friend’s has two?
- Because your site runs two different kinds of optional thing and theirs runs one. Visit counting and advertising are separate questions, so a site doing both offers a middle ‘Choose cookies’ button that opens a tick-box per kind. Add a Facebook pixel and the third button appears by itself; take it off again and it goes. There’s nothing to configure either way.
- 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.