IAB TCF 2.2
Overview
TCF v2.2 enables consumers to grant or withhold consent and also exercise their ‘right to object’ to data being processed. Consumers also gain more control over whether and how vendors may use certain features of data processing, for example, the use of precise geolocation.
Publishers employing TCF v2.2 gain greater control and flexibility with respect to how they integrate and collaborate with their technology partners. New publisher functionality allows them to restrict the purposes for which personal data is processed by vendors on a publisher’s website on a per-vendor basis.
What Is the Transparency & Consent Framework (TCF)?
The TCF’s simple objective is to help all parties in the digital advertising chain ensure that they comply with the EU’s GDPR and ePrivacy Directive when processing personal data or accessing and/or storing information on a user’s device, such as cookies, advertising identifiers, device identifiers and other tracking technologies.
OneTrust configuration guidelines
We help you configure the IAB TCF version for your application with the IAB template in the OneTrust’s platform.
Accessing the IAB TC String
Per IAB Standards, the IAB TC String is saved to local storage under the IABTCF_TCString key.
iabValue = “”
Key = “IABTCF_TCString”
regSection = createObject(“roRegistrySection”, “TCF”)
if regSection.exists(key) then iabValue = regSection.read(Key)
print iabValue
Get Vendor Consent
This method returns the consent value for a specific vendor.
IAB Vendor
// example for getting IAB vendor consent value
m.global.OTsdk.callFunc("getConsentStatusForVendorId", "iab", "8")
Google Vendor
// example for getting Google vendor consent value
m.global.OTsdk.callFunc("getConsentStatusForVendorId", "google", "8")
Get Vendor Count by Purpose
This method returns the vendor count for IAB purposes as required by IAB TCF 2.2. Applications will have to pass in the desired purpose ID or tack number.
//Purposes
m.global.OTsdk.callFunc("getVendorCount", " IAB2V2_1")
//Stacks
m.global.OTsdk.callFunc("getVendorCount", " V2STACK1")
//Features
m.global.OTsdk.callFunc("getVendorCount", " IFE2V2_1")
//Special Features
m.global.OTsdk.callFunc("getVendorCount", " ISF2V2_1")
//Special Purposes
m.global.OTsdk.callFunc("getVendorCount", " ISP2V2_1")
Note: we need to download the preference center data at least once to get the vendor count either visiting to the preference centre page or using the showPreferenceCenterUI public method
Values returned
This method will return the vendor count as an integer value. Here are the possible outcomes:
- Individual categories will have active IAB vendors count returned.
- Parent categories will have aggregated active IAB vendors count returned.
- Empty category IDs will return
-1
as the vendor count.
Get Total Vendor Count
This method allows you to return the total number of vendors your app is using. This can be useful in instances where you are building your own banner and need to include the vendor count as required by IAB.
vendorCount = 0
vendorData = m.global.OTsdk.callFunc("getVendorListData")
if vendorData <> invalid and vendorData .iab2V2Vendors <> invalid and vendorData.iab2V2Vendors.vendors <> invalid then vendorCount = vendorData.iab2V2Vendors.vendors.count()
print vendorCount
Update Vendor Consent
This method will allow your application to update consent value for vendors. Applications will have to pass a valid string value vendor ID along with a boolean state. Calling this method will only update the local state of consent. For the updated values to persist, applications will have to call the saveConsent(interactionType) method explicitly.
m.global.OTsdk.callFunc("updateVendorConsent", "92", true)
Update Vendor Legitimate Interest
This method will allow your application to update the legitimate interest value for an active IAB vendor. Applications will have to pass a valid String value vendor ID along with a boolean state. Calling this method will only update the local state of legitimate interest. For the updated values to persist, applications will have to call the saveConsent(interactionType) method explicitly. If legitimate interest settings are disabled for an application, then the value will not get updated.
m.global.OTsdk.callFunc("updateVendorLegitInterest", "92", true)
Update Purpose Consent
This method will allow your application to update the consent value for a purpose. Applications will have to pass a valid String value group ID along with a boolean state. Calling this method will only update the local state of consent. For the updated values to persist, applications will have to call the saveConsent(interactionType) method explicitly.
m.global.OTsdk.callFunc("updatePurposeConsent", "IAB2V2_2", true)
Update Purpose Legitimate Interest
This method will allow your application to update the legitimate interest value for an IAB purpose. Applications will have to pass a valid String value group ID along with a boolean state. Calling this method will only update the local stage of legitimate interest. For the updated values to persist, applications will have to call the saveConsent(interactionType) method explicitly. If legitimate interest settings are disabled for an application, then the value will not get updated.
m.global.OTsdk.callFunc("updatePurposeLegitInterest", "IAB2V2_2", true)
Updated 4 days ago