...
GDPR consent is separated into two main sides: consent for vendors, which are third parties in the site that may use personal data from the users (ad providers, analytics systems, etc.), and consent for the publisher itself, when personal data is processed by the publisher.
While vendor consent is pretty much standard to be available in CMPs, publisher consent may not be needed in every application, given that for a great deal lot of publisher sites, no personal information is directly processed by the publisher. AdConsent makes vendor consent available out of the box, but for the cases where publisher consent is also needed, the function setPublisherPurposes
needs to be called at configuration time to enable publisher consent in AdConsent. This feature applies to GDPR only.
...
Code Block |
---|
PubConsentSettings = {
purposes: [<array of Integer>],
legIntPurposes: [<array of Integer>],
stacks: [<array of Integer>],
legIntStacks: [<array of Integer>],
customPurposes: {
definition: [<array of {
id: Integer,
name: String,
description: String,
descriptionLegal: String}>],
purposes: [<array of Integer>],
legIntPurposes: [<array of Integer>]
}
}COPY |
PubConsentSettings.purposes
Array holding the IAB standard purposes used by the publisher that are subject to user consent. The number of standard purposes are in a total of 10 and can be checked in the official IAB TCF 2.0 documentation.
PubConsentSettings.legIntPurposes
Array holding the IAB standard purposes used by the publisher that are under the publisher's Legitimate Interest. These purposes are the same as the ones in the previous field, just the way of consenting to them changes. Please check the official IAB TCF 2.0 documentation for their names, definitions and objectives.
...
Array holding the IAB standard stacks used by the publisher that are subject to user consent. The stacks are sets of purposes that come together to fit a specific objective, making a better resume to the user than setting the purposes separately. The list of standard stacks is also in the official IAB TCF 2.0 documentation.
Stacks may be used to substitute information about two or more Purposes and/or Special Features. Purposes must not be included in more than one Stack, and must not be presented as part of a Stack and outside of Stacks at the same time. Conversely, any Stacks used must not include the same Purpose more than once, nor include Purposes presented separately from Stacks.
...
Array holding the IAB standard stacks used by the publisher that are under the publisher's Legitimate Interest. It works just like the PubConsentSettings.legIntPurposes
field , but now applied to stacks.
...
Array holding the custom purposes definitions. A custom purpose is defined by its id
, name
, description
and descriptionLegal
fields. These fields should be written in English. To provide additional translations to these purposes, the setTranslationFiles API function must be used to accomplish that.
name | type | description |
---|---|---|
id | integer | Each custom purpose must have a unique id, ideally ordered 1, 2, 3, ...… |
name | string | Name of the custom purpose that will be displayed as header in the purpose view |
description | string | Description of the custom purpose that will be shown as detail in the purpose view |
descriptionLegal | string | Legal description of the custom purpose that will be shown together with |
...
When enabled, AdConsent creates a new tab in the Customise choices
view, showing the publisher options to be consented or objected by the user.
After the user gives consent, this information is stored in AdConsent in the TCData
object, which means this information can be retrieved through the IAB standard api calls addEventListener
and getTCData
. For more information regarding the above object and functions usage, please refer to the IAB TCF 2.0 CMP API specification.
By enabling publisher consent, the tab Publisher Consent will be displayed:
...
You can see this example live on the demo page -> Customise choices
-> Publisher Consent
.
...