Prompt
How do I support consent preferences on mobile and web?
Latest observation
Oct 29, 2026
OpenAI APIWeb search: off
To support consent preferences on mobile and web, the key is to make consent:
- Granular — users can choose categories independently
- Persistent — their choices are saved across sessions/devices as appropriate
- Accessible — easy to review, change, or withdraw later
- Consistent — the same preference model works across app and site
1) Define a single consent model
Use the same categories everywhere, such as:
- Necessary — always on
- Analytics
- Personalization
- Marketing/Ads
- Functional
Store each category as a boolean or enum, plus metadata:
- consent status
- timestamp
- version of notice/policy shown
- source channel (
web,ios,android) - region/law basis if relevant
Example:
{
"necessary": true,
"analytics": false,
"personalization": true,
"marketing": false,
"version": "2026-01",
"updatedAt": "2026-10-29T12:00:00Z",
"source": "web"
}
2) Build a preference center
Provide a place where users can:
- accept all
- reject all non-essential
- manage categories individually
- revise choices later
On web:
- cookie banner on first visit
- “Privacy / Cookie Settings” link in footer or account settings
- modal or settings page for editing preferences
On mobile:
- first-launch consent prompt if required
- settings screen under Privacy or Data Controls
- deep link to native OS privacy settings when relevant
3) Respect platform rules
Web
- Don’t set analytics/marketing cookies until consent is granted where required.
- Load tags conditionally based on consent.
- Re-prompt if the consent notice or categories materially change.
iOS
- If you use tracking/ads, comply with App Tracking Transparency (ATT).
- Separate:
- your app’s own privacy preferences
- Apple ATT permission for cross-app tracking
- Use App Privacy Settings in-app for user choices.
Android
- Similar conceptually: manage in-app preferences separately from OS permissions.
- If ad personalization or tracking is involved, respect Google Play policy and any required consent flows.
4) Store consent centrally
If users can use both mobile and web, sync preferences to a backend account profile when possible.
Recommended approach:
- store consent locally for immediate enforcement
- sync to server when user is logged in
- propagate to other devices on next sign-in
This helps ensure:
- consistent behavior across devices
- auditable consent history
- easier withdrawal and updates
5) Enforce consent before firing tools
Gate all SDKs and scripts behind consent checks:
- analytics SDKs
- ad networks
- session replay
- personalization engines
- non-essential push or email preference integrations, if applicable
Good pattern:
- default to off for non-essential processing
- enable only after explicit opt-in
- disable and stop future collection if consent is withdrawn
6) Keep an audit trail
For compliance and debugging, log:
- user identifier or pseudonymous ID
- consent choices
- timestamp
- consent text version
- channel
- region/language if relevant
Avoid storing unnecessary personal data in the audit record.
7) Design for withdrawal
Users must be able to change their minds easily:
- “Withdraw consent” button
- category toggles in settings
- “Reject all” option equal in prominence to “Accept all”
When withdrawn:
- stop collection
- deactivate relevant SDKs if possible
- delete or anonymize previously collected data if required by policy/law
8) Handle edge cases
- Anonymous users: store locally until login
- Logged-in users: sync to profile
- Multiple devices: sync on sign-in
- Different regions: show region-specific banner behavior if needed
- Policy updates: re-consent when categories or purposes change materially
9) Implementation pattern
A practical architecture:
- UI layer: banner/modal/settings screen
- Consent store: local storage / secure storage on mobile + backend profile
- Consent service: single API to read/update consent
- Tag/SDK controller: initializes or blocks tools based on consent state
Pseudocode:
if (consent.analytics) initAnalytics();
if (consent.marketing) initAds();
if (!consent.personalization) disablePersonalization();
10) Test it thoroughly
Verify:
- no non-essential tracking before consent
- changes take effect immediately
- consent persists after relaunch
- consent syncs across devices when logged in
- withdrawal stops future processing
- banners/settings work with accessibility tools
If you want, I can also provide:
- a sample consent schema
- a web implementation example
- an iOS/Android implementation pattern
- or a CMP architecture diagram
Brands