Try it on your own data
Every report in this article is in the free plan. One snippet for web and apps, up to 10 sites.
Start freeA cookie audit lists everything your site stores on or reads from a visitor's device, then decides for each item whether it needs consent. Do it by walking one fixed path three times, before any choice, after Reject and after Accept, recording cookies, local storage and third-party requests, and classifying each by purpose under ePrivacy Article 5(3).
What you will learn
- Test three states with a clean profile: before any choice, after Reject all and after Accept all
- Classify by purpose: only transmission and strictly necessary, user-requested functions are exempt under Article 5(3)
- In the sample, five non-exempt items appear before any choice and four survive Reject all
What is a cookie audit?
A cookie audit is a documented check of everything a website stores on or reads from a visitor's device: what gets set, by whom, for what purpose, how long it lasts and whether it appears before the visitor has chosen. The output is an inventory, a classification for each item and a list of fixes. A scanner can produce the raw list; the audit is the judgment on top of it.
Despite the name, cookies are only part of it. The same checks apply to local storage, session storage, tracking pixels and scripts that read information from the device. A complete audit therefore answers six questions for every item:
| Question | What you record |
|---|---|
| What is it? | Name, storage type, domain |
| Who sets it? | Your site, or a third party's script or request |
| Why? | One sentence per purpose |
| How long? | Expiry, or "until deleted" for local storage |
| When? | Before any choice, after rejection, after acceptance |
| Does it need consent? | Exemption or consent, with the reason |
If you are unsure what a cookie is made of, start with how HTTP cookies work. The rest of this guide uses Chrome DevTools and a sample online course shop. It is not legal advice.
Which rule decides whether a cookie needs consent
In the European Economic Area the starting point is Article 5(3) of the ePrivacy Directive. Storing information, or accessing information already stored, on a user's device is allowed only with consent after clear information, except in two cases: access for the sole purpose of transmitting a communication, or access strictly necessary to provide a service the user explicitly requested. National laws implement the Directive, so check the country rules that apply to you. The cookie law entry walks through the article itself.
Three points shape the audit:
- It is not only about cookies. The European Data Protection Board's Guidelines 2/2023, adopted in version 2.0 on 7 October 2024, analyse tracking links and pixels, local processing, tracking based on IP addresses, device reporting and unique identifiers under the same article.
- Personal data is not the trigger. In the Planet49 judgment (C-673/17), the Court of Justice held that Article 5(3) applies whether or not the stored information is personal data, and that a pre-ticked box is not valid consent.
- The United Kingdom now differs. After the Data (Use and Access) Act, the Information Commissioner's Office describes a statistical purposes exception for analytics used solely to improve your own service, with clear information and a free, simple way to object. It does not cover advertising or tracking individuals.
Set up a clean test before you look
An audit run in your everyday browser mixes your own logins, extensions and old cookies into the result. Set up like this:
- Create a new browser profile with no extensions. A private window also works for a quick pass.
- Pick the test location. If European visitors see a different banner, test from a European network or your consent tool's preview.
- Open DevTools before loading the site, open the Network panel and turn on Preserve log so redirects do not wipe requests.
- Write a fixed path that touches every feature. For the sample shop: home page, a course page with an embedded video, switch language, add to cart, log in, open the chat window.
- Note the date, browser version and the path. The next audit must repeat it exactly.
| What to check | Where in DevTools | What to record |
|---|---|---|
| Cookies | Application > Storage > Cookies | Name, domain, expiry or Session, HttpOnly, Secure, SameSite |
| Local storage | Application > Storage > Local storage | Keys per origin, purpose, how they are cleared |
| Session storage | Application > Storage > Session storage | Keys per origin; gone when the tab closes |
| Third-party requests | Network panel, Preserve log on | Domain, Set-Cookie header, which script made the request |
| Embedded frames | Each frame origin under storage | Video, map and widget storage on their own domains |
| Reset between runs | Application > Storage, Clear site data | Date, browser version and path used |
Run the same path in every state. HttpOnly cookies appear in the Cookies pane but not in document.cookie.
Step 1: record storage before any choice
Load the home page and walk the path without touching the consent banner. Then collect the evidence from these places:
- Cookies. Open Application > Storage > Cookies and select each origin. Record name, domain, path, expiry or "Session", and the HttpOnly, Secure and SameSite columns.
- Local and session storage. In the same Application panel, expand Local storage and Session storage for each origin and record the keys.
- Requests to other domains. In the Network panel, look for requests to domains you do not own. Click one and check its Cookies tab and
Set-Cookieresponse header. - Embedded frames. Videos, maps and widgets run on their own origins. Check each origin listed under storage, not only yours.
A console one-liner lists local storage keys quickly:
console.table(Object.keys(localStorage).map(k => ({ key: k, length: localStorage.getItem(k).length })));
Do not rely on document.cookie for the inventory: it cannot show HttpOnly cookies, which are often the session cookies you most need to document.
Step 2: repeat after reject and after accept
Clear everything with Clear site data in the Application panel, reload, click Reject all and walk the same path. Clear again, reload, click Accept all and walk it a third time. Three runs turn a list into evidence: an item that appears after rejection shows that the banner does not control it.
Sample data from the course shop (✓ present, – absent):
| Item | Storage | Before choice | After Reject all | After Accept all |
|---|---|---|---|---|
| cart_id | First-party cookie | ✓ | ✓ | ✓ |
| csrf_token | First-party cookie | ✓ | ✓ | ✓ |
| lb_route | First-party cookie | ✓ | ✓ | ✓ |
| auth_session | First-party cookie | ✓ | ✓ | ✓ |
| lang | First-party cookie | ✓ | ✓ | ✓ |
| stats_id | First-party cookie | ✓ | ✓ | ✓ |
| ad_click | Third-party cookie | ✓ | – | ✓ |
| video_visitor | Third-party cookie | ✓ | ✓ | ✓ |
| ab_variant | Local storage | ✓ | ✓ | ✓ |
| chat_token | Local storage | ✓ | ✓ | ✓ |
| consent_choice | First-party cookie | – | ✓ | ✓ |
The "before choice" run is the one that catches most problems. Here the advertising cookie respects rejection but still fires before anyone has chosen.
Step 3: build the cookie inventory
Merge the three runs into one row per item and add purpose, owner and lifetime. Ask whoever added each tag; do not guess a purpose from a name. If nobody can explain an item, that is a finding in itself.
| Item | Purpose | Set by | Lifetime | Owner |
|---|---|---|---|---|
| cart_id | Keep the cart across pages | Shop | Session | Engineering |
| csrf_token | Stop forged form posts | Shop | Session | Engineering |
| lb_route | Send requests to the same server | Load balancer | Session | Operations |
| auth_session | Keep the user logged in | Shop | Session | Engineering |
| lang | Remember language, set on first load | Shop | 180 days | Content |
| stats_id | Count returning visitors | Analytics script | 730 days requested | Marketing |
| ad_click | Attribute ad clicks | Ad pixel | 90 days | Marketing |
| video_visitor | Not documented by the team | Video embed | 180 days | Content |
| ab_variant | Keep a visitor in one test variant | Test script | No expiry | Product |
| chat_token | Resume a chat the visitor opened | Chat widget | 24 hours, extended on reconnect | Support |
| consent_choice | Remember the banner answer | Consent tool | 180 days | Legal |
Step 4: classify each item under Article 5(3)
Classify by purpose, not by technology or by what a scanner labels it. The Article 29 Working Party's Opinion 04/2012 on the consent exemption gives the working tests: for the strictly necessary exemption, the feature would stop working without the item, and the user explicitly asked for that feature. Necessity is judged from the user's side, not the business's. An item used for several purposes is exempt only if every purpose is exempt.
| Item | Classification for EEA visitors | Reason | Fix |
|---|---|---|---|
| cart_id | Exempt | User input cookie for a requested cart | None |
| csrf_token | Exempt | Protects a service the user is using | None |
| lb_route | Exempt | Transmission: picks the server | Keep it session-only |
| auth_session | Exempt | Authentication the user asked for | Add consent wording to any "remember me" option |
| lang | Not exempt as set | Written before any choice, kept 180 days | Set only when the visitor picks a language, and say so beside the control |
| stats_id | Needs consent | The Opinion says first-party analytics cookies are not covered by the two exemptions; some national regulators, such as France’s CNIL, exempt audience measurement under conditions | Load only after consent, or move to a method you have assessed |
| ad_click | Needs consent | Advertising is not exempt | Block until Accept |
| video_visitor | Needs consent | Third-party tracking by an embed | Show a placeholder until consent |
| ab_variant | Needs consent | Experimentation is not requested by the user | Start after consent |
| chat_token | Exempt if set only after the visitor opens chat | Resumes a requested conversation | Confirm nothing is written before opening |
| consent_choice | Can be exempt | Remembers the choice; the ICO gives consent-preference cookies kept over a period such as 90 days as an example | Keep no identifier in it and justify 180 days |
For UK visitors, stats_id and ab_variant could meet the statistical purposes exception if their sole purpose is aggregate statistics to improve the site and an objection route exists. The ICO's examples list A/B testing as likely to qualify and connecting a visitor ID to activity shared with advertisers as not.
Counting the sample for EEA visitors: before any choice, five items that are not exempt were present (lang, stats_id, ad_click, video_visitor, ab_variant). After Reject all, four were still there.
Non-exempt items found in each run
sample course shopStep 5: check lifetimes and third parties
Lifetime should match purpose. The Working Party's view is that an exempt cookie should expire once it is no longer needed, taking into account what an average user would expect. The ICO says the law sets no fixed durations but expects them to be proportionate, and notes that local storage may have no expiry at all.
Browsers add their own ceiling. Since version 104, Chrome caps cookie expiry at 400 days. In the sample, stats_id asks for 730 days. If set on 3 December 2026, Chrome would expire it on 7 January 2028, not in December 2028. Your inventory and privacy notice should state what actually happens, and the requested value should be shortened to what the purpose needs.
For third parties, record for each one:
- the domain and the company behind it;
- whether it uses the data for its own purposes or only on your instructions;
- the contract or terms that cover it;
- what happens to its cookies when a visitor withdraws consent.
Step 6: fix, document and schedule the next audit
Fix in this order:
- Anything that fires before a choice and is not exempt. In the sample: five items.
- Anything that survives rejection. Four items.
- Purposes nobody can explain. Remove video_visitor or get the supplier's documentation.
- Lifetimes. Shorten stats_id and give ab_variant an expiry in code.
- The banner. Rejecting should be as easy as accepting, and withdrawal as easy as giving consent. See consent banner design.
- The notice. List each technology, purpose, third party and duration.
Then rerun the three states and keep both reports with dates. The ICO guidance advises regular reviews, more often when you change technologies frequently. A practical rule is a quarterly run plus a check whenever a new tag, embed or SDK ships. Record who ran it and what changed. The privacy compliance checklist covers the duties beyond device storage, such as retention and access requests.
How the audit looks with TapCub installed
Suppose the course shop replaces stats_id with TapCub's website script. Run the same three states and this is what to expect and verify:
- Anonymous mode (the default for new projects). The website script writes neither a cookie nor local storage. If you call
tapcub.consent()or an opt-out method, the choice itself is kept locally, so list it like consent_choice. - Identified mode. A device ID is kept in local storage plus a cookie, at collection tier 3 and only after analytics consent where the site requires it. Treat it as needing consent in your inventory.
- Privacy signals. With Global Privacy Control or Do Not Track on, the script does not load unless the tag sets
data-respect-dnt="false". Test with the signal on and off. - Region rules. A new project has no region rules and does not require consent before collection. Where you need it, as in the EEA and the UK, add a region rule that requires consent in Configuration › Privacy center. Before consent the script holds events in memory or drops them, depending on the setting.
- Chat. After a visitor opens the chat window, the widget stores a conversation token in browser storage for 24 hours, extended on reconnect. Add it to the inventory.
- Extensions. If you switch on session replay or other add-ons, run the audit again; they load their own scripts.
No cookie is not the same as outside Article 5(3): the EDPB guidelines also consider access to IP addresses that originate from the user's device. Decide with counsel whether cookie-free measurement needs consent for your countries; do I need a consent banner lists the settings involved. TapCub does not scan your site for other vendors' cookies.
FAQ
How often should you do a cookie audit?
Whenever the site changes what it loads, and on a regular schedule in between. A new marketing tag, video embed, chat tool or app release can add storage nobody listed. A workable rhythm is a quarterly pass plus a short check at each release that touches third-party code.
Can I do a cookie audit without a paid tool?
Yes. Browser developer tools show cookies, local storage, session storage and requests to other domains, which is enough for a small site if you follow a fixed path three times. Scanners help on large sites with many templates, but their purpose labels still need a person to check them.
What is the difference between a cookie scan and a cookie audit?
A scan is the automated step that visits pages and lists what it finds. An audit adds the purpose of each item, who owns it, whether it appeared before consent, how long it lasts, the legal classification and the fixes. A scan cannot see features behind logins unless it is configured to.
Do first-party analytics cookies need consent?
Under the Article 29 Working Party's 2012 opinion they are not covered by the two ePrivacy exemptions, although it considered strictly aggregated first-party analytics low risk. Some national regulators have their own rules, and the UK now has a statistical purposes exception with conditions. Check the countries you serve.
Should local storage appear in a cookie audit?
Yes. Article 5(3) covers storing and accessing information on the device, whatever the mechanism. Local storage can keep identifiers with no expiry date, so record each key, its purpose and how it is cleared.
Sources
- Directive 2002/58/EC (ePrivacy Directive), consolidated text, Article 5(3). EUR-Lex.
- European Data Protection Board, Guidelines 2/2023 on the Technical Scope of Art. 5(3) of ePrivacy Directive, version 2.0, 7 October 2024.
- Article 29 Data Protection Working Party, Opinion 04/2012 on Cookie Consent Exemption (WP194).
- Information Commissioner's Office, Guidance on the use of storage and access technologies: what are the exceptions, finalised 29 April 2026.
- Information Commissioner's Office, How do we comply with the PECR rules, including audits and durations. Checked 3 December 2026.
Was this article helpful?
We use your answers to fix and expand this page.
Couldn’t send. Please try again in a minute.
Thanks for the feedback. We’ll use it to improve this page.You’ve already sent feedback on this page. Thanks.

Product Analyst
Focuses on event analysis, conversion funnels, and retention, using clear metric definitions and structured analysis to explain product performance.



