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
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.
    • 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.
  • ANALYTICS_CONSENT_CHANNEL: The channel where the Consent Mode feature takes effect; supports Firebase.
  • 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.

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

INTLAPI.SetConsent(kConsentStatusGranted);

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

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;}

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.

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,