Skip to main content

EU User Consent Configuration (SetConsent)

AndroidiOS
If you are using Unreal Engine, see Unreal Engine SDK's SetConsent.

Set EU user consent status.Invoke SetConsent after the app startup to update user consent status.

Each app startup will reset the user consent status. To update user consent status, invoke the SetConsent method every time the app starts.

The user consent status is synced to the channels configured in ANALYTICS_CONSENT_CHANNEL. Firebase, AppsFlyer, and Adjust are supported. For details, see EU User Advertising Privacy Features.

Function Definition​

public static void SetConsent(FINTLConsentStatus status, string types = "", string specificChannel = "", bool isDMA = false);

Input Parameters​

ParametersTypeExplanationNote
statusFINTLConsentStatusUser Consent StatusRequired
typesstringTypes of user consent permissions (separated by English comma ',')Optional. If left blank, use the value of ANALYTICS_CONSENT_REQUIRED_TYPE from INTLConfig.ini.
specificChannelstringUA channel requiring special settingsOptional. If left blank, use the value of ANALYTICS_CONSENT_CHANNEL from INTLConfig.ini.
isDMAboolWhether DMA applies to the user (EEA user)Optional. Defaults to false. Used by AppsFlyer and Adjust; not used by Firebase. Each call overrides the SDK's IP pre-determination result, so pass true for EEA users.
Supported in: Player Network SDK 1.32.01

User Consent Status (FINTLConsentStatus)​

TypeDescription
kConsentStatusDeniedUser does not agree
kConsentStatusGrantedUser agreed

Code example​

// Non-EEA user
INTLAPI.SetConsent(kConsentStatusGranted);
// EEA user refuses (pass isDMA to sync to AppsFlyer and Adjust)
INTLAPI.SetConsent(kConsentStatusDenied, "", "", true);