The General Data Protection Regulation (GDPR) requires you to scope your user's consent. A user falls within the GDPR scope for your app when one more of the following applies:
- The user is currently located in the European Union (EU).
- The user registers with the app as an EU resident.
- The app specifically targets EU users.
For more information about how DT applies GDPR, see GDPR.
DT recommends that the first time you gather a user's consent, pass it to the DT FairBid SDK before initializing it. The SDK considers the user's consent when initializing. For future sessions, call the API if the user updates their consent, as the SDK caches the consent.
Note
If you do not pass the user's consent to the DT FairBid SDK, the SDK only shows contextual ads to that user, which might negatively reduce your revenue.
User Consent Given
To indicate that the user gives consent, use the following API:
UserInfo.setGdprConsent(true, context);
// true or YES if you have the user’s consent
FairBid.user().gdprConsent = true
Objective-C
[FairBid user].GDPRConsent = YES;
UserInfo.SetGdprConsent(true);
User Consent NOT Given
To indicate that the user does not give consent, use the following API:
UserInfo.setGdprConsent(false, context);
// false or NOT if you do not have the user’s consent
UserInfo.SetGdprConsent(false);
[Optional] Additional User Consent String
To pass an optional consent string, use the following API:
String consentString = "BOEFEAyOEFEAyAHABDENAI4AAAB9vABAASA";
UserInfo.setGdprConsentString(consentString, this);
FairBid.user().gdprConsentString = "BOEFEAyOEFEAyXXXXXXI4AAAB9vABAASA"
Objective-C
[FairBid user].GDPRConsentString = @"BOEFEAyOEFEAyXXXXXXXI4AAAB9vABAASA";
var consentString = "BOEFEAyOEFEAyAHABDENAI4AAAB9vABAASA";
UserInfo.SetGdprConsentString(consentString);;