setCustomVendors
Functionality
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. This will only work when using the standalone version of AdConsent, otherwise, if AdConsent is served by AdEngine it’s required to check with the account manager for them to add the custom vendors to the list.
Syntax
function adconsent.gdpr()
argument name | type | optional | value | description |
---|---|---|---|---|
command | string |
|
|
|
parameter | object |
|
|
|
callback | function | ✔️ |
| The callback function that is called with the function call result. |
CustomVendorsList
CustomVendorsList = [
{
id: <vendor1_id>,
name: <vendor1_name>,
description: <vendor1_description>,
policyUrl: <vendor1_privacy_policy_url>
},
{
id: <vendor2_id>,
name: <vendor2_name>,
description: <vendor2_description>,
policyUrl: <vendor2_privacy_policy_url>
},
...
{
id: <vendorN_id>,
name: <vendorN_name>,
description: <vendorN_description>,
policyUrl: <vendorN_privacy_policy_url>
}
]
CustomVendorsList.id
The custom vendor id that has to be unique among all items in the list.
CustomVendorsList.name
String holding the vendor name.
CustomVendorsList.description
String holding a description for this vendor, e.g., what kind of business they conduct, their values, etc. It's not mandatory to have a vendor description (the field can be set as an empty string), but having more complete info for the vendor may raise the odds of having positive consent for it.
CustomVendorsList.policyUrl
String holding the vendor privacy policy link.
Description
When enabling a list of custom vendors, AdConsent adds these new vendors to the end of the non-IAB Vendors field under the Vendors
tab in the Customise choices
view, as shown in the picture below:
After the user gives consent, this can be checked for the custom vendors by using the function getCustomVendorsConsent and then set whatever behavior should be expected in case of having or not having consent for these vendors.
Scope
The function must be called before AdConsent shows the GUI. Calls, after AdConsent has shown the GUI, will be ignored.
Examples
Enable one custom vendor called Veritass
adconsent.gdpr('setCustomVendors', [
{
id: 1,
name: "Veritass",
description: "Veritass' mission is simply to provide you an example on how to create a custom vendor.",
policyUrl: "https://www.veritass.com/privacy_policy"
}
]);
Enable 3 custom vendors called Veritass, Bing, and YANIAB
adconsent.gdpr('setCustomVendors', [
{
id: 1,
name: "Veritass",
description: "Veritass' mission is simply to provide you an example on how to create a custom vendor.",
policyUrl: "https://www.veritass.com/privacy_policy"
},
{
id: 2,
name: "Bing",
description: "Bing helps you turn information into action, making it faster and easier to go from searching to doing.",
policyUrl: "https://about.ads.microsoft.com/en-us/resources/policies/microsoft-advertising-privacy-policy"
},
{
id: 3,
name: "YANIAB",
description: "Yet another non-IAB vendor.",
policyUrl: "https://yaniab.com/privacy-policy"
}
]);