IAB GPP API

UniConsent CMP supports the Global Privacy Platform (GPP), which allows advertisers, publishers, and technology vendors in the digital advertising industry to comply with regulatory requirements across various markets. The GPP protocol streamlines the transmission of privacy, consent, and consumer choice signals from sites and apps to ad tech providers. The IAB Tech Lab oversees the development of the GPP technical specifications.

You must enable GPP in UniConsent dashboard to use GPP API 1.1.

The IAB Global Privacy Platform (GPP) API

The IAB Global Privacy Platform (GPP) provides several APIs that can be used to retrieve data related to various privacy and consent frameworks. These APIs include:

GPP Data API 1.1:

getGPPData command is removed in GPP API 1.1, you can retrive the gppData from the reponse of ping command. You can only get the response from GPP API with a callback function start from GPP 1.1.

Organizations and Platforms Utilizing GPP API Version 1.1:

  • Google Ad Manager
  • Amazon Advertising
  • and others

Ping API:

__gpp("ping", function (data, success) {
  console.log(data);
});

// response

{
  "gppVersion": "1.1",
  "cmpStatus": "loaded",
  "cmpDisplayStatus": "hidden",
  "signalStatus": "ready",
  "supportedAPIs": ["tcfeuv2","tcfcav1","uspv1","usnatv1","uscav1","usvav1","uscov1","usutv1","usctv1"],
  "cmpId":68,
  "sectionList":[2,6],
  "applicableSections":[2,6],
  "gppString":"xxxx",
  "parsedSections": {"xxx": "xxx"},
}

Has Section API:

This API checks if a specific section is present within the GPP data object. To check if the IAB EU TCF v2 section is present, the following command can be used:

__gpp("hasSection", function (data, success) {
  console.log(data, success);
}, 'tcfeuv2');

Get Section API:

This API retrieves a specific section within the GPP data object. To retrieve the IAB EU TCF v2 section, the following command can be used:

__gpp("getSection", function (data, success) {
  console.log(data, success);
}, 'tcfeuv2');

Get Field API:

This API retrieves a specific field within a section of the GPP data object. To retrieve a list of Vendor IDs with consent given for the IAB EU TCF v2, the following commands can be used:

__gpp("getField", function (data, success) {
  console.log(data, success);
}, 'tcfeuv2.VendorConsents');

Common Stub Code Error

Uncaught TypeError: p is not a function
    at window.__gpp_stub (stub.min.js:3:519)

You can only get the response from GPP API with a callback function start from GPP 1.1. Upgrade your api to use GPP 1.1 API.

GPP Data API 1.0 (Deprecated)

This API allows for the retrieval of the entire GPP data object, which includes data for all supported regulatory frameworks. The following command can be used to retrieve the GPP data object:

__gpp('getGPPData')

Has Section API:

This API checks if a specific section is present within the GPP data object. To check if the IAB EU TCF v2 section is present, the following command can be used:

__gpp('hasSection', null, 'tcfeuv2')

Get Section API:

This API retrieves a specific section within the GPP data object. To retrieve the IAB EU TCF v2 section, the following command can be used:

__gpp('getSection', null, 'tcfeuv2')

Get Field API:

This API retrieves a specific field within a section of the GPP data object. To retrieve a list of Vendor IDs with consent given for the IAB EU TCF v2, the following commands can be used:

__gpp('getField', null, 'tcfeuv2.VendorConsents')
__gpp('getField', null, 'tcfeuv2.VendorLegitimateInterests')

These APIs allow for the retrieval of important data related to various privacy and consent frameworks, which can be used by advertisers, publishers and technology vendors in the digital advertising industry to adapt to regulatory demands across markets. The IAB Tech Lab stewards the development of these technical specifications.

Compare GPP with IAB TCF 2.0 API

The Global Privacy Platform (GPP) API and the IAB TCF EU v2 API both serve the purpose of enabling compliance with the EU TCF framework. However, they differ in the following ways:

  1. Scope: The GPP API is a single protocol designed to streamline transmitting privacy, consent, and consumer choice signals from sites and apps to ad tech providers globally. On the other hand, the IAB TCF EU v2 API is specifically designed for transmitting signals related to the EU TCF framework.

  2. Stewardship: The GPP protocol is overseen by the IAB Tech Lab, which also stewards the IAB TCF EU v2 API. However, the GPP protocol encompasses other technical specifications beyond the EU TCF, while the IAB TCF EU v2 API is solely focused on the EU TCF.

  3. Functionality: The GPP API provides a range of functions beyond the EU TCF, such as retrieving CCPA data, while the IAB TCF EU v2 API focuses solely on retrieving data related to the EU TCF framework.

  4. Syntax: The GPP API and the IAB TCF EU v2 API have different syntax for retrieving data. For example, to retrieve the EU TCF v2 section within GPP data, the following command is used:

__gpp("getSection", null, "tcfeuv2")

Whereas, to retrieve the same data using the IAB TCF EU v2 API, the following command is used:

__tcfapi('getTCData', 2, function (tcData, success) {
  // Code to handle response
})

While both the GPP API and the IAB TCF EU v2 API serve the purpose of enabling compliance with the EU TCF framework, the GPP API is a more comprehensive protocol designed to streamline transmitting privacy, consent, and consumer choice signals globally, while the IAB TCF EU v2 API is specifically designed for transmitting signals related to the EU TCF framework.