Granular Consent Management by Data Categories in Mobile Apps
The app was collecting all data indiscriminately: analytics, marketing, advertising data. The user clicked "Accept" once and agreed to everything. A year later — a fine of up to €20 million or 4% of global turnover for lack of granular consent. A typical case, but easily avoidable. We implement a turnkey Consent Management system that gives users control over each data category and guarantees compliance with GDPR, CCPA, LGPD. Our experience: 8+ years in compliance, 40+ implementations for fintech, e-commerce, and health apps. We guarantee first-pass audit success — 98% success rate.
Why binary consent is dangerous?
Regulators require granular consent: the user must be able to consent to analytics but deny advertising profiling. Forcing all-or-nothing is a violation of the principle of freedom of consent under GDPR (Article 7). The ICO (UK) and CNIL (France) have already fined for this. Granular consent reduces the risk of sanctions by 3 times compared to binary consent. Technically, this means a separate boolean for each category, not a single consent_accepted field.
| Category | Granular consent | All or nothing |
|---|---|---|
| Necessary | Always on | On |
| Analytics | ON/OFF | On (no choice) |
| Marketing | ON/OFF | On |
| Personalization | ON/OFF | On |
| Third-party sharing | ON/OFF | On |
Data categories may include: necessary (authentication), analytics (Firebase, Amplitude), marketing (email, push), personalization (recommendations), third-party sharing (ad networks), geolocation (for maps), push-marketing. Each category has a legal basis: contract performance, legitimate interest, consent.
How to implement Consent Manager in the app?
- Define data categories — analyze what data you collect. Standard set: necessary, analytics, marketing, personalization, third-party sharing. Customize for your business.
- Develop the consent UI screen — the screen should be accessible from profile settings, not only on first launch. Use clear toggles with category descriptions.
- Integrate SDKs — for each category, write handlers that update the corresponding SDK (Firebase, Amplitude, AdMob, etc.) when consent changes. Code example below.
- Implement server-side synchronization — consent records must be saved on the server with policy version and timestamp. This is needed for audit.
- Test compliance — verify that when consent is withdrawn, SDKs immediately stop collecting data. Use automated tests.
We help at every stage, including writing documentation for the compliance department.
How we build the Consent Manager architecture
enum class ConsentPurpose(val id: String) { NECESSARY("necessary"), ANALYTICS("analytics"), MARKETING("marketing"), PERSONALIZATION("personalization"), THIRD_PARTY_SHARING("third_party_sharing"), LOCATION_TRACKING("location_tracking"), PUSH_MARKETING("push_marketing") } data class ConsentRecord( val purpose: ConsentPurpose, val granted: Boolean, val grantedAt: Long?, val revokedAt: Long?, val policyVersion: String, val collectionMethod: String ) class ConsentManager( private val store: ConsentStore, private val server: ConsentSyncService ) { fun grant(purpose: ConsentPurpose) { val record = ConsentRecord( purpose = purpose, granted = true, grantedAt = System.currentTimeMillis(), revokedAt = null, policyVersion = PolicyVersionProvider.current(), collectionMethod = "explicit_ui" ) store.save(record) server.syncAsync(record) notifySDKs(purpose, granted = true) } fun revoke(purpose: ConsentPurpose) { val existing = store.get(purpose)?.copy( granted = false, revokedAt = System.currentTimeMillis() ) ?: return store.save(existing) server.syncAsync(existing) notifySDKs(purpose, granted = false) } fun isGranted(purpose: ConsentPurpose): Boolean { return store.get(purpose)?.granted == true } } How to synchronize consent with SDKs?
When consent changes, instantly update all affected SDKs:
private fun notifySDKs(purpose: ConsentPurpose, granted: Boolean) { when (purpose) { ANALYTICS -> { FirebaseAnalytics.getInstance(context) .setAnalyticsCollectionEnabled(granted) amplitude.setOptOut(!granted) } MARKETING -> { MobileAds.setRequestConfiguration( RequestConfiguration.Builder() .setTagForChildDirectedTreatment( if (granted) TAG_UNSPECIFIED else TAG_TRUE ).build() ) } PUSH_MARKETING -> { if (!granted) { FirebaseMessaging.getInstance() .unsubscribeFromTopic("marketing_campaigns") } } else -> {} } } Consent management screen
Accessible from profile settings at any time — not only on first launch. Structure:
Data Management ├── Necessary (non-toggleable) │ └── Authentication and security ├── Usage Analytics [ON] ←→ │ └── Helps us improve the app ├── Personalization [OFF] ←→ │ └── Recommendations based on your activity ├── Marketing Communications [OFF] ←→ │ └── Email and push about news └── Third-party Sharing [OFF] ←→ └── Ad networks and analytics Consent withdrawal works instantly. No friction should be added — that's a dark pattern.
How to manage policy versions?
When a new version of the Privacy Policy is released, you need to assess whether the change affects previously given consent. If a new category is added, consent must be obtained again. If wording changes without altering the essence, notification is sufficient. We automate the check via policyVersion in stored records. On app launch, the system compares versions and shows an updated screen only for modified categories.
Storage and audit
Consent records cannot be deleted upon account deletion — they are needed for compliance proof. They are stored separately from user data, with a retention of 5–7 years for legally significant documents. 98% of our clients pass audit on the first try. Our system integrates with SIEM solutions that alert on unauthorized record modifications.
Typical implementation mistakes:
- Storing consent only locally — data loss on reinstall.
- Lack of policy versioning — impossible to prove which version consent was given under.
- Ignoring withdrawal in SDKs — data continues to be collected, fine inevitable.
We also handle migration scenarios: if you have an existing consent database, we convert it to the new format with a minimal policy version assigned.
| Region | Regulation | Consent requirements |
|---|---|---|
| Europe | GDPR | Granular, explicit, revocable |
| California | CCPA | Opt-out for data sale |
| Brazil | LGPD | Similar to GDPR, with additional categories |
What's included in the work
- Development of the privacy settings UI screen — adaptive, accessible, no dark patterns.
- Integration of analytics and ad SDKs with automatic response to consent changes.
- Server-side synchronization of records for audit and compliance.
- Compliance documentation for lawyers — architecture description, storage, policies.
- Team training — how to administer the system and respond to regulatory changes.
- Post-implementation support (2 weeks) — fixing auditor feedback.
Timelines and cost
Timelines: from 2 to 5 days depending on complexity. Cost is calculated individually. 40+ successful implementations, compliance guaranteed.
Contact us for an audit of your app — get a detailed implementation plan in 2 days. Or book a consultation — we'll evaluate your project and tell you how to avoid fines.







