Cookie category IDs
When you read window.onePrivacyCookieGroups or the onePrivacyConsent cookie, you'll see comma-separated IDs like C0001,C0003. Each ID maps to a category. The IDs are stable across releases.
The IDs
| ID | Category | What it covers |
|---|---|---|
C0001 | Necessary | Always granted. Required for the site to function (login, cart, security). |
C0002 | Functional | Remembers visitor preferences (language, region). |
C0003 | Performance | Analytics and site usage measurement. |
C0004 | Targeting | Advertising, retargeting, cross-site tracking. |
C0001 is always in the list because Necessary cookies cannot be turned off.
Reading them
check-categories.js
const accepted = (window.onePrivacyCookieGroups || '').split(',');
const allows = {
necessary: accepted.includes('C0001'),
functional: accepted.includes('C0002'),
analytics: accepted.includes('C0003'),
marketing: accepted.includes('C0004'),
};
Naming in the dashboard vs IDs in code
The dashboard shows friendly names ("Functional", "Performance", "Targeting"). The IDs above are what you'll see in onePrivacyCookieGroups and the consent cookie. Use the IDs in code, the names in copy.
| ID | Dashboard label | Common alternative names |
|---|---|---|
C0001 | Necessary | Strictly necessary, Essential |
C0002 | Functional | Preferences |
C0003 | Performance | Analytics, Statistics |
C0004 | Targeting | Marketing, Advertising |
Backwards compatibility
These IDs are part of the public API. If we ever introduce new categories, they'll get new IDs. Existing IDs won't be renumbered.