Consents to TCF partners
How to interact with SDK from 3rd party Vendors
Last updated
Was this helpful?
How to interact with SDK from 3rd party Vendors
Last updated
Was this helpful?
One Consent provide a native consent flow integration for 3rd Party Vendor that supports IAB TCF 2.0. A full list of the vendor partners of IAB TCF can be consulted here:
Once you install One Consent SDK consents will be saved in a shared memory preference.
For APP developers, CMP stored preferences can be consulted with the standard methods provided from IAB. Full documentation is available on .
(iOS) or (Android) are used to store pre-parsed TC data as well as the TC string by a CMP SDK, allowing:
Vendors to easily access TC data
TC data to persist across app sessions
TC data to be portable between CMPs to provide flexibility for a publisher to exchange one CMP SDK for another
Vendors within an app to avoid code duplication by not being required to include a TC string decoder while still enabling all typical use cases
Note: If a publisher chooses to remove a CMP SDK from their app they are responsible for clearing all IABTCF_*
vestigial values for users so that vendors do not continue to use the TC data therein.
(iOS) or (Android) values
IABTCF_CmpSdkID
Number
: The unsigned integer ID of CMP SDK
IABTCF_CmpSdkVersion
Number
: The unsigned integer version number of CMP SDK
IABTCF_PolicyVersion
Number
: The unsigned integer representing the version of the TCF that these consents adhere to.
IABTCF_gdprApplies
Number
:
1
GDPR applies in current context
0
- GDPR does not apply in current context
Unset - undetermined (default before initialization)
IABTCF_PublisherCC
IABTCF_PurposeOneTreatment
Number
:
0
- no special treatment of purpose one
1
- purpose one not disclosed
Unset default - 0
Vendors can use this value to determine whether consent for purpose one is required.
IABTCF_UseNonStandardStacks
Number
:
1
- CMP used a non-standard stack
0
- CMP did not use a non-standard stack
IABTCF_TCString
String
: Full encoded TC string
IABTCF_VendorConsents
Binary String
: The '0'
or '1'
at position n β where n's indexing begins at 0
β indicates the consent status for Vendor ID n+1; false
and true
respectively. eg. '1'
at index 0
is consent true
for vendor ID 1
IABTCF_VendorLegitimateInterests
Binary String
: The '0'
or '1'
at position n β where n's indexing begins at 0
β indicates the legitimate interest status for Vendor ID n+1; false
and true
respectively. eg. '1'
at index 0
is legitimate interest established true
for vendor ID 1
IABTCF_PurposeConsents
Binary String
: The '0'
or '1'
at position n β where n's indexing begins at 0
β indicates the consent status for purpose ID n+1; false
and true
respectively. eg. '1'
at index 0
is consent true
for purpose ID 1
IABTCF_PurposeLegitimateInterests
Binary String
: The '0'
or '1'
at position n β where n's indexing begins at 0
β indicates the legitimate interest status for purpose ID n+1; false
and true
respectively. eg. '1'
at index 0
is legitimate interest established true
for purpose ID 1
IABTCF_SpecialFeaturesOptIns
Binary String
: The '0'
or '1'
at position n β where n's indexing begins at 0
β indicates the opt-in status for special feature ID n+1; false
and true
respectively. eg. '1'
at index 0
is opt-in true
for special feature ID 1
IABTCF_PublisherRestrictions{ID}
String ['0','1', or '2']
: The value at position n β where n's indexing begins at 0
β indicates the publisher restriction type (0-2) for vendor n+1; (see Publisher Restrictions Types). eg. '2'
at index 0
is restrictionType 2
for vendor ID 1
. {ID}
refers to the purpose ID.
IABTCF_PublisherConsent
IABTCF_PublisherLegitimateInterests
IABTCF_PublisherCustomPurposesConsents
Binary String
: The '0'
or '1'
at position n β where n's indexing begins at 0
β indicates the purpose consent status for the publisher's custom purpose ID n+1 for the publisher; false
and true
respectively. eg. '1'
at index 0
is consent true
for custom purpose ID 1
IABTCF_PublisherCustomPurposesLegitimateInterests
Binary String
: The '0'
or '1'
at position n β where n's indexing begins at 0
β indicates the purpose legitimate interest status for the publisher's custom purpose ID n+1 for the publisher; false
and true
respectively. eg. '1'
at index 0
is legitimate interest established true
for custom purpose ID 1
On Android OS, the TC data and TC string shall be stored in the default Shared Preferences for the application context. This can be accessed using the getDefaultSharedPreferences
method from the android.preference.PreferenceManager
class using the application context.
Example:
The TC data values can be retrieved from the application Shared Preferences by key name using the get
methods on the android.content.SharedPreferences
class. For the purposes of accessing TC data, only two methods should be necessary: getString(String key, String defValue)
for String
values and getInt(String key, int defValue)
for integer
s and integer
representations of Boolean
values.
Example:
A callback can be registered to update settings when a preference is changed using the registerOnSharedPreferenceChangeListener
method for the android.content.SharedPreferences
class.
Example:
see the section for more
String
: β Default: AA
(unknown)
Binary String
: The '0'
or '1'
at position n β where n's indexing begins at 0
β indicates the purpose consent status for purpose ID n+1 for the publisher as they correspond to the Purposes; false
and true
respectively. eg. '1'
at index 0
is consent true
for purpose ID 1
Binary String
: The '0'
or '1'
at position n β where n's indexing begins at 0
β indicates the purpose legitimate interest status for purpose ID n+1 for the publisher as they correspond to the Purposes; false
and true
respectively. eg. '1'
at index 0
is legitimate interest established true
for purpose ID 1
On both Android OS and iOS, the vendor can get notified when the values of the shared keys change. See and .
Note: The preference manager does not currently store a strong reference to the listener. If you do not store a strong reference, the listener will be susceptible to garbage collection. External guidance such as this may provide more information on listening for preference changes.