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 Name | Data Type | Description |
---|---|---|
IABGPP_HDR_GppVersion | String | GPP Version |
IABGPP_HDR_CmpId | Integer | IAB assigned CMP ID |
IABGPP_HDR_SignalStatus | String | Status of GPP signal string (can be "ready" or "not ready") |
IABGPP_HDR_CmpDisplayStatus | String | Status of CMP interface (can be "hidden", "disabled", "visible") |
IABGPP_HDR_SectionList | String | Section ID(s) considered to be in force. Multiple IDs are separated by underscore, eg. "4_6" |
IABGPP_HDR_CmpStatus | String | Status of CMP (can be "stub", "loading", "loaded", "error") |
IABGPP_HDR_GppString | String | Full 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 Name | Data Type | Description |
---|---|---|
IABGPP_USPV1_Version | String | USP Version |
IABGPP_USPV1_Notice | String | Has IAB US Privacy notice been provided? "Y" = Yes or "N" = No |
IABGPP_USPV1_LspaCovered | String | Is IAB US Privacy publisher an IAB MSPA (formerly LSPA) signatory? "Y" = Yes or "N" = No |
IABGPP_USPV1_OptOutSale | String | Has user opted out of sale of data? "Y" = Yes or "N" = No |
IABGPP_USNATV1_Version | String | USNAT Version |
IABGPP_USNATV1_Gpc | Boolean | Is Global Privacy Control enabled for the vendor list and detected on the end-user's browser? |
... | ||
IABGPP_USNATV1_SharingOptOut | Integer | Opt-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);