HomeFeaturesPricingDocumentationContactDOWNLOAD

Why most cookie banners fail before you click

A cookie banner cannot create consent after tracking has started. Audit storage and network requests, gate optional tools, and test both choices.

The easiest cookie banner to build is also the most common: render a box, save the answer, and leave every analytics script exactly where it was.

That is not a consent system. It is a preferences dialog attached to tracking that already happened.

The hard part is not the banner. The hard part is making the rest of the page obey it.

This is an engineering audit, not jurisdiction-specific legal advice. The rules depend on where you and your visitors are, what a technology stores or reads, and why you use it. The implementation still has a testable job: optional tracking must not run before the required choice, rejection must stick, and changing the choice must change the site’s behavior.

Start with the network, not the banner

Open a private browsing window with a clean storage state. Load the site without touching the banner.

In DevTools, inspect:

  • Cookies created for the first-party domain
  • Local storage, session storage, and IndexedDB
  • Requests to analytics, advertising, experimentation, chat, video, and social providers
  • Redirects or pixels that send identifiers in URLs
  • Third-party frames that create their own storage

The audit cannot stop at cookies. Rules such as the UK’s PECR cover storing information on, or accessing information from, a user’s device. The ICO’s guidance on cookies and similar technologies explicitly includes more than the file format named “cookie.”

Write down every item, its purpose, its owner, its lifetime, and what causes it to load. If nobody can explain one, remove it before debating banner copy.

Separate necessary behavior from optional behavior

Some storage is needed to provide a service the visitor requested. A session cookie after sign-in is the obvious example. A CSRF token tied to a form may be another.

“We like the dashboard” is not the same as necessary.

Analytics, advertising, heatmaps, A/B testing, and session replay need a deliberate review. A provider calling itself privacy-friendly or cookieless does not automatically settle the question. A request can carry an IP address, user-agent data, a path containing personal information, or another identifier without creating a browser cookie.

Classify by purpose and actual behavior, not the vendor’s homepage.

Gate the code that creates the side effect

The banner should control whether optional code is loaded at all. Hiding a component after its script ran is too late.

A small implementation usually has four states:

  1. Unknown: optional scripts and storage stay off.
  2. Accepted: load only the categories the visitor accepted.
  3. Rejected: keep optional scripts and storage off.
  4. Changed: remove what you can, update the saved choice, and reload or reconfigure active tools.

On the first page load, read the saved choice before initializing analytics. If there is no choice, render the essential site and the consent control. Do not race the banner against a tag manager in the document head.

This is where many polished consent platforms fail. The UI works. The integration underneath it does not.

Make refusal a real path

The fastest test is to click Reject, navigate through the site, close the tab, return, and inspect the network again.

Rejection should not:

  • Turn into consent on the next route
  • Expire much sooner than acceptance
  • Load a “minimal” version of the same unapproved tracker
  • Require more effort than the prominent accept path
  • Disappear behind a settings control that cannot be found later

Give people a persistent way to revisit the decision. A plain “Privacy settings” link in the footer is enough if it opens the same controls and the new choice takes effect.

The wording should describe purposes a person can understand. “Performance partners” is not useful if it means session replay. Name the category and what changes when it is enabled.

Test the implementation as a matrix

One happy-path click does not cover this feature. I test at least these cases:

Starting state Action Expected result
Clean browser Do nothing No optional storage or requests
Clean browser Accept Approved tools load once
Clean browser Reject Approved tools remain absent
Previously accepted Revoke Future optional activity stops
Previously rejected Accept later Approved tools initialize correctly
Saved choice Navigate client-side Choice persists without duplicate initialization

Repeat the first three with tracking protection enabled and with a provider request blocked. The site should still render, and the settings control should not get stuck because a third-party script failed.

If your application has multiple subdomains, embedded checkout, or authentication redirects, include them in the test. Consent state crossing those boundaries is where improvised implementations get interesting.

When you may not need a banner

The cleanest consent implementation is often removing optional tracking.

That does not mean “use a cookieless analytics logo and declare victory.” It means inventorying the actual requests and storage, choosing the lowest-data setup that meets the business need, and checking the rules that apply to your visitors.

A small brochure site with server logs and no optional browser storage may reach a different answer than an ecommerce site with advertising attribution. Document why. Keep a privacy notice that matches reality. Re-run the network audit after marketing, support, or product adds a new tool.

The quarterly test

I would rather have a boring recurring check than a clever banner nobody verifies:

  1. Load every important template with a clean browser.
  2. Export or record all third-party domains and client storage.
  3. Compare the list with the privacy notice and consent categories.
  4. Test unknown, accepted, rejected, and revoked states.
  5. Remove vendors and tags that no longer have an owner.

SiteCMD’s live-site compliance checks can surface cookies, tracker signatures, and consent markers for review. They cannot decide which legal basis applies or prove that every runtime path honors a choice. That last mile belongs in the browser.

For the rest of the release, use the pre-launch website checklist to cover search metadata, accessibility, performance, security headers, monitoring, and rollback alongside privacy behavior.

If Accept and Reject produce the same network trace, rewrite the integration before rewriting the banner.