Info
Content

Consent Management Guideline for Mobile Apps

Overview

This document provides comprehensive guidelines for implementing consent management in mobile applications, ensuring compliance with data protection regulations including GDPR, LGPD, and IAB Transparency & Consent Framework (TCF) requirements. It addresses proper handling of user consent for third-party services including advertising networks, analytics platforms, and other tracking services.

Implementation Requirements

1. Don’t initialize Third-Party Services Without Consent Verification

Implementation Steps:
  1. Check if user has made a consent decision
  2. Verify consent for the specific vendor/service
  3. Only initialize the service if both conditions are met
  4. If no consent was granted for a given vendor or purpose, you’ll need to:
    1. Skip ithe initialization of that service (for example, Google AdMob);
    2. Use privacy-friendly alternatives, if any available;
    3. Limit the functionalities available according to your product revenue strategy. Example: on a totally free app that depends on the display of ads as the only revenue stream, you can display a friendly message stating that the app will not work or will be only partially available unless consent is given for marketing purposes;

Always implement both checks as required by GDPR Article 7(1) and IAB TCF specifications:

Phase 1: Has user made a decision?

  • Check if the user has interacted with the consent layer
  • If no decision has been made, do not process personal data

Phase 2: Does user consent to specific purpose?

User Workflow Scenarios

Scenario 1: Normal User Workflow

Flow: User opens app → SDK shows consent layer (if needed) → User makes choice → App continues with appropriate services

Important: back button navigation or gestures are disabled on our mobile SDKs, so the user cannot dismiss the consent layer without proper consent.

Implementation Steps:
  1. App Startup: Initialize consent management platform. You'll use the method checkAndOpen() for that. Check the examples on our help docs (iOS, Android)
  2. Consent Check: the previous step will determine whether consent is needed or not automatically, so the user can inform consent decision. 
  3. Service Initialization: Initialize services based on user consent choices
Implementation example:
// This hypothetical example assumes you have implemented: 
//   - OneSignal (s1448)
//   - Google Ads/AdMob (s1)
//   - Google Analytics (s26)

class yourGreatApp {

    void function onAppLaunch() {
        if shouldInitializeService("s148") {
            OneSignal.initialize("your-token")
        }
    
        if shouldInitializeService("s1") {
            AdMobService.initialize()
        }
    
        if shouldInitializeService("s26") {
            FirebaseAnalytics.initializeApp("your-token")
        }   
    }
    
    
    boolean private function shouldInitializeService(string: purposeId):
        // Phase 1: Check if user has made any decision
        consentStatus = CMPManager.getUserStatus()
        if consentStatus.status = "choiceDoesntExist"
            return false  // Consent Layer was not yet displayed to this client
        
        return CMPManager.shared.getStatusForPurpose(id: purposeId) == "granted"
    }
}

Scenario 2: No Internet Connection

Flow: User opens app without internet → CMP cannot load consent layer → App must handle gracefully

Critical Observations:
  • Our mobile SDK cannot retrieve configuration from servers
  • Previous consent decisions may still be valid (as per GDPR Article 7(3) on consent withdrawal)
  • App must function in degraded mode without processing personal data in case no consent was given yet
Implementation Strategy:
  1. Check for possible persisted consent data from previous sessions (you’ll use getUserStatus() as in the preivous example for that)
  2. If a previous consent exists, proceed normally
  3. If no persisted consent and no internet:
    • Block all non-essential third-party services
    • Show user-friendly message explaining the situation
    • Set up connectivity listener to retry when connection restored, and display the consent layer when this happens
    • Allow basic app functionality that doesn't require personal data processing
User Experience Considerations:
  • Display clear message about limited functionality
  • Implement retry option when connection available
  • Explain that no personal data will be shared until privacy choices are made
  • Provide option to continue in limited mode

Scenario 3: No Consent Necessary

Situation: User is outside EU and CMP is configured to only display in EU → No consent layer shown

Implementation Strategy:

  1. Initialize CMP configuration as normal
  2. Allow CMP to determine if consent layer should be shown using checkAndOpen()
  3. If consent is not required, user status will return “choiceExists” and vendors and purposes will be set to “granted”
  4. Initialize all services normally

The checkAndOpen() method will react to all of those situations. Implement a listener that will tracks consent changes. You can use the didReceiveConsent callback for that (iOS and Android). If at any time a given vendor or purpose is rejected, take action immediately and block the services accordingly.

Testing Checklist

Functional Testing

Normal Flow Testing:

  • App starts correctly and shows consent layer when needed
  • User consent choices are properly recorded and respected
  • Services initialize only with appropriate consent
  • App functions correctly after consent decisions

Rejection Flow Testing:

  • User rejection properly blocks third-party services
  • App remains functional or enters degraded mode depending on your revenue strategy

Offline Testing:

  • App handles no internet connection gracefully
  • Cached consent data is used appropriately
  • Privacy-friendly mode activates when needed
  • Connection restoration triggers proper retry logic

Timeout Testing:

Compliance Testing

Data Processing Verification:

  • No tracking data sent before user makes consent decision
  • Vendor IDs correctly mapped to actual services
  • Individual service blocking works as intended
  • Consent granularity properly implemented

Troubleshooting

Common Issues and Solutions

Issue: Services initialize even when consent is denied

Root Causes:
Solutions:
  • Incorrect CMP configuration (wrong ID, domain, etc.)
  • Network connectivity issues
  • User is outside target geographic region
  • App integration problems
Debugging Steps:
  • Verify CMP configuration matches account settings
  • Test network connectivity and CMP server accessibility
  • Check console logs for error messages
  • Test with force-open consent layer to verify integration
  • Confirm geographic targeting settings in CMP dashboard

Implementation Priority Checklist

High Priority (Must Complete Before Launch):
Ongoing Improvements:
  • Follow up analytics on your CMP dashboard for consent success rates
  • A/B testing for consent layer optimization
  • Integration with additional compliance frameworks
  • Enhanced user education about privacy choices

Remember: When facing uncertainty about consent requirements, always choose the more privacy-protective approach. It's better to be overly cautious than to violate user privacy or regulatory requirements.

 

Back to top