Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
minLevel1
maxLevel7

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.

Syntax

function adconsent.gdpr()

argument name

type

optional

value

description

command

string

'setCustomVendors'

parameter

object

CustomVendorsList

CustomVendorsList list holding the custom vendors properties.

callback

function

✔️

function(message:JSON, success:boolean)

The callback function that is called with the function call result.

CustomVendorsList

Code Block
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 a more complete info for the vendor may rise the odds to have a 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 setting whatever behaviour 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

Code Block
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

Code Block
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"
  }
]);