IAB TCF 2.2
Overview
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.
TCF v2.2
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.
OneTrust Configuration guidelines
OneTrust helps you to configure the IAB TCF version for your application by building the IAB template in OneTrust’s environment.
Accessing TC Data
Once user gives consent, OneTrust retrieve the TC Data and save it to the iOS’s default UserDefaults based on the IAB version your application is compliant with. Your application can access the data by fetching it using following keys from default UserDefaults.
The TC data values can be retrieved from the application Preferences by key name.
IAB TCF Keys
Preferences Key |
---|
IABTCF_CmpSdkID |
IABTCF_CmpSdkVersion |
IABTCF_gdprApplies |
IABTCF_PolicyVersion |
IABTCF_PurposeOneTreatment |
IABTCF_UseNonStandardStacks |
IABTCF_SpecialFeaturesOptIns |
IABTCF_PublisherCC |
IABTCF_PublisherConsent |
IABTCF_PublisherLegitimateInterests |
IABTCF_PublisherCustomPurposesConsents |
IABTCF_PublisherCustomPurposesLegitimateInterests |
IABTCF_PurposeConsents |
IABTCF_PurposeLegitimateInterests |
IABTCF_TCString |
IABTCF_VendorConsents |
IABTCF_VendorLegitimateInterests |
IABTCF_PublisherRestrictions |
Sample Code Snippet
//C#
var IABTCF_CmpSdkID = Preferences.Get("IABTCF_CmpSdkID","");
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. To persist the updated values, applications will have to call 'saveConsentValue()' method explicitly.
// C#
CMPSDK.sharedInstance.updateConsentValueForVendor(vendorID, uiControlState);
CMPSDK.sharedInstance.saveChanges()
Update Vendor Legitimate Interest
This method will allow your application to update legitimate interest value for 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. To persist the updated values, applications will have to call 'saveConsentValue()' method explicitly.
If Legitimate Interests toggles are configured to be disabled for an application, then value will not get updated.
// C#
CMPSDK.sharedInstance.updateConsentValueForVendorLegitimateInterest(string vendorId, bool consentValue);
Update Purpose Legitimate Interest
This method will allow your application to update legitimate interest value for an IAB purpose. Applications will have to pass a valid String value group identifier along with a boolean state.
Calling this method will only update the local state of legitimate interest. To persist the updated values, applications will have to call 'saveConsentValue()' method explicitly.
If Legitimate Interests toggles are configured to be disabled for an application, then value will not get updated.
// C#
CMPSDK.sharedInstance.updateConsentValueForCategoryLegitimateInterest(string categoryId, bool consentValue);
Get locally Saved Purpose Consent
This method will allow your application to retrieve local consent value for an IAB purpose / category. Applications will have to pass a valid String value group identifier which is obtained from group dictionary returned by SDK public methods.
Calling this method will get the local state of consent if values are changed with updatePurposeConsent
method. If values are not changed, this will retrieve last stored value.
// C#
CMPSDK.sharedInstance.updateConsentValueForCategory(string categoryId, bool consentValue, bool autoUpdateParentChildRelationship = true);
Get locally Saved Purpose Legitimate Interest
This method will allow your application to retrieve updated legitimate interest value for an IAB purpose. Applications will have to pass a valid String value group identifier which is obtained from group dictionary returned by SDK public methods.
Calling this method will get the local state of legitimate interest if values are changed with updatePurposeLegitInterest
method. If values are not changed, this will retrieve last stored value.
// C#
CMPSDK.sharedInstance.getConsentStatusForCategoryLegitimateInterest(string categoryId);
Returns the following Integer values:
- 1 = Consent Given.
- 0 = Consent Not Given.
- -1 = Invalid Group Id passed / Group Id does not have a Legitimate interest configured for it.
Updated 9 months ago