This feature is currently only available in PBS-Java.
This module provides a way for publishers to define a custom interpretion for GPP strings in Sections 7-12. If the publisher is satisfied with Prebid’s interpretation of GPP SIDs 7-12 as defined in Prebid US Compliance Support, it’s recommended that they utilze the US Gen Privacy Module instead of this one.
This module lets publishers define GPP string interpretation with a powerful general syntax called JsonLogic. At high traffic volumes with complex interpretion logic, the Prebid Server Host Company may want to monitor compute resource utilization consumed by use of this feature. Another option would be to build a custom privacy module.
The use cases for this module are the same as for the US Gen Privacy Module
:
The difference is that instead of the GPP interpretation logic being coded into the module, it allows publishers and their lawyers to come up with their own interpretations. As you’ll see, this is powerful but complicated.
Some decisions are needed to activate the module within Prebid Server:
The US Custom Logic Privacy Module is included in PBS-Java 1.130, but is not activated until it’s placed
in the global or account-level config in a privacy.modules
object.
Here’s an example:
{
"privacy": {
"modules": [{
"code": "iab.uscustomlogic",
"config": {
... see below for examples ...
}
}],
"allowactivities": {
"ACTIVITY": {
"default": true,
"rules": [{
"privacyreg": ["*"] // causes the Activity Control to call all defined privacy modules
}]
}
}
Here are the parameters allowed in the module’s config
section. See below for examples.
Parameter | Type | Scope | Description |
---|---|---|---|
sids | array of integer | required | Process only the named section IDs. |
normalizeFlags | boolean | optional | Convert the state SIDs 8-12 into SID 7 fields as described in Prebid US Compliance Support. Defaults to true . |
activityConfig | array of objects | required | Defines what processing to do. |
activityConfig[].activities | array of strings | required | Defines which activity or activities are in scope for this array entry. |
activityConfig[].restrictIfTrue | object | required | JsonLogic rules object. |
Tip: Scroll down to the example to see what a JsonLogic rule (the restrictIfTrue
field) looks like. The config only needs to contain the JsonLogic rule – the module will create the JsonLogic data
from the GPP string.
The way JsonLogic works is that you supply two JSON objects:
restrictIfTrue
field.The specific fields produced by the module that can be referred to in a rule are based on the IAB’s definition of each SID. The only difference is that array fields simply have a number appended since JsonLogic doesn’t support arrays.
These are the fields that can be referenced in the JsonLogic rule:
See the IAB technical specifications for the definition and values allowed for each field. e.g. GPP Extension: IAB Privacy’s US National Privacy Technical Specification
The US Custom Logic Privacy Module will not operate within the PBS workflow unless it’s called by the Activity Control system. e.g.
{
"privacy": {
"allowactivities": {
"ACTIVITY": {
"default": true,
"rules": [{
"privacyreg": ["*"] // this causes the Activity Control to call this module
},{
... more rules ...
}]
}
}
}
}
Again, publishers will only use this module if their lawyers disagree with Prebid’s default interpretation of the US National or US State GPP strings.
As one example, Prebid interprets the Global Privacy Control (GPC) flag as a strong privacy signal that disables many GPP
privacy-related activities. Say a publisher’s lawyers want to allow the transmitUfpd
activity to operate in the US even when the GPC flag is set to true. In addition, they’ve declared that
they don’t operate in any “sensitive data” category, so wish to remove those elements from
interpretation.
Here’s an example config:
{
"privacy":
{
"modules": [{
"code": "iab.uscustomlogic",
"config": {
"sids": [7,8,9,10,11,12],
"normalizeFlags": true,
"activityConfig": [{
"activities": ["transmitUfpd"],
"restrictIfTrue": {
"or": [
{ "==": [{"var": "MspaServiceProviderMode"},1] },
{ "and": [
{ "==": [{"var": "MspaServiceProviderMode"},2] },
{ "or": [
{ "==": [{"var": "SaleOptOut"},1] },
{ "==": [{"var": "SaleOptOutNotice"},2] },
{ "==": [{"var": "SharingNotice"},2] },
{ "==": [{"var": "SharingOptOut"},1] },
{ "==": [{"var": "TargetedAdvertisingOptOutNotice"},2] },
{ "==": [{"var": "TargetedAdvertisingOptOut"},1] },
{ "!=": [{"var": "KnownChildSensitiveDataConsents1"},0] },
{ "!=": [{"var": "KnownChildSensitiveDataConsents2"},0] },
{ "==": [{"var": "PersonalDataConsents"},2] }
]}
]}
]}
}]
}
},{
"code": "iab.usgen",
"config": { skipSids: [] }
}],
"allowactivities": {
"transmitUfpd": {
"default": false,
"rules": [{
"privacyreg": ["iab.uscustomlogic"]
}]
},
"transmitPreciseGeo": {
"default": false,
"rules": [{
"privacyreg": ["iab.usgen"]
}]
}
}
}
}
Notes:
In this example, a publisher’s lawyers have determined that Prebid’s normalization of Utah (SID 11) to the US National (SID 7) equivalents should not be used. This is somewhat contrived, but illustrates that you can operate on non-normalized GPP flags.
{
"privacy":
{
"modules": [{
"code": "iab.uscustomlogic",
"config": {
"sids": [11],
"normalizeFlags": false, // note: normalization to SID 7 not performed
"activityConfig": [{
"activities": ["transmitUfpd"],
"restrictIfTrue": {
... JsonLogic Rule refers to Utah-definitions ...
... e.g. SensitiveDataProcessing3 and SensitiveDataProcessing4 are reversed ...
},{
... other activities ...
}]
}
},{
"code": "iab.usgen",
"config": {
"skipSids": [11]
}
}],
"allowactivities": {
"transmitUfpd": {
"default": false,
"rules": [{
"privacyreg": ["*"]
}]
},
... other activities ...
}
}
}
Here’s how the module works when called by an Activity Control:
regs.gpp
regs.gpp_sid
. This is an array of integers.abstain
.restrictIfTrue
section as the rule, and pass in the GPP SID flags as the data. If the result is true, then “allow=false”.allow: false
to the Activity Control system.allow: true
to the Activity Control systemabstain
Because the module config is not an array, it is not be possible to create rules that apply to each US state’s non-normalized GPP flags for the same activity.
Supporting this scenario would require a PBS Host Company to build a custom privacy module.
Additional information about the outcoming of privacy module processing can be obtained by setting ext.prebid.trace: "basic"
.
It may be useful to use the JsonLogic tool to confirm the desired logic:
restrictIfTrue
object.Here’s a screenshot showing the usage of that tool: