GDPR
Recommended Implementation
As of May 25th, the General Data Protection Regulation (GDPR) will be enforced in the European Union. To comply with GDPR, developers have two options.
-
Option 1 (recommended): Developer controls the GDPR consent process at the user level, then communicates the user’s choice to TGSDK. To do this, developers can collect the user’s consent using their own mechanism, and then use TGSDK APIs to update or query the user’s consent status.
-
Option 2: Allow TGSDK to handle the requirements. TGSDK will display a consent dialog before preload an ad for a European user, and will remember the user’s consent or rejection for subsequent ads.
APIs
// Get GDRP consent status
// yes = agree
// no = reject
// "" = unknow
NSString* gdpr = [TGSDK getUserGDPRConsentStatus];
// Set GDPR consent status
// yes = agree
// no = reject
[TGSDK setUserGDPRConsentStatus:@"yes"];
// User is restricted or not
// yes = restricted
// no = not
// "" = unknow
NSString* status = [TGSDK getIsAgeRestrictedUser];
// Set user is restricted or not
// yes = restricted
// no = not
[TGSDK setIsAgeRestrictedUser:@"no"];
Android
// Get GDRP consent status
// yes = agree
// no = reject
// "" = unknow
String gdpr = TGSDK.getUserGDPRConsentStatus();
// Set GDPR consent status
// yes = agree
// no = reject
TGSDK.setUserGDPRConsentStatus("yes");
// User is restricted or not
// yes = restricted
// no = not
// "" = unknow
String status = TGSDK.getIsAgeRestrictedUser();
// Set user is restricted or not
// yes = restricted
// no = not
TGSDK.setIsAgeRestrictedUser("no");
Unity
// Get GDRP consent status
// yes = agree
// no = reject
// "" = unknow
using Together;
string gdpr = TGSDK.GetUserGDPRConsentStatus();
// Set GDPR consent status
// yes = agree
// no = reject
using Together;
TGSDK.SetUserGDPRConsentStatus("yes");
// User is restricted or not
// yes = restricted
// no = not
// "" = unknow
using Together;
string status = TGSDK.GetIsAgeRestrictedUser();
// Set user is restricted or not
// yes = restricted
// no = not
using Together;
TGSDK.SetIsAgeRestrictedUser("no");