IAB Global Privacy Protocol

Starting with Android and iOS libraries v1.2.0 and airgap.js v9.69.0, the IAB Global Privacy Protocol (GPP) is available for use. Transcend Consent Management currently supports GPP's USP and USNAT strings with its GPP API implementation.

To use GPP in a mobile app, you need to configure your regimes to use GPP through the Admin Dashboard first. Please refer to the IAB GPP section of IAB Frameworks for Admin Dashboard-specific instructions. This document provides instructions for mobile setup only.

GPP data is saved to the device's local storage once a user gives their consent (SharedPreferences on Android and UserDefaults.standard on iOS). Below are the keys that can be used to access the data.

Key NameData TypeDescription
IABGPP_HDR_GppVersionStringGPP Version
IABGPP_HDR_CmpIdIntegerIAB assigned CMP ID
IABGPP_HDR_SignalStatusStringStatus of GPP signal string (can be "ready" or "not ready")
IABGPP_HDR_CmpDisplayStatusStringStatus of CMP interface (can be "hidden", "disabled", "visible")
IABGPP_HDR_SectionListStringSection ID(s) considered to be in force. Multiple IDs are separated by underscore, eg. "4_6"
IABGPP_HDR_CmpStatusStringStatus of CMP (can be "stub", "loading", "loaded", "error")
IABGPP_HDR_GppStringStringFull consent string in its encoded form

Code example:

let gppVersion = UserDefaults.standard.string(forKey: "IABGPP_HDR_GppVersion")
let cmpId = UserDefaults.standard.integer(forKey: "IABGPP_HDR_CmpId")
Context mContext = getApplicationContext();

SharedPreferences mPreferences = PreferenceManager.getDefaultSharedPreferences(
  mContext
);

String gppString = mPreferences.getString("IABGPP_HDR_GppString", "");

int cmpId = mPreferences.getInt("IABGPP_HDR_CmpId", 0);

Below are examples of keys for accessing USP and USNAT data.

Key NameData TypeDescription
IABGPP_USPV1_VersionStringUSP Version
IABGPP_USPV1_NoticeStringHas IAB US Privacy notice been provided? "Y" = Yes or "N" = No
IABGPP_USPV1_LspaCoveredStringIs IAB US Privacy publisher an IAB MSPA (formerly LSPA) signatory? "Y" = Yes or "N" = No
IABGPP_USPV1_OptOutSaleStringHas user opted out of sale of data? "Y" = Yes or "N" = No
IABGPP_USNATV1_VersionStringUSNAT Version
IABGPP_USNATV1_GpcBooleanIs Global Privacy Control enabled for the vendor list and detected on the end-user's browser?
...
IABGPP_USNATV1_SharingOptOutIntegerOpt-Out of the Sharing of the Consumer’s Personal Data. 0 = Not applicable, 1 = Opted Out, 2 = Did Not Opt Out

These are just some examples of keys for USNAT. Please refer to the USNAT API reference for a full list of USNAT fields. All USNAT keys in local storage start with IABGPP_USNATV1_ followed by the USNAT field name.

Code example:

let isGpcEnabled = UserDefaults.standard.bool(forKey: "IABGPP_USNATV1_Gpc")
let sharingOptOut = UserDefaults.standard.integer(forKey: "IABGPP_USNATV1_SharingOptOut")
Context mContext = getApplicationContext();

SharedPreferences mPreferences = PreferenceManager.getDefaultSharedPreferences(
  mContext
);

String uspVersion = mPreferences.getString("IABGPP_USPV1_Version", "");

int isGpcEnabled = mPreferences.getBoolean("IABGPP_USNATV1_Gpc", 0);