...
The function getCustomVendorsConsent
is used to retrieve consent for a list of custom vendors defined with setCustomVendors.
In order to retrieve consent for a list of custom vendors defined by the publisher (please check the setCustomVendors configuration function), the function getCustomVendorsConsent
must be used. AdConsent will then return a structure holding a set of key-value pairs where the key is the vendor ID and the value is a boolean stating whether or not that vendor has consent. This feature applies to GDPR only.
...
Code Block |
---|
ConsentStructure = {
"vendor1ID": true | false,
"vendor2ID": true | false,
...
"vendorNID": true | false
}COPY |
Description
When working with GDPR users, a publisher may need to get consent for other vendors other than the IAB compliant ones, e.g. when using some special analytics tool or other product from a company that is not registered in the IAB Global Vendor List. The function setCustomVendors
is used to configure AdConsent with an additional list of custom vendors to get consent for them.
...
The callback will only be called after AdConsent reads or gets consent from the user and the user is in the GDPR region. Outside of GDPR, the callback will not be called.
...
Check consent given for custom vendor with id 5
This examples example assumes that the user is in the GDPR consent region.
...
Same example as above, but with a full integration with the different possibilities of consent zones
This example works world-wideworldwide, taking all consent regions into consideration.
...