diff --git a/Core/CMP API Specification.md b/Core/CMP API Specification.md index c6234d7..ee93dd6 100644 --- a/Core/CMP API Specification.md +++ b/Core/CMP API Specification.md @@ -813,6 +813,12 @@ Valid data types are Integer and String. All other data types such as Boolean, D +
ArrayOfRanges
The key name will be combined by a static name and the key of the record. If the input data contains multiple records, the CMP SDK will create multiple keys, each with a combination of name and key.
+The value consists of a sequence of "id:type"-pairs separated by underscore. E.g. "3:0_5:1_6:1_7:2_12:0"
Data Type | Encoding | JS API output | -Description | -+ | Description |
Boolean |
1 bit | true|false | 0=true, 1=false | -||
Integer (fixed length of x) |
x bit | Number | A fixed amount of bit representing an integer. Usual lengths are 3, 6 or 12 bit. Example: int(6) “000101” represents the number 5 |
- ||
Integer (Fibonacci) |
Variable Length | Number | Integer encoded using Fibonacci encoding See “About Fibonacci Encoding” for more detail |
- ||
String (fixed length of x) (including country codes) |
x*6 bit | String | A fixed amount of bit representing a string. The character’s ASCII integer ID is subtracted by 65 and encoded into an int(6). Example: int(6) “101010” represents integer 47 + 65 = char “h” |
- - | |
Datetime |
36 bit | Date | A datetime is encoded as a 36 bit integer representing the 1/10th seconds since January 01 1970 00:00:00 UTC. Example JavaScript representation: Math.round((new Date()).getTime()/100) |
- ||
Bitfield (fixed length of x) |
x bit | Array of Number | A fixed amount of bit. Usually each bit represents a boolean for an ID within a group where the first bit corresponds to true/false for ID 1, the second bit corresponds to true/false for ID 2 and so on. | -||
N-bitfield (Variable length Bitfield) |
variable | Array of Number | -Consists of two datapoints: a fixed length Integer(16) that denotes the length and a bitfield with that specific length. Please note: Although the API reads/writes to fields (length + bitfield), it will only output the IDs from the bitfield via JS APIs. |
+ Consists of two datapoints: a fixed length Integer(16) that denotes the length and a bitfield with that specific length.
+ Please note: Although the API reads/writes to fields (length + bitfield), it will only output the IDs from the bitfield via JS APIs. |
|
Range (Int) |
@@ -682,7 +673,6 @@ The possible data types are:
|||||
Range (Fibonacci) |
@@ -709,7 +699,6 @@ Note: items may not be in sorted order.
|||||
OptimizedRange |
@@ -736,6 +725,29 @@ Note: items MUST be in sorted order..
Note: This data type is used for downward compatibility only. OptimizedRange is the recommended data type to be used moving forward.
|||||
ArrayOfRanges |
+ variable | +[{'key':number, 'type':number, 'ids':Array of number}, {...}, ...] | +Consists of a variable amount of fields:
+
Note: |
+ ||
N-ArrayOfRanges(X,Y) |
+ variable | +[{'key':number, 'type':number, 'ids':Array of number}, {...}, ...] | +Consists of a variable amount of fields:
+
|
+
The IAB TCF Canada will be using the following encoding for the GPP section. If already familiar with the IAB TCF Europe encoding, you may view the detailed differences between the two on the IAB Europe TCF with IAB Canada TCF Signal Definition documentation.
-The core segment must always be present. It consists of the following fields:
+The IAB TCF Canada will be using the following encoding for the GPP section. If already familiar with the IAB TCF Europe encoding, you may view the detailed differences between the two on the IAB Europe TCF with IAB Canada TCF Signal Definition documentation.
+The core sub-section must always be present. It consists of the following fields:
- Field name - |
-
- GPP Field Type - |
-
- Description - |
+Field name | +GPP Field Type | +Description |
---|---|---|---|---|---|
ConsentLanguage | String(2) | -Two-letterISO 639-1 language code in which the CMP UI was presented | +Two-letter ISO 639-1 language code in which the CMP UI was presented | ||
VendorListVersion | Int(12) | -Version of theGVL used to create this TC String. Number corresponds toGVL vendorListVersion | +Version of the GVL used to create this TC String. Number corresponds to GVL vendorListVersion | ||
TcfPolicyVersion | Int(6) | -Version of policy used withinGVL. From the corresponding field in theGVL that was used for obtaining consent. A new policy version invalidates existing strings and requires CMPs to re-establish transparency and consent from users. | +Version of policy used within GVL. From the corresponding field in the GVL that was used for obtaining consent. A new policy version invalidates existing strings and requires CMPs to re-establish transparency and consent from users. | ||
UseNonStandardStacks | Boolean | -1 CMP used non-IAB standard stacks during consent gathering0 IAB standard stacks were used Setting this to 1 means that a publisher-run CMP – that is still IAB Europe registered – is using customized Stack descriptions and not the standard stack descriptions defined in thePolicies (Appendix A section E). A CMP that services multiple publishers sets this value to 0. | +1 CMP used non-IAB standard stacks during consent gathering
+
Setting this to 1 means that a publisher-run CMP - that is still IAB Canada registered - is using customized Stack descriptions and not the standard stack descriptions defined in the Policies (Appendix A section E). A CMP that services multiple publishers sets this value to 0. |
||
SpecialFeatureExpressConsent | +SpecialFeatureExpressConsent | Bitfield(12) | -One bit for each Special Feature:1 Opted in (express consent)0 Not opted in (no express consent) The TCFPolicies designates certain Features as “special” which means a CMP must afford the user a means to expressly consent to their use. These “Special Features” are published and numerically identified in theGlobal Vendor List separately from normal Features. | +One bit for each Special Feature:
+
The TCF Policies designates certain Features as "special" which means a CMP must afford the user a means to expressly consent to their use. These "Special Features" are published and numerically identified in the Global Vendor List separately from normal Features. |
|
PurposesExpressConsent | +PurposesExpressConsent | Bitfield(24) | -One bit for each Purpose:1 Express Consent0 No Express Consent The user’s consent value for each Purpose established on the legal basis of consent.The Purposes are numerically identified and published in theGlobal Vendor List. From left to right, Purpose 1 maps to the 0th bit, purpose 24 maps to the bit at index 23. Special Purposes are a different ID space and not included in this field. Note that purpose 1 bit is not used in TCF Canada. | +One bit for each Purpose:
+
The user's consent value for each Purpose established on the legal basis of consent.The Purposes are numerically identified and published in the Global Vendor List. From left to right, Purpose 1 maps to the 0th bit, purpose 24 maps to the bit at index 23. Special Purposes are a different ID space and not included in this field. Note that purpose 1 bit is not used in TCF Canada. |
|
PurposesImpliedConsent | +PurposesImpliedConsent | Bitfield(24) | -One bit for each Purpose:1 implied consent established0 implied consent was NOT established or it was established but user exercised an Objection to the Purpose The Purpose’s transparency requirements are met for each Purpose on the legal basis of implied consent and the user has not exercised an Objection to that Purpose.By default or if the user has exercised an Objection to a Purpose, the corresponding bit for that Purpose is set to 0. From left to right, Purpose 1 maps to the 0th bit, purpose 24 maps to the bit at index 23. Special Purposes are a different ID space and not included in this field. Note that purpose 1 bit is not used in TCF Canada. | +One bit for each Purpose:
+
The Purpose's transparency requirements are met for each Purpose on the legal basis of implied consent and the user has not exercised an Objection to that Purpose. +By default or if the user has exercised an Objection to a Purpose, the corresponding bit for that Purpose is set to 0. From left to right, Purpose 1 maps to the 0th bit, purpose 24 maps to the bit at index 23. Special Purposes are a different ID space and not included in this field. Note that purpose 1 bit is not used in TCF Canada. |
|
VendorExpressConsent | OptimizedRange | -List of Vendor IDs that indicate Consent for these vendors. Please note that the field is composed of several fields in order to store the data in GPP string format. The client side API format is array of int. | +List of Vendor IDs that indicate Consent for these vendors. Please note that the field is composed of several fields in order to store the data in GPP string format. The client side API format is array of int. | ||
VendorImpliedConsent | +VendorImpliedConsent | OptimizedRange | -List of Vendor IDs for which Implied consent is established and the user did not exercise an Objection.. Please note that the field is composed of several fields in order to store the data in GPP string format. The client side API format is array of int. | -List of Vendor IDs for which Implied consent is established and the user did not exercise an Objection.. Please note that the field is composed of several fields in order to store the data in GPP string format. The client side API format is array of int. | + +|
PubRestrictions | +N-ArrayOfRanges (6,2) | +Key: The Vendor’s declared Purpose ID that the Publisher has indicated they are overriding.
+ Types: +
ids - A single or range of Vendor ID(s) who the publisher has designated as restricted under the purpose id. + |
Note: Fields marked with * are only included in the string encoded version of the GPP segment but will not be returned by the client side API. Instead the client side API will return an array of int with the corresponding IDs.
-The publisher purposes segment is appended to the core segment by using the “.” (dot) delimiter. The segment is optional. The segment fields are:
+The disclosed vendors sub-section is appended to the core sub-section by using the “.” (dot) delimiter. This is an optional string sub-section. It may be used by a CMP while storing strings, but must not be included in the string when returned by the CMP API. The sub-section fields are:
+Field name | +GPP Field Type | +Description | +
---|---|---|
SubsectionType | +Int(3) | +Always set to 1 | +
DisclosedVendors | +OptimizedRange | +List of Vendor IDs that were disclosed in a CMP UI to the user | +
The publisher purposes sub-section is appended to the core sub-section by using the “.” (dot) delimiter. The sub-section is optional. The sub-section fields are:
- Field name - |
-
- GPP Field Type - |
-
- Description - |
+Field name | +GPP Field Type | +Description |
---|---|---|---|---|---|
SegmentType | +SubsectionType | Int(3) | Always set to 3. |
Value(s) | |||
IABGPP_TCFCA_CmpSdkID | -Number: The unsigned integer ID of CMP SDK | -||
IABGPP_TCFCA_CmpSdkVersion | -Number: The unsigned integer version number of CMP SDK | -||
IABGPP_TCFCA_PolicyVersion | -Number: The unsigned integer representing the version of the TCF that these consents adhere to. | -||
IABGPP_TCFCA_UseNonStandardStacks | -Number:1 - CMP used a non-standard stack0 - CMP did not use a non-standard stack | +IABGPP_TCFCAV1_CmpId |
+Number: The unsigned integer ID of CMP SDK |
IABGPP_5_TCString | -String: Full encoded TC string | +IABGPP_TCFCAV1_CmpVersion |
+Number: The unsigned integer version number of CMP SDK |
IABGPP_TCFCA_VendorExpressConsents | -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 | +IABGPP_TCFCAV1_TcfPolicyVersion |
+Number: The unsigned integer representing the version of the TCF that these consents adhere to. |
IABGPP_TCFCA_VendorImpliedConsents | -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 | +IABGPP_TCFCAV1_UseNonStandardStacks |
+Number: 1 - CMP used a non-standard stack; 0 - CMP did not use a non-standard stack |
IABGPP_TCFCA_PurposeExpressConsents | -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 legitimate interest established true for purpose ID 1 | +IABGPP_5_TCString |
+String: Full encoded TC string |
IABGPP_TCFCA_PurposeImpliedConsents | -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 | +IABGPP_TCFCAV1_VendorExpressConsents |
+String: Per the field description above, this is an array of integers that represent the list of Vendor IDs that indicate consent for these vendors. Since the data type for this field is OptimizedRange, the value for this should be a string (e.g. “1_4_99”). See In-App Key Names section of the GPP API Specification for more details. |
IABGPP_TCFCA_SpecialFeaturesExpressConsents | -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 | +IABGPP_TCFCAV1_PubRestrictions |
+String: Per the field description above, this is a sequence of id:type pairs representing the Vendor IDs who the publisher has designated as restricted under the purpose id and the type of restriction.
+
+ Since the data type for this field is N-ArrayofRanges, the value for this should be a string (e.g. "3:0_5:1_6:1_7:2_12:0"). See In-App Key Names section of the GPP API Specification for more details. |
IABGPP_TCFCA_PublisherExpressConsent | -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 Global Vendor List Purposes; false and true respectively. eg. '1' at index 0 is consent true for purpose ID 1 | -||
IABGPP_TCFCA_PublisherImpliedConsent | -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 Global Vendor List Purposes; false and true respectively. eg. '1' at index 0 is legitimate interest established true for purpose ID 1 | -||
IABGPP_TCFCA_PublisherCustomPurposesExpressConsents | -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 | -||
IABGPP_TCFCA_PublisherCustomPurposesImpliedConsents | -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 | +IABGPP_TCFCAV1_PublisherExpressConsent |
+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 Global Vendor List Purposes; false and true respectively. eg. '1' at index 0 is consent true for purpose ID 1 |