Sub topic 13
Running a Cookie Compliance Audit
This chapter assumes you know how web cookies work, you recognise common marketing tools (analytics, advertising pixels, tag managers), and you have a general grasp of GDPR and personal data. It pulls together the earlier chapters into a repeatable audit of a live website.
What an audit checks
A cookie audit compares what a site does with what the law and the site's own policy say it does. Under the ePrivacy Directive (EU) and PECR (UK), storing or reading information on a visitor's device needs consent unless an exemption applies. The GDPR or UK GDPR then sets the standard for that consent. The audit tests each of these points in a real browser, because a banner that looks correct can still sit on top of scripts that fire early.
Step 1: Build an inventory
Open the site in a fresh private browser window with no extensions. Use the browser's developer tools (Application and Network tabs) to list every cookie, local storage entry, and third-party request. Repeat for several page types, such as the home page, a product page, and a checkout page. Tag managers often load different tools on different pages.
Record, for each item: name, domain, first or third party, lifetime, and which vendor or script set it.
Step 2: Classify each item
Assign every item a purpose and decide whether it needs consent.
| Item | Typical purpose | Consent needed? |
|---|---|---|
| Session ID for a shopping basket | Strictly necessary | No |
| Cookie that remembers the visitor's refusal | Strictly necessary for the consent function | No |
| Analytics cookie | Measurement | Yes in the EU. In the UK, check the current ICO guidance and any recent legislative changes for a possible exemption. |
| Advertising pixel | Marketing | Yes |
| Social share widget that sets cookies | Marketing or functional | Usually yes |
Apply the exemption narrowly. A cookie is exempt only if it is needed to deliver a service the visitor asked for, or solely to carry out a transmission. A purpose of "improving our marketing" is not exempt.
Step 3: Test behaviour before consent
This is the most important test. With a fresh browser profile, load the page and do not touch the banner. Then check the following:
- No marketing or analytics cookies are present.
- No requests go to advertising or tracking domains in the Network tab.
- The same holds after you click "Reject" or its equivalent.
- Marketing tags fire only after you accept that category, as in the earlier example where the pixel script is added only inside the consent handler.
Then accept only one category and confirm that the other categories stay blocked.
Step 4: Test the interface, records, and withdrawal
Check these against the consent standard:
- Accepting and rejecting are equally easy, with similar prominence and the same number of clicks.
- No category is pre-ticked, and silence or scrolling is not treated as consent.
- The wording names the purposes and the vendors or categories involved.
- A stored consent record exists, like the JSON example earlier, with a timestamp, banner version, policy version, and the choices made.
- The visitor can withdraw consent as easily as they gave it, from a link available on every page.
- Withdrawal actually stops the tags and removes the cookies that can be removed.
- The site re-prompts at a sensible interval or after material changes.
Step 5: Prioritise and fix
Rank findings by harm and by how easy they are to spot for a regulator or complainant.
| Priority | Example finding | Action |
|---|---|---|
| High | Marketing pixel fires before any choice | Block the tag until consent |
| High | No reject option on the first layer | Add an equal-weight reject button |
| Medium | No consent record kept | Store records with versions |
| Medium | Vendor cookies missing from the policy | Update the policy and banner text |
| Low | Banner wording unclear | Redraft in plain language |
Fix the high-priority items first, then re-run the pre-consent test to confirm the fix worked. Keep the audit notes, dates, and screenshots. They show that you assessed and acted, which matters if a regulator asks.
Exercise
During an audit you load a page in a clean browser, ignore the banner, and see a request to an advertising domain in the Network tab. What does this show, what priority should it have, and what should you do next?
Show answer
It shows a marketing tag firing before consent, so the site sets or reads information on the device without valid consent. It is a high-priority finding. Block the tag until the visitor opts in, for example by loading it only from the consent handler or through the tag manager's consent controls. Then repeat the pre-consent test, and also test after rejecting, to confirm no request is sent.