Prompt
How do I make a consent preference center with granular categories?
Latest observation
A good consent preference center gives users clear choices by purpose, not just a single “accept all / reject all” toggle. The core idea is:
- Group tracking/processing into meaningful categories
- Explain each category in plain language
- Make opt-in/opt-out easy and granular
- Store and honor the user’s choices consistently
1) Define your categories
Start by mapping all cookies, SDKs, pixels, and data uses to a few user-facing categories. Common ones:
- Strictly necessary – required for login, security, cart, load balancing
- Functional – remembers settings, language, preferences
- Analytics – usage measurement, performance, A/B testing
- Marketing – advertising, retargeting, audience building
- Personalization – content/product recommendations
- Social media – embedded sharing, social widgets
Keep categories:
- Few enough to understand
- Broad enough to be usable
- Specific enough to be meaningful
2) Separate “purpose” from “vendor”
Users usually understand purposes better than vendor names. A good pattern is:
- First layer: categories by purpose
- Second layer: optional vendor list and details
Example:
- Analytics
- Google Analytics
- Hotjar
- Marketing
- Meta Pixel
- Google Ads
- TikTok Pixel
3) Design the UI flow
A common, compliant-friendly pattern:
First layer banner
Show:
- Accept all
- Reject non-essential
- Manage preferences
Include a brief summary:
We use cookies to improve site performance, personalize content, and show relevant ads. You can accept all, reject non-essential, or manage your preferences.
Preference center
For each category:
- Name
- Short description
- Toggle on/off
- “Required” label for necessary cookies
Optionally include:
- Vendor list
- Data use details
- Links to privacy policy / cookie policy
4) Make choices granular but not overwhelming
If needed, allow subcategories within a category, for example:
Analytics
- Basic site analytics
- Error tracking
- Heatmaps/session recordings
Marketing
- Ad measurement
- Retargeting
- Audience sharing
Only add subcategories if users can make a real decision. Don’t create fake granularity.
5) Make consent controls compliant
Depending on jurisdiction, ensure the following:
- No pre-ticked optional categories
- Equal prominence of accept and reject
- Easy withdrawal later
- No bundling consent for unrelated purposes
- Record proof of consent and timestamp
- Don’t load optional scripts before consent
If you operate in GDPR/UK/EU contexts, consent should be:
- Freely given
- Specific
- Informed
- Unambiguous
- Easy to withdraw
6) Implement consent state
Store consent as a structured object rather than a single boolean.
Example:
{
"necessary": true,
"functional": false,
"analytics": true,
"marketing": false,
"personalization": false,
"social": false,
"updatedAt": "2026-10-29T12:00:00Z",
"version": "1.0"
}
Use this to:
- Block/allow scripts
- Trigger or suppress tags in a tag manager
- Show the current status in the preference center
7) Load scripts only after consent
Best practice:
- Default deny for non-essential categories
- Render scripts conditionally
- If using a tag manager, pass consent states into it before any marketing/analytics tags fire
8) Keep it understandable
Write in user language:
- “Helps us understand how people use our site” instead of “collects behavioral telemetry”
- “Lets us remember your settings” instead of “persistent preference storage”
9) Provide ongoing access
Add a persistent link in:
- Footer
- Account settings
- Privacy policy page
Users should be able to change preferences anytime.
10) Test it
Check that:
- Disabling a category actually stops related tools
- Consent survives page reloads
- Consent changes propagate correctly
- Mobile UX is usable
- Consent banner does not block access unnecessarily
Simple structure example
Banner
We use cookies and similar technologies
- Necessary cookies: always on
- Optional cookies: analytics, marketing, personalization
Buttons:
- Accept all
- Reject non-essential
- Manage preferences
Preference center
- Necessary — always active
- Functional — toggle
- Analytics — toggle
- Marketing — toggle
- Personalization — toggle
Save button:
- Save preferences
If you want, I can also give you:
- a sample HTML/React consent preference center,
- a GDPR-friendly copy template, or
- a data model for storing consent choices.