This article explains how to validate the Global Privacy Control setup. The article explaining on how to set up the Global Privacy Platform framework with support for Global Privacy Control is available here.
Table of contents
Prerequisites
To verify whether the GPC (Global Privacy Control) flag is properly exposed in the Cookie Information GPC API, we need a plugin or a browser that supports GPC. The official list is available here.
In this article, we will use Privacy Badger for testing purposes, although you are free to use any tool you prefer. This article assumes that the GPC signals are enabled in your browser.
Please note - the plugins and browsers that support GPC are external third-party tools, and we cannot provide assistance with them. If you need support with these specific tools, please refer to their official websites.
The validation process
Please navigate to the website where the GPP and GPC implementations are available.
Inspect the page using the following shortcuts:
Windows: Control + Shift + C
macOS: Command + Option + C
Alternatively, you can right-click anywhere on the website and select Inspect from the bottom of the menu.
Please navigate to the Console tab in the top panel.
Please use the command below:
__gpp('ping', (data) => {
console.log(data)
});
Please see the example output below:Please review the
applicableSections
array. It should consist of anid
chosen in the configuration script. Please refer to the example below:
The setup below:<script>
window.cookieInformationCustomConfig = {
GPP: {
applicableSections: [
{ id: 8, name: 'uscav1'},
],
},
};
</script
Would result in a ping data response (for the call outlined in step 4 above) with[8]
set in theapplicableSections
array as illustrated in the example screenshot in step 4.Please review the
parsedSections
array.It should contain a
name
chosen in the configuration script. Following the example available in point 5., it should beuscav1
.If the GPC signal is enabled in the browser, the
parsedSections.uscav1.Gpc
object should return the valuetrue
.If the GPC signal is disabled, the
parsedSections.uscav1.Gpc
object should return the valuefalse
.
The alternative validation process
Inspect the page using the following shortcuts:
Windows: Control + Shift + C
macOS: Command + Option + C
Alternatively, you can right-click anywhere on the website and select Inspect from the bottom of the menu.
Please navigate to the Application tab in the top panel. Please expand the
local storage
section and capture thegppString
key’s value from inspect tool.Please navigate to the IAB GPP Encoder / Decoder, enter the copied value, decode it, and then verify the ping data's sections as described above.
Common mistakes
Missing GPP configuration script: Please ensure the GPP configuration script has been deployed as described here.
Not updated Cookie Information pop-up script: Ensure the Cookie Information pop-up script includes the
data-gpp-enabled
attribute as outlined here.Missing
gpc.json
in the well-known path: Please make sure the gpc.json file is created and deployed under the well-known path as detailed here.