Skip to main content

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

IDCategoryWhat it covers
C0001NecessaryAlways granted. Required for the site to function (login, cart, security).
C0002FunctionalRemembers visitor preferences (language, region).
C0003PerformanceAnalytics and site usage measurement.
C0004TargetingAdvertising, 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.

IDDashboard labelCommon alternative names
C0001NecessaryStrictly necessary, Essential
C0002FunctionalPreferences
C0003PerformanceAnalytics, Statistics
C0004TargetingMarketing, 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.

What's next

JavaScript API.

Consent events.

Cookie categories explained (for non-developers).