AppsFlyerConsent

Visão Geral

AppsFlyerConsent encapsulates the properties for acquiring consent data required by the Digital Marketing Act (DMA) under the GDPR regulation.

Initializers

initForGDPRUser

Argumentos de entrada

TipoNomeDescrição
BooleanoforGDPRUserWithHasConsentForDataUsageIndicates whether the user give consent to send their user data to Google.
BooleanohasConsentForAdsPersonalizationIndicates whether the user consented to use their data for personalized advertising.

Exemplo de uso:

// If the user is subject to DMA - collect the consent data
// or retrieve it from the storage

// Set the consent data to the SDK:
var gdprConsent = AppsFlyerConsent(forGDPRUserWithHasConsentForDataUsage: true, hasConsentForAdsPersonalization: true) 
AppsFlyerLib.shared().setConsentData(gdprConsent)

initForNonGDPRUser

Argumentos de entrada

Nenhum

Exemplo de uso:

// If the user is not subject to DMA:
var nonGdprUser = AppsFlyerConsent(nonGDPRUser: ()) 
AppsFlyerLib.shared().setConsentData(nonGdprUser)