Skip to content

Commit bb594ae

Browse files
authored
JS: document gpp control restrictActivities option (#6540)
* JS: document gpp control restrictActivities option * fix missin parens * add examples
1 parent d249245 commit bb594ae

2 files changed

Lines changed: 38 additions & 1 deletion

File tree

dev-docs/modules/gppControl_usnat.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,28 @@ Prebid functionality created to address regulatory requirements does not replace
3232

3333
This module activates if the `gpp` object in the consent management configuration section exists and the consentManagementGpp module exists. See that [module's documentation](/dev-docs/modules/consentManagementGpp.html) for parameter definitions. This module does **not** work with static GPP section 7 strings provided in the first-party data `regs.gpp` object, but **does** work if the `gpp.cmpApi` is set to `static` and `gpp.consentData` is appropriately populated via setConfig.
3434

35+
Optional configuration options are:
36+
37+
{: .table .table-bordered .table-striped }
38+
| Param | Type | Description | Example |
39+
| --- | --- | --- | --- |
40+
| gpp.mspa | `Object` | | |
41+
| gpp.mspa.restrictActivities | `Array` | A list of [activities](/dev-docs/activity-controls.html#activities) to be restricted in addition to the [default restrictions](/features/mspa-usnat.html#usnat-activity-restrictions). If specified, and if not already restricted, they will be treated similarly to `syncUser`. | `['accessDevice']` |
42+
43+
### Example: disable device access on user opt-out
44+
45+
```javascript
46+
pbjs.setConfig({
47+
consentManagement: {
48+
gpp: {
49+
mspa: {
50+
restrictActivities: ['accessDevice', 'accessRequestCredentials']
51+
}
52+
}
53+
}
54+
})
55+
```
56+
3557
## Build the Package
3658

3759
Follow the basic build instructions in the GitHub Prebid.js repo's main [README](https://github.com/prebid/Prebid.js/blob/master/README.md). To include the consent management module and the GPP Control - USNat module, an additional option must be added to the **gulp build** command:

dev-docs/modules/gppControl_usstates.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,28 @@ Optional configuration options are:
3636
| Param | Type | Description | Example |
3737
| --- | --- | --- | --- |
3838
| gpp.mspa | `Object` | | |
39+
| gpp.mspa.restrictActivities | `Array` | A list of [activities](/dev-docs/activity-controls.html#activities) to be restricted in addition to the [default restrictions](/features/mspa-usnat.html#usnat-activity-restrictions). If specified, and if not already restricted, they will be treated similarly to `syncUser`. | `['accessDevice']` |
3940
| gpp.mspa.sids | `Array` | GPP SIDs that should be covered by activity restrictions. Defaults to all US state SIDs (`[8, 9, 10, 11, 12]`). This is the only value needed for normal operation. Other options are for special cases and future-proofing. | `[8, 9]` |
4041
| gpp.mspa.sections | `Object` | Map from section ID to per-section configuration options | `{8: {name: 'usca'}}` |
4142
| gpp.mspa.sections.name | `String` | GPP API name to use for the section. Defaults to the names given listed under [section information -> section IDs](https://github.com/InteractiveAdvertisingBureau/Global-Privacy-Platform/blob/main/Sections/Section%20Information.md#section-ids). This option would only be used if your CMP has named their sections in a non-standard way. | `uscav3` |
4243
| gpp.mspa.sections.normalizeAs | `integer` | Normalize the flags for this section as if it were the number provided. See [example](#normalize-example). Each section defaults to its own ID. | `8` |
4344

4445
### Examples
4546

47+
#### Disable device access on user opt-out
48+
49+
```javascript
50+
pbjs.setConfig({
51+
consentManagement: {
52+
gpp: {
53+
mspa: {
54+
restrictActivities: ['accessDevice', 'accessRequestCredentials']
55+
}
56+
}
57+
}
58+
})
59+
```
60+
4661
#### Enable activity controls for certain sections only
4762

4863
```javascript
@@ -117,7 +132,7 @@ You can also use the [Prebid.js Download](/download.html) page.
117132

118133
- [IAB Global Privacy Platform Full Specification Repository](https://github.com/InteractiveAdvertisingBureau/Global-Privacy-Platform)
119134
- [IAB Global Privacy Platform CMP API Specification](https://github.com/InteractiveAdvertisingBureau/Global-Privacy-Platform/blob/main/Core/CMP%20API%20Specification.md)
120-
- [IAB Global Privacy Platform USNat string Specification](https://github.com/InteractiveAdvertisingBureau/Global-Privacy-Platform/blob/main/Sections/US-National/IAB%20Privacy%E2%80%99s%20Multi-State%20Privacy%20Agreement%20(MSPA)%20US%20National%20Technical%20Specification.md
135+
- [IAB Global Privacy Platform USNat string Specification](https://github.com/InteractiveAdvertisingBureau/Global-Privacy-Platform/blob/main/Sections/US-National/IAB%20Privacy%E2%80%99s%20Multi-State%20Privacy%20Agreement%20(MSPA)%20US%20National%20Technical%20Specification.md)
121136
- [Prebid US Compliance Support](/features/mspa-usnat.html)
122137
- [Prebid Activity Controls](/dev-docs/activity-controls.html)
123138
- [Prebid Consent Management - US Privacy Module](/dev-docs/modules/consentManagementUsp.html)

0 commit comments

Comments
 (0)