Skip to main content

EU User Advertising Privacy Features

Android iOS
Supported in: Player Network SDK 1.21.03

To protect user data privacy and promote fairer market competition, the European Union officially implemented the Digital Markets Act (DMA) in November 2022.To comply with DMA regulations, the Consent Management Platform (CMP) from Google must be integrated into the Player Network SDK for EU users covered by DMA.

Enabling CMP configuration in INTLConfig​

Below is the recommended CMP activation configuration in INTLConfig.ini. It is not recommended to change ANALYTICS_CONSENT_REQUIRED_TYPE and ANALYTICS_CONSENT_DEFAULT_CONFIG; if modification is needed, please contact Google Business regarding the relevant policy permissions first.

[Analytics]
ANALYTICS_CONSENT_ENABLE = 1
ANALYTICS_CONSENT_CHANNEL = Firebase,AppsFlyer,Adjust
ANALYTICS_CONSENT_REQUIRED_TYPE = ad_user_data,ad_personalization
ANALYTICS_CONSENT_DEFAULT_CONFIG = ad_storage:1,analytics_storage:1,ad_user_data:1,ad_personalization:1
  • ANALYTICS_CONSENT_ENABLE: Indicates whether the Consent Mode feature is enabled.
    • 1: Enables CMP, pre-determines whether the player is an EU user based on IP, and sets Google Consent Mode. The IP pre-determination result is also synced to AppsFlyer and Adjust as the initial value of isDMA.
    • 0: Disables CMP, sets the configured Google Consent Mode permissions to agree by default. In this case, the game must handle the related logic, e.g., disabling privacy confirmation pop-up features. If isDMA is not passed through SetConsent, AppsFlyer and Adjust receive the status of a non-EEA user (isDMA = false).
  • ANALYTICS_CONSENT_CHANNEL: The channels where the Consent Mode feature takes effect. Supports Firebase, AppsFlyer, and Adjust; separate multiple channels with an English comma ,.
    • A channel only takes effect if it is also configured in ANALYTICS_REPORT_CHANNEL and initialized successfully. The channel name must match the one in ANALYTICS_REPORT_CHANNEL.
    • If not configured, the default value is Firebase,AppsFlyer,Adjust (since Player Network SDK 1.33.00). If you have integrated AppsFlyer or Adjust but do not need to sync the user consent status to it, configure this item explicitly and remove that channel.
  • ANALYTICS_CONSENT_REQUIRED_TYPE: Permission types that must be handled by the Consent Mode feature. Supported permission types include:
    • ad_storage: Enables storage mechanisms related to advertising
    • analytics_storage: Enables storage mechanisms related to analytics, such as device identifier storage
    • ad_user_data: Requests user consent to send user data for online advertising purposes
    • ad_personalization: Configures user consent status for personalized ads
  • ANALYTICS_CONSENT_DEFAULT_CONFIG: Default configuration for each permission when Consent Mode is enabled. The Player Network SDK reads this configuration for its default settings.
    • 1: User agrees to the permission type
    • 0: User refuses the permission type
caution

When the EU user advertising privacy feature is enabled:

  • You must call the SetConsent interface each time the game launches.
  • If ANALYTICS_CONSENT_CHANNEL includes AppsFlyer or Adjust, pass isDMA = true for EEA users. isDMA defaults to false, and each call overrides the SDK's IP pre-determination result. If it is not passed, AppsFlyer marks the user as not subject to GDPR and Adjust reports eea=0, so the user's refusal cannot be passed to these two channels.

According to the information returned by the user, call the SetConsent interface of Unity SDK or Unreal Engine SDK to set the consent status.

// EEA user agrees
INTLAPI.SetConsent(kConsentStatusGranted, "", "", true);
// EEA user refuses
INTLAPI.SetConsent(kConsentStatusDenied, "", "", true);
// Non-EEA user
INTLAPI.SetConsent(kConsentStatusGranted, "", "", false);

Fields Reported to Each Channel​

The Player Network SDK converts the permission types and isDMA into the corresponding fields of each channel before reporting:

Player Network SDKFirebaseAppsFlyerAdjust (partner: google_dma)
isDMANot usedisUserSubjectToGDPReea
ad_user_dataad_user_datahasConsentForDataUsagead_user_data
ad_personalizationad_personalizationhasConsentForAdsPersonalizationad_personalization
ad_storagead_storagehasConsentForAdStorageNot used
analytics_storageanalytics_storageNot usedNot used
  • AppsFlyer: When isDMA is false, only isUserSubjectToGDPR = false is reported as required by AppsFlyer, and the other fields are not reported. When isDMA is true, permission types that are not included in the consent configuration (such as ad_storage under the default configuration) are reported as granted.
  • Adjust: Reported through the granular options of third party sharing, where 1 means yes/granted and 0 means no/denied. eea is always reported; ad_user_data and ad_personalization are reported only when they are included in the consent configuration.

