gdpr
App can ask users about their consent for sharing information with third parties.
Note: The SDK can forward users preferences if they follow the TCF v2 format.
The value of GDPR.consent has to be a Base64-encoded string with consent data in TCF-Format.
With the optional GDPR.isRulesEnabled boolean you can decide if the GDPR rules expressed in the consent data are applicable. For example, if your app is running outside of the EU, you can set this to false
.
Users preferences will be submitted to the ad server with every subsequent ad request. Users preference will not be persisted.
val consentData = "CPu2HEAPu2HEAAFADBDEDNCoAPLAAAAAAAYgAtwAgATgBbAAAAAA.YAAAAAAAAAAA"
// For the ad request
AdService.setAdRequestGlobalParameter(
AdRequestGlobalParameters::gdpr,
GDPR(consentData, null)
)
// For the tag and tracking requests
AdService.setTrackingGlobalParameter(
TrackingGlobalParameters::gdpr,
GDPR(consentData, null)
)
Content copied to clipboard