The tcData
object contains encoded and unencoded values of the TC String, vendors, IAB purposes, etc... pertaining to an end-user's current browser session. The tcData
object can be accessed via the callback function of the [addEventListener]
command.
addtlConsent: "1~"
cmpId: 6
cmpStatus: "loaded"
cmpVersion: 1
eventStatus: "tcloaded"
gdprApplies: true
isServiceSpecific: true
listenerId: 0
publisher {
consents { 1: true, 2: true, 3: true, 4: true, 5: true, 6: true },
legitimateInterests { 1: true, 2: true, 3: true, 4: true, 5: true, 6: true, 7: true, 8: true, 9: true, 10: true, 11: true },
restrictions {
2: { 755:1 },
5: { 755:1 },
6: { 755:1 },
7: { 755:1 },
9: { 109:1, 755:1 },
10: { 755:1 },
11: { 109:1 }
}
}
publisherCC: "DE"
purpose {
consents { 1: true, 2: true, 3: true, 4: true, 5: true, 6: true, 7: true, 8: true, 9: true, 10: true, 11: true },
legitimateInterests { 1: false, 2: false, 3: false, 4: false, 5: false, 6: false, 7: true, 8: true, 9: true, 10: true, 11: true }
}
purposeOneTreatment: false
specialFeatureOptins: { 1: true, 2: true }
tcString: "CPUW9Z2PUW9Z2AGABCENCCCsAP_AAAPAAAYgF5wAwA2gHTAXmANsAEANoAwyACAvMVABAXmSgBABtAXmUgAgLzCQAQF5joAIC8wA.f4AAAHgAAAAA"
tcfPolicyVersion: 2
useNonStandardStacks: false
vendor {
consents { 1: true, 2: true, 3: true, 4: true, 5: true, 6: true, 7: true, 8: true, 9: true, 10: true },
legitimateInterests { 1: false, 2: false, 3: false, 4: false, 5: false, 6: false, 7: true, 8: true, 9: true, 10: true }
}
schema:
description: "tcData object"
type: object
properties:
addtlConsent:
type: string
description: "Google Additional Consent allows Google and the IAB Framework to pass end-user consent to Google Ad Technology Providers despite not adhering to the IAB TCF v2 Framework"
cmpId:
type: number
description: "CMP id assigned by the IAB"
cmpStatus:
type: string
description: "An CMP status that can be stub | loading | loaded | error"
cmpVersion:
type: number
description: "The version of the CMP API that is"
eventStatus:
type: string
description: "The event status which can be useractioncomplete | tcloaded | cmpuishown"
gdprApplies:
type: boolean
description: "true if GDPR applies to this implementation"
isServiceSpecific:
type: boolean
description: "true if using a service-specific or publisher-specific TC String | false if using a global scope TC String"
listenerId:
type: number
description: "Unique ID assigned by the CMP to the listener function registered via addEventListener"
publisher:
type: object
description: "Publisher consent purposes or legitimate interest purposes the end-user has agreed to or rejected."
properties:
consents:
type: object
description: "IAB purposes end-user has consented to. Schema is {IAB purpose Id : boolean if an end-user has consented to this purpose}"
legitimateInterests:
type: object
description: "IAB purposes that use legitimate interest and has been consented to by end-user. Schema is {IAB purpose Id : boolean if an end-user has consented to this purpose}"
restrictions:
type: object
description: "If an end-user accepts a vendor with the following legal basis- consent, legitimate interest or not allowed. Schema is {IAB purpose Id: {IAB vendor Id: 0 = CONSENT | 1 = LEGIMIATE INTEREST | 2 = NOT ALLOWED}}"
publisherCC:
type: string
description: "Country code of the country that determines the policy."
purpose:
type: object
description: "Consent purposes or legitimate interest purposes the end-user has agreed to or rejected."
properties:
consents:
type: object
description: "IAB purposes end-user has consented to. Schema is {IAB purpose Id : boolean if an end-user has consented to this purpose}"
legitimateInterests:
type: object
description: "IAB purposes that use legitimate interest and has been consented to by end-user. Schema is {IAB purpose Id : boolean if an end-user has consented to this purpose}"
purposeOneTreatment:
type: boolean
description: "Only exists on service-specific TC. `true` if Purpose 1 not disclosed at all. CMPs use PublisherCC to indicate the publisher's country of establishment to help determine whether the vendor requires Purpose 1 consent. `false` if there is no special Purpose 1 treatment status. Purpose 1 is disclosed normally (consent) as expected by TCF Policy."
specialFeatureOptins:
type: object
description: "IAB special features that end-user has consented to. Schema is {IAB Special Feature ID: boolean}"
tcString:
type: string
description: "base64 url-encoded consent string"
tcfPolicyVersion:
type: number
description: "Number of the supported TCF version"
useNonStandardStacks:
type: boolean
description: "If the CMP is using publisher-customized stack descriptions"
vendor:
type: object
description: "Vendors with consent or legitimate interest purposes the end-user has agreed to or rejected."
properties:
consents:
type: object
description: "Vendors that use consent as a legal basis that was accepted by the end-user. Schema is {IAB purpose Id : boolean if an end-user has consented to this purpose}"
legitimateInterests:
description: "Vendors that use legitimate interest as a legal basis that was accepted by the end-user. Schema is {IAB purpose Id : boolean if an end-user has accepted this purpose}"
Click here for additional information on the
tcData
object