Where are the consumer's Cookie Consent settings stored?
Article Overview
The cookie consent settings for consumers are stored locally in the browser's local storage, specifically in a cookie called polaris_consent_settings.
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 Advertising Cookies |
personalizationPermitted | Boolean | false / true | personalization_storage | Consent for Personalization Cookies |
adsPermitted | Boolean | false / true | ad_storage, ad_user_data, ad_personalization | Consent for analytics cookies |
essentialPermitted | Boolean | true / true | functionality_storage, security_storage | Consent for essential cookies |
notOptedOut | Boolean | true / true | tv_not_opted_out | TrueVault GTM tag to track opt-out status |
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
}
Key Information Summary
- Storage Location: Browser's local storage in a cookie named
polaris_consent_settings - 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