Skip to main content

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.

The article provides a comprehensive table of all cookie consent fields:

Field NameData TypeDefault Values (EU / US)GTM MappingsDescription
clientIdStringUUID / UUIDN/AAnonymously generated UUID for recording consent choice
implicitBooleantrue / trueN/ATracks user interaction with cookie banner
analyticsPermittedBooleanfalse / trueanalytics_storageConsent for Advertising Cookies
personalizationPermittedBooleanfalse / truepersonalization_storageConsent for Personalization Cookies
adsPermittedBooleanfalse / truead_storage, ad_user_data, ad_personalizationConsent for analytics cookies
essentialPermittedBooleantrue / truefunctionality_storage, security_storageConsent for essential cookies
notOptedOutBooleantrue / truetv_not_opted_outTrueVault 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.

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