TermsFeed Privacy Consent (CMP) stores each cookie banner answer in a single local storage entry named termsfeed_privacy_consent_state, and it does not set a cookie. Local storage is a storage area the browser keeps for each website, readable by the scripts of that website and never sent to a server by itself. Privacy Consent reads the entry on each page load to decide which vendors run.

The local storage entry that holds the record

Privacy Consent keeps exactly one entry, in the local storage of the page the visitor opens. Only the Privacy Consent script writes it, and page code reads it without writing to it.

Item Value
Storage Local storage of the page origin
Key termsfeed_privacy_consent_state
Format JSON text
Written On the first page view, then on every saved answer
Read On every page load
Where to see it Chrome DevTools, Application tab, Local storage, the address of your website
Lifetime The browser never expires the entry, and Privacy Consent ignores an answer older than the consent period
Cookies None

The Preferences Center discloses the entry to visitors under "TermsFeed Privacy Consent", the first row of the Essential vendor category, with cdn.termsfeedtag.com under "Domains it connects to". An answer is saved by I Agree, I Decline, Save Selection, and Save Preferences, and by each button of an embed placeholder. Close saves nothing, on the consent banner and in the Preferences Center alike. Read how page code uses the entry in Read Consent State, since no page-level getter of the full consent state exists.

The record before the visitor answers

On the first page view, the entry holds only the visitor token, which TermsFeed CMP issues with the settings of the consent banner. Privacy Consent keeps that stored token on every later visit.

{"user_token":"3f9c0a7b12d4e865"}

The entry keeps this form until the visitor saves an answer. A visitor on the opt-out model keeps it too: the consent banner does not appear, and every vendor runs until the visitor opts out.

The record after the visitor answers

A saved answer adds consentState, with the choice for each vendor category and vendor. The browser stores the record on one line, and this example spreads it over several lines to make it readable.

{
  "consentState": {
    "dnsmpiEnabled": false,
    "categories": [
      { "id": "essential", "enabled": true, "vendors": [ { "id": "termsfeed-1a2b3c4d-5e6f", "enabled": true } ] },
      { "id": "functionality", "enabled": false, "vendors": [] },
      { "id": "analytics", "enabled": false, "vendors": [ { "id": "termsfeed-7a8b9c0d-1e2f", "enabled": true }, { "id": "termsfeed-9c1d2e3f-4a5b", "enabled": false } ] },
      { "id": "advertising", "enabled": false, "vendors": [ { "id": "termsfeed-3a4b5c6d-7e8f", "enabled": false } ] },
      { "id": "marketing", "enabled": false, "vendors": [] }
    ],
    "consentedDate": 1790000000,
    "globalPrivacyControl": false,
    "answeredBy": "visitor",
    "reconsentBeforeDate": 1789000000,
    "sensitiveDataEnabled": false
  },
  "user_token": "3f9c0a7b12d4e865",
  "fingerprint": "0d1aa60e229cacb4f97a8b142b9dce07"
}

Each field has a fixed type and meaning, which the table gives in the order the record nests them.

Field Type and values Meaning
user_token 16 hexadecimal characters The identifier the Preferences Center shows as "Consent identifier". Privacy Consent saves it on the first page view and keeps it afterward.
fingerprint String A value the script stores with the record. Page code has no use for it.
consentState Object Missing until the first answer.
consentState.dnsmpiEnabled true or false The Do Not Sell or Share control. It is true only when every non-essential vendor category is on.
consentState.sensitiveDataEnabled true or false true when every non-essential vendor that processes sensitive data is on, and false when there is no such vendor. Records saved earlier leave it out.
consentState.categories Array One entry per vendor category: essential, functionality, analytics, advertising, and marketing.
categories[].id One of the 5 IDs The vendor category.
categories[].enabled true or false true only when all the vendors of the vendor category are on. essential is always true.
categories[].vendors Array One entry per vendor of the vendor category.
vendors[].id termsfeed- followed by 13 characters The vendor ID.
vendors[].enabled true or false Whether the vendor is on in this answer.
consentState.consentedDate Unix time in seconds The time of the last answer, from the clock of the browser. Unix time counts the seconds since 1 January 1970 in Coordinated Universal Time (UTC). Read how it starts the consent period in Consent Expiry.
consentState.globalPrivacyControl true or false Whether the browser sent Global Privacy Control (GPC) at the time of saving.
consentState.answeredBy visitor or gpc Who saved the record: the visitor, or Privacy Consent honoring GPC over an earlier answer. Records saved earlier leave it out, and they count as answers from the visitor.
consentState.reconsentBeforeDate Unix time in seconds The re-consent date served at the time of saving, or 0 when none. Records saved earlier leave it out. See what sets the date in Force Re-Consent.

The token in the record is the token in the consent log. Every event the browser sends carries the stored token, so every row from that browser shows the "Consent identifier" value.

Each vendor category is in 1 of 3 consent states: not chosen, granted, or denied. The consent state is the answer Privacy Consent has on record, and it reads as the table shows.

Consent state How the record shows it What runs on the page
Not chosen No consentState On the opt-in model, only Essential vendors. On the opt-out model, every vendor, with no answer saved.
Granted enabled: true, or every vendor of the vendor category reads enabled: true The on-accept vendor tags of every vendor in the vendor category
Denied Any other combination, including a vendor category with some vendors on and some off The on-accept vendor tags of each vendor with enabled: true, and the on-decline vendor tags of each vendor with enabled: false

Treat "not chosen" as unknown, never as a refusal, because a visitor on the opt-out model runs every vendor with this same record. Find out which visitors get each model in Cookie Banner by Visitor Location.

Why a vendor category and a vendor inside it show different answers

A vendor category reads enabled: false while one of its vendors reads enabled: true when the visitor turned on only some vendors of that vendor category. The analytics entry in the example record is in this mixed state: Privacy Consent runs the first vendor and holds back the second.

A mixed vendor category counts as denied outside the record. The consent log lists it under "Mixed", the callbacks leave it out of the categories array, and the consent signals treat it as declined. Read the vendor entries to get the answer for one vendor, as Callbacks and Consent Semantics shows.

A vendor you add after the visitor answered causes a second difference, because the stored record has no entry for it. Privacy Consent treats the new vendor as off and unanswered, so neither its on-accept nor its on-decline vendor tags run until the next answer. Plan such a change with Add a Vendor After Launch.

The record belongs to one origin

The browser keeps the record for one origin, the scheme, hostname, and port of the page. https://example.com and https://www.example.com hold separate records, and so does each subdomain. A visitor who moves between them answers on each one, since Privacy Consent does not share consent between origins. Read what that means for your hostnames in Consent Across Subdomains.

The record holds the fields the table lists and nothing else. Readers most often look for these items, and none of them is there.

  • Cookies. Privacy Consent never reads or writes a cookie.
  • Session storage or IndexedDB. The local storage entry is the only browser storage Privacy Consent uses.
  • Personal details. The record does not hold a name, email address, IP address, or page address.
  • Copies of the settings. The record does not hold consent banner text, vendor names, or a country.
  • Vendor cookies. Vendors set their own cookies once their vendor tags run, and Privacy Consent does not delete them after a decline.

What happens when local storage is unavailable

The console prints [ee][d7b5f985] when reading the entry fails and [ee][ef136bd1] when writing it fails, and the script keeps running. Each page view then behaves like a first visit, so the consent banner returns and no answer survives the page. Each answer still reaches the consent log as a new event. Look up both codes in the Console Error Reference.