IAB Global Privacy Platform

Using Mobile App Consent, you can enable the IAB Global Privacy Platform (GPP) for enhanced compliance with US data privacy laws.

IAB GPP helps address the challenges posed by the growing number of different privacy regulations worldwide. Implementing OneTrust with the IAB Global Privacy Platform Consent empowers publishers to streamline ad tech vendors and advertising content.

You can leverage GPP when configuring for the following frameworks:

California Privacy Rights Act (CPRA)

California Consumer Privacy Act (CCPA)

Virginia Consumer Data Protection Act (CDPA)

Colorado Privacy Act (CPA)

Connecticut Data Privacy Act (CTDPA)

Utah

US National


📘

Note

First, GPP needs to be enabled from geolocation rules within the OneTrust Admin console. For more information on how to configure please visit Configuring Global Privacy Settings

Accessing GPP data

Once a user gives consent, OneTrust will write IAB GPP data and save it to SharedPreferences. Your application can access the data by fetching it using following keys.

GPP KeysData typeDescription
IABGPP_HDR_VersionIntegerGPP version
IABGPP_HDR_SectionsStringList of Section IDs
IABGPP_HDR_GppStringStringFull consent string in its encoded form
IABGPP_GppSIDStringSection ID(s) considered to be in force. Multiple IDs are separated by underscore, e.g. “2_3”

Sample Code Snippet

// Swift
var GppValue : Any?
guard let savedValue = UserDefaults.standard.value(forKey: "IABGPP_HDR_GppString") else {
	GppValue = ""
	return
}
if savedValue is Int {
	GppValue = String(savedValue as! Int)
} else if savedValue is String {
	GppValue = String(savedValue as! String)
}

// ObjC
id GppValue;
id savedValue = [NSUserDefaults.standardUserDefaults valueForKey:@"IABGPP_HDR_GppString"];
if (savedValue) {
	GppValue = (NSString *)savedValue;
} else {
	GppValue = @"";
}

Section IDs

GPP KeyData typeDescription
IABGPP_[SectionID]_StringStringString representation of each section. E.g. IAB TCF EU v2 String will be found at IABGPP_2_String

Each section represents a unique privacy signal, usually a unique jurisdiction. Below are the supported sections, for more information please visit GPP Signal IDs

Section IDKeyDescription
2IABGPP_2_StringEU TCF v2 section
6IABGPP_6_StringUSPrivacy String
7IABGPP_7_StringUS - national section
8IABGPP_8_StringUS - California section
9IABGPP_9_StringUS - Virginia section
10IABGPP_10_StringUS - Colorado section
11IABGPP_11_StringUS - Utah section
12IABGPP_12_StringUS - Connecticut section

Sample Code Snippet

// Swift-US National
var GppValue : Any?
guard let savedValue = UserDefaults.standard.value(forKey: "IABGPP_7_String") else {
	GppValue = ""
	return
}
if savedValue is Int {
	GppValue = String(savedValue as! Int)
} else if savedValue is String {
	GppValue = String(savedValue as! String)
}

// ObjC
id GppValue;
id savedValue = [NSUserDefaults.standardUserDefaults valueForKey:@"IABGPP_7_String"];
if (savedValue) {
	GppValue = (NSString *)savedValue;
} else {
	GppValue = @"";
}

GPP keys for USPrivacy

GPP KeysData typeDescription
IABGPP_USP1_VersionIntegerIAB US Privacy String Version number (see IAB US Privacy v1 specification)
IABGPP_USP1_NoticeStringIAB US Privacy notice has been provided
IABGPP_USP1_OptOutStringIAB US Privacy opt out of sale
IABGPP_USP1_LSPACoveredStringIAB US Privacy publisher is signatory to the LSPA

Sample Code Snippet

// Swift-USPrivacy
var PrivacyNotice : Any?
guard let savedValue = UserDefaults.standard.value(forKey: "IABGPP_USP1_Notice") else {
	PrivacyNotice = ""
	return
}
if savedValue is Int {
	PrivacyNotice = String(savedValue as! Int)
} else if savedValue is String {
	PrivacyNotice = String(savedValue as! String)
}

// ObjC
id PrivacyNotice;
id savedValue = [NSUserDefaults.standardUserDefaults valueForKey:@"IABGPP_USP1_Notice"];
if (savedValue) {
	PrivacyNotice = (NSString *)savedValue;
} else {
	PrivacyNotice = @"";
}