Process Logic Diagram​

Image: CMP Logic

  • Game needs to handle logic within the dashed box.
  • Set by reading default configuration: read default values set in ANALYTICS_CONSENT_DEFAULT_CONFIG and apply upon game launch.
  • Set(Granted)/Set(Denied): Call the Unity SDK or Unreal Engine SDK SetConsent interface to update the user consent status
    • Set(Granted): Pass the parameter kConsentStatusGranted for consent
    • Set(Denied): Pass the parameter kConsentStatusDenied for denial
    • To sync to AppsFlyer or Adjust, also pass isDMA

The Consent Mode feature can be verified via logs:

  1. Set LOG_LEVEL = 1 (info) or LOG_LEVEL = 0 (debug) in INTLConfig.ini.

  2. Search for keywords in logs, use the last entry, and check if it matches the configured ANALYTICS_CONSENT_REQUIRED_TYPE:

    1. Keyword and example for Android platform: FirebaseAnalytics setConsent:

      FirebaseAnalytics setConsent: consentMap = {AD_USER_DATA=GRANTED, AD_PERSONALIZATION=GRANTED}
    2. Keyword and example for iOS platform: Firebase: set consent:

      Firebase: set consent: {
      "ad_personalization" = granted;
      "ad_user_data" = granted;}
    3. AppsFlyer keyword: AppsFlyerAnalytics setConsent: for Android and AppsFlyer: setConsent: for iOS. Android example:

      AppsFlyerAnalytics setConsent: isUserSubjectToGDPR=true, dataUsage=granted, adsPersonalization=granted, adStorage=granted
    4. Adjust keyword: AdjustAnalytics setConsent: for Android and Adjust: setConsent: for iOS. Android example:

      AdjustAnalytics setConsent: eea=1, ad_user_data=granted, ad_personalization=granted
  3. For EEA users, the AppsFlyer log should show isUserSubjectToGDPR=true and the Adjust log should show eea=1. You can also search for the keyword consent_result_json to see what the SDK sends to each channel, where is_dma is the isDMA value currently in effect:

    [Analytics SetConsent]  consent_result_json = {"is_dma":"true","ad_user_data":"granted","ad_personalization":"granted"}

Modifying CMP Default Configuration​

note

It is not recommended to modify the ANALYTICS_CONSENT_DEFAULT_CONFIG. For modifications, please consult with Google Business to confirm the policy on related permissions first.

The configuration in this section applies to Firebase only.

When Player Network SDK initialization is incomplete, Firebase will read settings from XML (Android)/Plist (iOS) configuration files to set CMP.You should ensure that the permission configuration in the XML/Plist matches that in ANALYTICS_CONSENT_DEFAULT_CONFIG.

Android Platform Configuration​

<meta-data android:name="google_analytics_default_allow_analytics_storage" android:value="true" />
<meta-data android:name="google_analytics_default_allow_ad_storage" android:value="true" />
<meta-data android:name="google_analytics_default_allow_ad_user_data" android:value="true" />
<meta-data android:name="google_analytics_default_allow_ad_personalization_signals" android:value="true" />

Because the above configuration exists in INTLFirebase.aar and cannot be modified directly, in Unity engine projects, use tools:replace in the AndroidManifest.xml file to replace the corresponding permission android:value. For example, to deny the ad_storage permission:

<meta-data android:name="google_analytics_default_allow_ad_storage" android:value="false" tools:replace="android:value"/>

iOS Platform Configuration​

"GOOGLE_ANALYTICS_DEFAULT_ALLOW_ANALYTICS_STORAGE":true,
"GOOGLE_ANALYTICS_DEFAULT_ALLOW_AD_STORAGE":true,
"GOOGLE_ANALYTICS_DEFAULT_ALLOW_AD_USER_DATA":true,
"GOOGLE_ANALYTICS_DEFAULT_ALLOW_AD_PERSONALIZATION_SIGNALS":true,

In the INTLFirebaseKit.projmods file, locate the Info.plist node and modify the corresponding permission. For example, to deny the ad_storage permission:

"GOOGLE_ANALYTICS_DEFAULT_ALLOW_AD_STORAGE":false,