Prompt
I'm building a mobile app and web CMP with shared privacy preferences
Latest observation
Oct 29, 2026
OpenAI APIWeb search: off
Great use case. A shared privacy-preferences system across mobile and web usually works best if you treat it as a single consent domain with multiple client adapters.
Suggested architecture
1) Core preference model
Define one canonical preference object stored server-side, for example:
userId/anonIdjurisdictionconsentVersionupdatedAt- categories:
necessary(always true, not toggleable)analyticsmarketingpersonalizationads
- channel/source metadata:
web,ios,android,backend
- policy metadata:
privacyPolicyVersiontermsVersion
This keeps the consent logic consistent across platforms.
2) Shared consent API
Expose a backend API that all clients use:
GET /privacy/preferencesPUT /privacy/preferencesPOST /privacy/consent-eventsGET /privacy/policyGET /privacy/status
Include:
- authentication when available
- anonymous identity support before login
- merge logic when anonymous user later logs in
3) Platform adapters
Create thin adapters for each client:
- Web CMP
- reads/writes consent cookie or localStorage for instant behavior
- syncs with backend when online
- Mobile app
- stores locally in secure storage / preferences
- syncs with backend
- Backend
- uses the canonical preference state to gate trackers, emails, feature flags, etc.
4) Identity linking strategy
You’ll want a plan for:
- anonymous session ID
- logged-in user ID
- merging preferences on login/signup
- conflict resolution
A common rule:
- if user logs in, apply the most recent explicit consent or the strictest setting depending on legal requirements
- keep an audit trail of changes
5) CMP UX consistency
Make sure the same concepts appear on both web and mobile:
- accept all
- reject non-essential
- customize choices
- withdraw consent
- view policy / vendor list
- change preferences later in settings
6) Compliance considerations
Depending on where you operate:
- GDPR / UK GDPR
- CCPA/CPRA
- ePrivacy / cookie consent rules
- app store privacy disclosures
- age-gating / children’s data handling
Important:
- consent must be freely given, informed, specific, unambiguous
- withdrawal should be as easy as giving consent
- log consent evidence: timestamp, version, locale, channel, IP/region if appropriate
Practical implementation pattern
A clean implementation is:
- shared consent schema in a common library
- shared policy UI copy in a design system/content repo
- platform-specific storage layer
- central consent service for sync and audit
- event bus/webhooks to notify analytics/ads systems when consent changes
Data flow example
- User opens web or app
- Client fetches cached local preferences
- Client calls backend for latest consent state
- UI shows banner/modal if needed
- User updates preferences
- Client persists locally and syncs to backend
- Backend emits consent-changed event
- Downstream systems update behavior immediately
Key design decision
The biggest early decision is whether you want:
- client-first with server sync
Best for fast UX and offline support - server-first with client cache
Best for canonical control and reporting
In most CMPs, a hybrid approach is best.
If you want, I can help you design:
- a database schema for shared privacy preferences,
- an API spec, or
- a mobile/web consent synchronization flow.