EU User Consent Configuration (SetConsent)
AndroidiOS
If you are using the Unity engine, please refer to SetConsent in the Unity SDK.
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
UFUNCTION(BlueprintCallable, Category = "INTLSDKAPI")
static void SetConsent(FINTLConsentStatus status, const FString types="", const FString specificChannel="", bool isDMA=false);
Input Parameters
| Parameters | Type | Description | Note |
|---|---|---|---|
| status | FINTLConsentStatus | User Consent Status | Required |
| types | string | Types of user consent permissions (separated by English comma ',') | Optional. If left empty, the value of ANALYTICS_CONSENT_REQUIRED_TYPE from INTLConfig.ini will be used. |
| specificChannel | string | UA channel requiring special settings | Optional. If left empty, the value of ANALYTICS_CONSENT_CHANNEL from INTLConfig.ini will be used. |
| isDMA | bool | Whether 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)
| Type | Description |
|---|---|
| kConsentStatusDenied | User does not agree |
| kConsentStatusGranted | User agreed |
Code example
// Non-EEA user
UINTLSDKAPI::SetConsent(kConsentStatusGranted);
// EEA user refuses (pass isDMA to sync to AppsFlyer and Adjust)
UINTLSDKAPI::SetConsent(kConsentStatusDenied, "", "", true);