Home / Docs / Leak Test

Leak Test

A cookie leak test shows whether any tracker loads on your site before a visitor has made a choice. ClearCrumb’s Leak Test runs it from your WordPress admin in a couple of minutes, with blocking switched on, and lists every service that slips through. A banner that shows but does not block is the most common consent mistake, and this is how you catch it.

What is a cookie leak test?

A cookie leak test loads your pages the way a first-time visitor sees them and checks what runs before that visitor clicks anything on the banner. In the EU, the UK and many other places, optional trackers such as analytics, advertising pixels and social embeds must wait until the visitor agrees. If one of them loads early, your banner is only decoration.

Leaks usually come from code that ClearCrumb cannot see: a tag inside Google Tag Manager, a tracking ID pasted into a theme option, or a script that a CDN adds on its way to the visitor. A plugin you installed last week can also add a new service without telling you.

The ClearCrumb scanner and the Leak Test answer different questions. The scanner switches blocking off for you, the admin, so it can find every service your site uses. The Leak Test keeps blocking on, so it shows what a real visitor actually gets.

How do I run the Leak Test?

  1. In WordPress, open ClearCrumb → Scanner.
  2. Find the Leak Test card and click Run Leak Test. After the first run the button says Run again.
  3. Stay on the screen while the progress bar counts the page loads, for example “12 of 30 page loads”.
  4. Read the report that appears in the same card. It is saved, so it is still there next time you open the Scanner.

You do not need a private window. The test ignores your own saved choice and simulates the visitor itself, so it gives the same result whether you have accepted or rejected cookies on your site. It only works for an administrator who is logged in; normal visitors never see the test mode.

Cookie leak test steps in ClearCrumb: open the Scanner, run the Leak Test, read leaks and block them

What does the Leak Test load, and how?

The cookie leak test picks up to 15 of your pages: the home page, the shop, cart, checkout and account pages if WooCommerce is active, and then your most recently updated published pages and posts. Password-protected content and pages on other domains are skipped.

Each page is opened twice in a hidden frame inside your admin, with blocking switched on:

  1. As a brand-new EU visitor who has not answered the banner. Anything optional that loads here is a leak.
  2. After Accept all, to show what your visitors get once they agree.

All the “not answered” passes run first, so cookies set after consent cannot hide what loaded before it. For every pass ClearCrumb records the scripts, iframes, stylesheets and network requests the page made, plus the cookies it set, and matches them against its library of known services. Strictly necessary services never count as leaks.

How do I read the report?

The top of the report has two numbers and a time stamp:

  • Before consent: how many trackers loaded for the visitor who has not answered. Green means zero; red means you have a leak.
  • After “Accept all”: how many trackers load once a visitor agrees. This is your normal tracking, and it should not be zero if you use analytics.
  • Last run: when the cookie leak test ran and how many pages it read.

Below that, each leak gets its own row with a red Leak label and the pages it loaded on, for example “Loads before consent on /, /contact/”.

Two more lists can appear. They are information, not leaks:

  • Loads in denied mode (Consent Mode advanced, no cookies): Google tags in advanced Consent Mode, and Meta Pixel or TikTok Pixel with their consent APIs on, are allowed to load but run without cookies until consent. See Google Consent Mode v2.
  • Other outside addresses the pages contacted: third-party hosts that are not in the ClearCrumb service library. Most are harmless, such as fonts and CDNs, but check any address you do not recognise.

Cookie leak test report: what loads before consent compared with after Accept all

How do I fix a leak?

What you do depends on whether the leaking service is already on your list.

  • Not on your list, or not waiting for consent: click Block … until consent on the leak row, for example “Block Hotjar until consent”. ClearCrumb adds the service and sets it to wait. Then run the cookie leak test again to confirm.
  • On your list and set to wait, yet it still loads: it is added in a way ClearCrumb cannot see, such as a tag inside Google Tag Manager or a theme option. Move it so it loads after consent, for example by firing the GTM tag on the clearcrumb_consent event, or by pasting the code in a normal script tag that ClearCrumb can hold back.
  • Cloudflare Web Analytics: Cloudflare adds this script on the way to the visitor, after WordPress, so no WordPress plugin can hold it back. In Cloudflare, open Web Analytics for the site and turn off the automatic setup. To keep the numbers, add the JS snippet to your site instead and ClearCrumb holds it until consent.

More on how holding back works is in Block scripts until consent.

When should I repeat the cookie leak test?

Run the test again whenever something new could add a tracker:

  • after you install or update a plugin or theme;
  • after you add an embed, a pixel or a tracking code;
  • after you publish a new tag in Google Tag Manager;
  • after you switch caching or CDN settings.

The result also feeds your Compliance Score on the dashboard. The check “Nothing loads before consent” is worth 20 points and only passes once a Leak Test has run and found nothing. If you have never run one, the check fails with a reminder to do so.

ClearCrumb Pro adds scheduled scans and leak alerts: it runs the cookie leak test for you every week and emails you when something leaks. Regulators such as the UK ICO expect non-essential cookies to wait for consent; their guidance on cookies and similar technologies explains the rule. ClearCrumb helps you meet consent rules; it is not legal advice.

Cookie leak test: questions

Does the cookie leak test slow down my site for visitors?

No. It runs in your own browser, inside the admin screen, and loads at most 15 pages twice. Visitors are not affected, and the test mode only works for a logged-in administrator.

Why does a service show up after Accept all but not before?

That is exactly what should happen. The service waits for consent and loads once the visitor agrees. Only services in the “Before consent” count are a problem.

Can the test miss something?

Yes. It reads up to 15 pages, so a tracker that only runs on an older page, or only after a click or a form submit, may not show. Run the full scanner too, and test the pages you care about most.

Is a test with zero leaks proof that my site is compliant?

No. It shows that the pages it read did not load known trackers before consent. Your banner text, your cookie policy and how you use the data still matter.