PrivacyQuick

GDPR & ePrivacy

How to keep proof of cookie consent

GDPR Article 7(1) says you must be able to demonstrate consent. For cookies, that means logging each decision with a timestamp, the choices made and the exact banner version shown, without collecting more personal data than you need.

  • Plain English
  • Written for website owners
  • Free to read

To keep proof of cookie consent, log every banner decision on your server with a random consent ID, a timestamp, the action taken, the categories allowed, and the version of the banner the visitor saw. Archive the text and settings of each banner version so you can show exactly what was presented. You don't need names, IP addresses or browser fingerprints to do this. GDPR Article 7(1) requires you to be able to demonstrate consent; it doesn't require you to identify the person.

What the law asks for

Three provisions shape consent records:

  • GDPR Art. 7(1): where processing is based on consent, the controller must be able to demonstrate that the data subject consented.
  • GDPR Art. 5(2): the accountability principle. You're responsible for compliance and must be able to show it.
  • GDPR Art. 5(1)(c): data minimization. Personal data must be adequate, relevant and limited to what's necessary.

For cookies, the consent required by Article 5(3) of the ePrivacy Directive takes the GDPR's meaning, so the same demonstration duty applies in practice. The CJEU has stressed that the burden of proof sits with the controller: in Orange Romania (C-61/19, 2020), it held that the controller must be able to prove that consent was validly given.

The GDPR doesn't prescribe a format. The EDPB's consent guidelines (05/2020) say controllers are free to develop methods that fit their operations, but that the duty to demonstrate consent shouldn't itself lead to excessive additional data processing. That's the balance to strike: enough to prove what happened, and no more.

A useful test: if a regulator or a visitor asked "what did this person agree to, when, and what were they shown?", could you answer from your records? That breaks down into four things:

  1. That a decision happened, and when.
  2. What the decision was: accept all, reject all, a custom selection, or a later withdrawal.
  3. What the visitor was told at the time: the banner text, the purposes, the categories and the vendors.
  4. How it links to the browser where your scripts acted on it.

When you'll actually need the records

It helps to design the log around the situations where someone will ask for it:

  • A visitor complaint. Someone says they rejected cookies but still saw retargeted ads. With their consent ID, you can show what they chose and when, and then check whether your site honored it. Sometimes the record shows the problem is on your side: a tag that ignored the choice.
  • A regulator inquiry. Authorities typically ask how consent is collected, what visitors are shown, and how you prove it. Here the version archive matters as much as individual entries: you'll be asked for screenshots or text of the banner as it was on a given date.
  • An advertising or analytics partner. Some vendors' terms require you to obtain and keep records of consent for EEA users. Google's EU user consent policy, for example, asks publishers and advertisers to retain records of consent. Check the terms of the vendors you use.
  • Your own audits. Aggregated figures, such as the share of visitors who accept, reject or customize, help you spot problems. A sudden jump in acceptance after a redesign can be a sign the new banner nudges too hard.

Fields to log

FieldExampleWhy it matters
Consent IDc_7f3a9e21… (random)Links the log entry to the visitor's browser without identifying them
Timestamp (UTC)2026-11-07T09:14:03ZShows consent came before the cookies it covers
Actionaccept_all, reject_all, custom, withdrawRecords how the visitor expressed their choice
Categoriesnecessary, analyticsShows the consent was specific
Banner versionv14Points to the exact text and settings the visitor saw
LanguagedeShows which translation of the text was shown
Country or regionFRShows which regional rules and banner mode applied
Page or domain (optional)shop.example.comUseful if one log covers several sites

Alongside the log, keep a version archive: for each banner version, the full banner and preferences text in every language, the list of categories and their descriptions, the vendors or cookies listed in your cookie policy at the time, and the date the version went live. Without this, "v14" in a log entry means nothing.

What not to log

It's tempting to log everything "just in case". Data minimization says otherwise, and extra data adds risk without adding much proof.

  • Full IP addresses. An IP address is personal data. It doesn't prove what someone chose, it can change between visits, and it can be shared by many people. A country derived at request time and then discarded is usually all you need.
  • Full user-agent strings and device fingerprints. They add identification risk without strengthening proof of the decision.
  • Names, emails or account IDs. Only link consent to an account if you genuinely need to, for example to sync choices for logged-in users across devices, and then say so in your privacy policy.
  • Browsing history. Which pages the visitor viewed is unrelated to proving consent.

