How to Integrate UniConsent CMP with AppsFlyer (AAP/MMP) SDK

AppsFlyer is a certified Google Mobile Measurement Partner (MMP) and App Attribution Partner (AAP). This guide explains how to integrate the UniConsent Consent Management Platform (CMP) with the AppsFlyer SDK for mobile apps to ensure proper consent signal transmission in compliance with privacy regulations.

Android Integration

UniConsent CMP automatically detects the presence of the AppsFlyer SDK and sends user consent signals through its API.

Step 1: Initialize the AppsFlyer SDK and UniConsent CMP SDK

Refer to the AppsFlyer Android SDK Initialization Guide for full setup details.

To optionally enable TCF (Transparency & Consent Framework) data collection, use the following line before starting the SDK:

AppsFlyerLib.enableTCFDataCollection(true);

Step 2: Start AppsFlyer in the handle(Event event) Callback

Make sure to start AppsFlyer within the CMP callback, once user consent is available:

@Override
public void handle(Event event) {
    AppsFlyerLib.getInstance().start(this);
}

What to Expect

  • When the integration is successful, you will see debug log messages such as:
  Sending consent signal to Appsflyer
  • When filtering logs from com.uniconsent.sdk.aap, you should observe confirmation logs like:
  Successfully set consent signal to Appsflyer: {AD_USER_DATA=GRANTED, AD_STORAGE=GRANTED, AD_PERSONALIZATION=GRANTED, ANALYTICS_STORAGE=GRANTED}

These logs confirm that UniConsent CMP has successfully passed consent status to the AppsFlyer SDK, enabling privacy-compliant data processing and attribution.

Note

To ensure that user consent is available, make sure to call your MMP/AAP API within the override fun handle(event: Event?) (Android) or public func onDismiss() (iOS) callback of the CMP.

Learn more about the UniConsent SDK API in the following guides: