Where are the consumer's Cookie Consent settings stored?
Article Overview
The cookie consent settings for consumers are stored in the visitor's browser in a first-party cookie called polaris_consent_settings. Polaris sets the cookie on your site's root domain (so it is shared across subdomains) with path=/ and an expiration of 180 days. The value is a URL-encoded JSON object.
Cookie Fields Reference Table
The article provides a comprehensive table of all cookie consent fields:
| Field Name | Data Type | Default Values (EU / US) | GTM Mappings | Description |
|---|---|---|---|---|
clientId | String | UUID / UUID | N/A | Anonymously generated UUID for recording consent choice |
implicit | Boolean | true / true | N/A | Tracks user interaction with cookie banner |
analyticsPermitted | Boolean | false / true | analytics_storage | Consent for analytics cookies |
personalizationPermitted | Boolean | false / true | personalization_storage | Consent for Personalization Cookies |
adsPermitted | Boolean | false / true | ad_storage, ad_user_data, ad_personalization fallback | Consent for advertising cookies |
essentialPermitted | Boolean | true / true | functionality_storage, security_storage | Consent for essential cookies |
notOptedOut | Boolean | Depends on banner variant and opt-out signals | tv_not_opted_out, ad_personalization when Targeted Advertising applies | TrueVault GTM tag to track opt-out status |
The notOptedOut default is true in implicit-consent flows where the visitor has not opted out, and false in default-no-consent flows or when a browser/privacy signal has already opted the visitor out.
The ad_personalization mapping depends on whether Targeted Advertising applies. When it does, ad_personalization is granted only when Advertising is enabled and the consumer has not opted out of Targeted Advertising. When Targeted Advertising is not applicable, ad_personalization falls back to adsPermitted.
Code Examples
It can sometimes be useful to read this cookie directly if you are developing custom code around a consumer's consent state.
Another reliable way to detect consent activity is to listen for the consentChanged event.
JavaScript: Read and Parse the Cookie
function getCookie(name) {
const cookie = document.cookie
.split("; ")
.find((row) => row.startsWith(`${name}=`));
return cookie ? cookie.substring(name.length + 1) : null;
}
function readConsentSettings() {
const rawValue = getCookie("polaris_consent_settings");
if (!rawValue) return null;
try {
// Cookie values are URL-encoded in most browser implementations.
const decoded = decodeURIComponent(rawValue);
return JSON.parse(decoded);
} catch (error) {
console.warn("Unable to parse polaris_consent_settings cookie", error);
return null;
}
}
const consentSettings = readConsentSettings();
console.log("Consent settings:", consentSettings);
console.log("Analytics permitted:", consentSettings?.analyticsPermitted ?? null);
US Configuration Example
{
"clientId": "77ee15e6-c9ff-47d4-9e63-5ae85f1ffec9",
"implicit": true,
"analyticsPermitted": true,
"personalizationPermitted": true,
"adsPermitted": true,
"essentialPermitted": true,
"notOptedOut": true
}
EU Configuration Example
{
"clientId": "b74292b7-1623-4f00-ea03-3bd036025f99",
"implicit": true,
"analyticsPermitted": false,
"personalizationPermitted": false,
"adsPermitted": false,
"essentialPermitted": true,
"notOptedOut": true
}
Reading the Cookie Server-Side
Because polaris_consent_settings is a first-party cookie set on your root domain with path=/, the browser includes it in requests to your servers. Server-rendered code — including server-side analytics or tag servers that your pages call — can read the visitor's current consent state from the incoming request's Cookie header at first render, before any client-side JavaScript runs.
When reading the cookie server-side:
- URL-decode the cookie value, then parse it as JSON. The fields are the same as in the reference table above.
- If the cookie is absent, the visitor has no stored choice (first visit, cleared cookies, or an expired cookie). Apply the default behavior for the visitor's region — do not assume consent was granted or denied.
- For opt-out enforcement, check
notOptedOut:falsemeans the visitor is opted out of targeted advertising / data sale, and server-side events for selling or sharing vendors should be suppressed. - The client-side CMP remains the source of truth. If the visitor changes their choice after the page is rendered, the
consentChangedevent fires in the browser and the cookie is updated; the new state reaches your server on the next request. ForwardconsentChangedpayloads to your server if you need mid-page updates.
Key Information Summary
- Storage Location: A first-party cookie named
polaris_consent_settings, set on the site's root domain with a 180-day expiration; sent to your servers on page requests - Regional Differences: Default values differ between EU and US regions, with EU having stricter defaults (most permissions set to
false) - GTM Integration: The consent settings map to specific Google Tag Manager variables for tracking purposes
- UUID Generation: Each user gets an anonymous UUID for consent tracking
- Essential Cookies: Always permitted by default in both regions