Good consent records prove a decision about a browser, not the identity of a person. A random ID, a timestamp and a version number do that better than an IP address.

Most banners store the visitor's choice in a first-party cookie or localStorage so they don't ask on every page. That's needed for the banner to work, and it's exempt from consent as strictly necessary. But it isn't strong evidence on its own:

  • It lives on the visitor's device, so you can't see it when someone asks a question later.
  • It can be edited or deleted, by the visitor or by browser privacy features.
  • It shows the current state, not the history of decisions.

The robust pattern is to store the same consent ID in both places. The cookie lets your scripts act on the choice; the server-side log lets you prove it. If a visitor wants you to check their record, it helps if your preferences panel shows the consent ID so they can share it with you.

Versioning: proving what was shown

Consent is only valid for what the visitor was told. So whenever something material changes, you need a new version:

  • You add or remove a category.
  • You change the purpose descriptions or banner text.
  • You add a vendor that processes data for a meaningfully different purpose.

Increment the version, archive the new text, and ask visitors again. Old log entries keep pointing to the version they saw. This is also how you show that consent hasn't been stretched to cover something it didn't include. For how often to ask again even without changes, see how long cookie consent lasts.

How long to keep records

The GDPR doesn't set a fixed retention period for consent records. A reasonable approach:

  • Keep each record for as long as you rely on that consent.
  • Then keep it for a limited further period, so you can answer complaints or regulator questions about past processing.
  • Delete or aggregate it after that, and document your reasoning.

Many organizations re-ask for cookie consent within 6 to 13 months, in line with regulator guidance on consent lifetimes, so record retention in a similar range is common. If you're in a dispute or under investigation, keep the relevant records until it's resolved. Write your retention period into your privacy policy and records of processing.

Protect the log like any other personal data: restrict access, use encryption in transit and at rest, and make sure your processor contract (GDPR Art. 28) covers it if a vendor stores it. See data processing agreements explained.

Building it yourself vs using a tool

A DIY consent log is straightforward in principle: an endpoint that receives the decision, a table that stores it, and a process for archiving banner versions. In practice, the hard parts are reliability (decisions logged even on slow connections), versioning discipline, lookups for support requests, retention jobs and exports. Our guide to building your own banner vs using a CMP covers the trade-offs.

For reference, PrivacyQuick's consent log stores an anonymous consent ID, the action, the categories, the banner version, the language, the country and the time. It doesn't store IP addresses or user agents, keeps records for 13 months, and Pro plans can export the log as CSV. New banner versions are created automatically when categories or banner text change.

Next steps

  1. Make a test decision on your own site, then try to find it in your records. If you can't, you can't prove it.
  2. Check that the record includes the banner version and that you can produce the text for that version.
  3. Remove IP addresses and other unnecessary identifiers from consent logging.
  4. Log refusals and withdrawals, not only acceptances.
  5. Set and document a retention period.
  6. Add consent records to your GDPR cookie consent checklist review, so it's tested regularly.

Frequently asked questions

Do I need to store IP addresses to prove cookie consent?

No. The GDPR requires you to demonstrate consent, not to identify the person. A random consent ID stored in the visitor's browser and in your log links a decision to that browser without collecting IP addresses.

How long should I keep cookie consent records?

Keep each record as long as the consent is relied on, plus a reasonable period to answer complaints or questions afterward. Many sites keep records for around 12 to 13 months, in line with how long they treat consent as valid.

Is the consent cookie enough proof on its own?

Usually not. The consent cookie lives in the visitor's browser, where it can be changed or deleted, and you can't see it. A server-side log under your control is much stronger evidence.

Do I need to log refusals too?

It's good practice. Logging refusals and withdrawals shows that your banner offered a real choice and that you honored it, which supports your accountability under the GDPR.

Check your own website in 30 seconds

Our free scanner lists every cookie and tracker your site sets, sorted into categories, before you add a banner.

Run a free cookie scan Start free

This guide is general information, not legal advice. Laws and regulator guidance change; check the current rules for your situation or ask a lawyer.