Prompt
How do I build a consent flow for a mobile app and website?
Latest observation
A good consent flow should be clear, granular, reversible, and easy to understand on both mobile and web. The exact design depends on what kind of consent you need—privacy/tracking, marketing emails/SMS, cookies, location, or account permissions—but the core pattern is similar.
1) Start with the legal/UX basics
For consent to be valid in many jurisdictions, it should generally be:
- Freely given: no forced “accept everything” just to use the service unless truly necessary.
- Specific: separate purposes, not one blanket checkbox.
- Informed: explain what data is collected, why, and who it’s shared with.
- Unambiguous: clear opt-in action, not pre-checked boxes.
- Easy to withdraw: users can change their mind later.
If you operate in multiple regions, check requirements for things like GDPR/UK GDPR, ePrivacy/cookie consent, CCPA/CPRA, and platform rules for iOS/Android permissions.
2) Separate consent types
Don’t combine everything into one prompt. Usually you want distinct categories like:
- Essential / strictly necessary: account login, security, fraud prevention
- Analytics: app/site usage measurement
- Marketing: email, SMS, push notifications
- Personalization: recommendations, tailored content
- Sensitive permissions: location, contacts, microphone, camera
This makes the choice meaningful and easier to audit.
3) Use a layered consent flow
A good pattern is:
First layer: short summary
Show a concise notice with:
- what you collect
- why you collect it
- a link to details
- primary action(s): Accept / Reject / Manage preferences
Example:
We use cookies and similar technologies to improve the site, measure performance, and personalize content.
You can accept all, reject non-essential, or manage preferences.
Second layer: detailed preferences
Let users toggle categories individually:
- Necessary (always on, not toggleable)
- Analytics
- Marketing
- Personalization
For each toggle, add a short explanation and maybe examples.
Third layer: full policy
Link to a full privacy policy/cookie policy with:
- data categories
- legal basis
- retention
- third parties
- international transfers
- contact info
- how to withdraw consent
4) Mobile app: prompt at the right time
On mobile, don’t dump every request on first launch. Ask only when needed:
- Before OS permission prompts, show an in-app explanation screen
- Then trigger the native OS dialog
- If the user denies, provide a way to enable it later in settings
Example sequence for location:
- In-app screen: “We use your location to show nearby stores.”
- CTA: “Continue”
- OS permission prompt
- If denied, show a helpful “Not now” state and settings link
For marketing consent, ask after value is clear, not immediately at signup unless required.
5) Website: cookie banner best practice
For websites, a cookie banner or consent management interface should:
- appear before non-essential cookies load
- allow Reject all as easily as Accept all
- provide Manage preferences
- not use dark patterns like confusing wording or hidden rejection
Important: non-essential tags/scripts should not fire until consent is granted.
6) Make withdrawal as easy as consent
Add persistent access points:
- “Privacy settings” in account menu
- “Cookie preferences” link in footer
- “Notification settings” in app settings
- unsubscribe link in emails
- SMS STOP compliance where required
Withdrawal should be as simple as giving consent.
7) Record consent properly
You’ll want an audit trail:
- user ID or anonymous identifier
- consent categories accepted/rejected
- timestamp
- region/jurisdiction if relevant
- version of the notice/policy shown
- source channel (web/app)
- whether consent was later withdrawn
This is important for compliance and debugging.
8) Respect consent in your tech stack
Build your system so consent actually controls behavior:
- analytics SDKs disabled until consent
- marketing audiences/pixels blocked until opt-in
- push notification registration only after permission
- email/SMS marketing lists updated based on consent status
- server-side enforcement where possible, not just frontend
9) Example flow
Website
- User lands on site
- Banner appears with:
- Accept all
- Reject all
- Manage preferences
- User manages categories
- Save choice
- Only allowed tags load
Mobile
- User signs up / reaches feature needing a permission
- In-app explanation appears
- User taps Continue
- OS prompt appears
- If accepted, enable feature
- If denied, show fallback and settings link
10) Common mistakes to avoid
- Pre-ticked consent boxes
- Bundling unrelated purposes together
- Hiding “Reject” behind multiple clicks
- Asking for too many permissions at once
- Firing tracking before consent
- Making consent mandatory for non-essential processing
- No way to change preferences later
- Vague language like “improve your experience” without specifics
11) Practical implementation checklist
- Identify all data collection and purposes
- Classify into necessary vs non-essential
- Draft plain-language notices
- Build consent UI with accept/reject/manage
- Store consent records server-side
- Gate SDKs/tags behind consent state
- Add settings page to change preferences
- Test by region/device/browser
- Review with legal/privacy counsel if needed
If you want, I can also give you:
- a wireframe for mobile and web consent screens,
- a React / React Native implementation pattern, or
- a GDPR-friendly consent checklist.