Sub topic 8
Keeping evidence of consent
This chapter assumes you know how cookie banners work and that consent must meet the GDPR or UK GDPR standard. It covers what to record, how to store it, and how to use it. Under Article 7(1) GDPR (the same wording applies in UK GDPR), the organisation must be able to demonstrate that the visitor consented. A banner that works but leaves no record fails that test.
Why a record is needed
The burden of proof sits with the organisation. If a regulator or a complainant asks "did this visitor agree to marketing cookies?", a screenshot of the banner is not enough. You need to show what this visitor was shown and what they chose.
A useful record answers five questions:
- Who chose? An identifier for the browser or device, not necessarily the person's name.
- When did they choose? A timestamp.
- What were they shown? The banner version and the cookie policy version.
- What did they choose? The state of each purpose.
- How did they choose? The action, such as accepting all, rejecting all or saving selected options.
An example consent record
The record below stores those five answers as JSON.
{
"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"
}consentIdis a random identifier. It links the record to the visitor's browser without holding a name or email address.bannerVersionandpolicyVersionpoint to archived copies of the banner text and the policy. Keep every version you have ever published. Without the archive, the version number proves nothing.choiceslists each purpose separately. A single "consented: true" flag cannot show that marketing was handled apart from analytics.methodrecords the action taken. It shows that the choice was an active step and not a default.
Where to store it
Store the record in two places.
- In the browser. A first-party cookie or local storage entry holds the current choices. The site reads it on each page load to decide which tags may run. It also stops the banner reappearing on every visit.
- On the server. Send the record to your own backend, or to your consent management platform (CMP, a tool that runs the banner and stores choices). This copy is your evidence, because a visitor can clear browser storage at any time.
The diagram below shows how the two copies relate.
Practical rules
- Record refusals too. A "reject all" choice is evidence. It shows you respected the visitor and lets you avoid re-prompting too soon.
- Do not collect more than you need. The consent record is itself personal data if it can be linked to a person. An IP address is often unnecessary. Store only what proves the choice, and set a retention period.
- Keep the record tamper-resistant. Write records once and do not edit them. Record a later change, such as a withdrawal, as a new entry with a new timestamp.
- Test the log. Pick a visitor identifier and check that you can retrieve the choice, the banner text and the policy wording that applied on that date.
Common errors
- Storing only the latest choice, so the history is overwritten.
- Logging "consent given" with no banner version, which leaves the wording unprovable.
- Keeping records on the visitor's device only.
- Treating a single flag as consent to all purposes.
- Deleting banner versions after a redesign.
Exercise
A visitor says they never agreed to marketing cookies. Your database shows only {"userId": "u123", "consent": true}. Name three pieces of information missing from this record that would help you demonstrate valid consent.
Show answer
Any three of: a timestamp (when the choice was made); the banner version and policy version (what the visitor saw); per-purpose choices (so marketing is shown separately from analytics); and the method (the action taken, such as accepting selected options). Without these, you cannot show that consent was specific, informed and actively given.
Exercise
Why should the server keep a copy of the consent record when the browser already stores the visitor's choices?
Show answer
Visitors can delete browser storage at any time, and a browser copy is not under your control. The server copy remains available as evidence if a regulator or complainant asks you to demonstrate consent.