Sub topic 13
Running a cookie compliance audit
This chapter turns the earlier material into a repeatable audit. You will test what a site does before, during and after a visitor makes a consent choice. You will also record the findings and rank the fixes. It assumes you know how cookies and tag managers work, and that you have read the earlier chapters on the exemptions, the consent standard, banner design, tag blocking, consent records and withdrawal.
What an audit is for
A cookie audit compares three things:
- What the site says it does. This is the cookie policy, the banner text and the preference centre.
- What the site actually does. These are the cookies set, the requests sent and the storage written, observed in a browser.
- What the law requires. This is consent under Article 5(3) of the ePrivacy Directive and its UK counterpart, regulation 6 of PECR, with the consent standard taken from the GDPR and UK GDPR.
The second item is the most important. Many sites have a well-worded banner while a tag manager fires marketing tags on page load. Reading the policy tells you little. You have to observe the site.
The audit workflow
1. Scope and inventory
Decide which sites, subdomains, apps and page templates are in scope. A consent banner on the homepage tells you nothing about a checkout page or a campaign landing page that loads different tags. Sample each template type and each region the site serves.
Build an inventory with one row for each cookie, pixel, SDK or storage key:
- Name, domain and first-party or third-party status
- Storage type: cookie, local storage, session storage, fingerprinting script, tracking pixel or SDK
- Purpose: strictly necessary, preferences, analytics or marketing
- Vendor and the page where it appears
- Lifetime
- The consent category the banner assigns to it
Include similar technologies, not just cookies. Local storage identifiers, tracking pixels and device fingerprinting fall under the same rules where they store or access information on the device. The same applies to mobile SDKs.
2. Test before any choice
This is the most important test. Use a clean browser profile or a private window, with no stored cookies and no earlier consent. Open the developer tools before you load the page. Load the site, do not touch the banner, and record everything.
Look in three places:
- The Application or Storage panel for cookies, local storage and session storage.
- The Network panel for requests to advertising, social and analytics domains.
- The tag manager's preview mode, to see which tags fired and on which trigger.
You can use this script in the browser console to list the third-party hosts the page has contacted so far:
const hosts = performance
.getEntriesByType('resource')
.map((entry) => new URL(entry.name).hostname)
.filter((host) => host !== location.hostname);
console.table([...new Set(hosts)].map((host) => ({ host })));
console.log('Cookies readable by scripts:', document.cookie || '(none)');The script has two limits. document.cookie cannot see cookies marked HttpOnly, so check the Application panel as well. The resource list also includes harmless content such as fonts and images, so you must judge each host.
Any marketing cookie set, or marketing tag loaded, before the visitor consents is a finding. Strictly necessary items, such as a session cookie for a shopping basket or the cookie that stores the consent choice itself, are exempt. Record each exemption claim and the reason for it, so a reviewer can challenge it.
3. Test refusal and acceptance
Run each of these scenarios from a fresh profile:
| Scenario | Expected result |
|---|---|
| Click "Reject all" | No marketing or analytics cookies, no marketing requests |
| Accept only analytics | Analytics runs, marketing still blocked |
| Accept only marketing | Marketing runs, analytics still blocked |
| Click "Accept all" | All categories run, and the consent record is stored |
| Close the banner without choosing | Treated as no consent, so nothing optional runs |
| Continue browsing or scroll | Treated as no consent, so nothing optional runs |
Check the banner design at the same time:
- Is "reject" as easy to reach as "accept", with the same number of clicks and comparable prominence?
- Are optional categories off by default, with no pre-ticked boxes?
- Does the text name the purposes and the vendors, or at least provide a clear route to them?
- Is the site usable after refusal, or does a "cookie wall" block access without a valid justification?
Compare each result with what the banner promised. A common failure is that the banner says marketing is off while the tag manager still fires a tag attached to the "all pages" trigger.
4. Test withdrawal and re-prompting
Consent must be as easy to withdraw as to give. After accepting, find the way to change your mind. It might be a persistent footer link or a settings icon. Then check:
- It takes about as few steps to withdraw as it took to accept.
- After withdrawal, marketing requests stop on the next page load.
- Existing marketing cookies are removed where the site can remove them, or the site explains how they will expire.
- The site does not re-prompt a refusing visitor on every page. It should wait a reasonable period or until something material changes.
- The banner re-prompts when the vendors or purposes change in a way that invalidates earlier consent.
5. Review records and vendors
Ask the organisation to produce its consent records and compare them with what you saw. A good record, like the example in the earlier chapter, shows:
{
"consentId": "c1f4e0a2-3b7d-4c55-9a10-6d2e8b9f7a11",
"timestamp": "2026-11-26T13:31:57Z",
"bannerVersion": "2026-11-01",
"policyVersion": "cookie-policy-v7",
"choices": { "necessary": true, "analytics": false, "marketing": true },
"method": "banner_accept_selected"
}Check that the stored choices match what the browser did, that the banner and policy versions can be traced back to the actual wording shown, and that refusals and withdrawals are logged as well as acceptances. Then sample the vendor list. For each marketing vendor, confirm there is a contract or data-sharing terms, a named owner inside the organisation, and a reason the tag is still needed. Where two parties jointly decide the purposes of data collection, the allocation of responsibility should be written down. Remove tags nobody can justify.
6. Prioritise fixes
Not all findings carry the same risk. Rank them by how many people are affected, whether the problem is a clear breach or a judgement call, and how easily a regulator or complainant could detect it. Cookie behaviour is easy to detect because anyone can open developer tools.
| Priority | Typical finding | Why |
|---|---|---|
| Critical | Marketing tags fire before any choice; "reject" does not stop tracking | Clear breach, visible to anyone, affects every visitor |
| High | No accept-equivalent reject option; pre-ticked boxes; withdrawal is much harder than consent | Consent is not valid, so the processing has no lawful basis |
| Medium | Missing consent records; cookie policy out of date; undocumented vendors | Cannot demonstrate compliance, even if behaviour is correct |
| Low | Inaccurate cookie lifetimes in the policy; unclear category labels | Transparency gaps with limited direct harm |
Tackle critical items first, because they are usually fixed by a tag manager change and remove most of the risk quickly.
Reporting and retesting
Write each finding with the evidence needed to reproduce it: the URL, the steps, the browser and version, the date, a screenshot or HAR export, and the exact cookie or request. Name the legal requirement that is not met and propose a specific fix. A finding that says "marketing cookies are non-compliant" is hard to act on. One that says "the _fbp cookie is set on page load via the 'All Pages' trigger in the tag manager" can be fixed the same day.
After each fix, rerun the failed tests from a clean profile. Then schedule the audit to repeat. Sites change constantly, and a new campaign tag added by a marketing team can undo a clean result within weeks. Link the audit to the change process, so that any new tag is checked before it goes live.
Common mistakes in audits
- Testing only in a browser with prior consent. The site then never shows the banner and the pre-consent test is meaningless.
- Testing one region. Some sites show a banner only to visitors from certain countries, so test from each region you serve.
- Trusting the consent platform's report. Its dashboard shows what it believes it blocked. Verify in the browser.
- Ignoring server-side tagging and apps. Data sent from a server or an SDK may bypass the browser checks. Review those flows separately.
- Treating the audit as a one-off. The result is only valid for the date tested.
Exercise
During an audit you load the homepage in a clean private window and leave the banner untouched. The Network panel shows a request to an advertising pixel domain, and the Application panel shows a cookie from that domain. The site owner says the tag is "just waiting" for consent and the cookie is harmless. How do you classify the finding, and what evidence do you collect?
Show answer
This is a critical finding. A marketing technology is storing or accessing information on the device before consent, and the visitor has made no choice. The tag is not paused if it sends a request and a cookie exists. Collect the URL, date, browser and version, a screenshot or HAR export of the request, the cookie name, domain and lifetime, and the tag manager trigger that fired it. Then recommend moving the tag behind a consent-based trigger and retesting from a clean profile.
Exercise
Why must the audit include a test where the visitor closes the banner or keeps scrolling without choosing?
Show answer
Valid consent needs a clear affirmative action, so silence, closing the banner or continued browsing is not consent. The test confirms that optional cookies and tags stay off in those cases, and that the banner does not treat inaction as agreement.