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 + String +

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"

+ diff --git a/Core/Consent String Specification.md b/Core/Consent String Specification.md index 014ab83..d0c245c 100644 --- a/Core/Consent String Specification.md +++ b/Core/Consent String Specification.md @@ -594,68 +594,59 @@ In order to be backward compatible with IAB Europe’s TC String and US Privacy A discrete section is encoded according to that specific section’s needs. This means today’s implementations that read and adapt to TCF v2.0 signals or US Privacy signals don't need to change their logic for a given discrete section of the string, as long as the implementation is aware of where the discrete section is. - New sections should follow the guidelines below. Guidelines like these help developers quickly adopt new sections and allow for parsing new sections without the need to reinvent new data types. - The possible data types are: - - - + - - - - - + - - - + @@ -682,7 +673,6 @@ The possible data types are:
  • Bits = 000000000010 0 0000000000000011 1 0000000000000101 0000000000001000
  • Note: items may not be in sorted order. - @@ -709,7 +699,6 @@ Note: items may not be in sorted order.
  • Bits = 000000000010 0 0011 1 011 0011
  • Note: items MUST be in sorted order.. - @@ -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. + + + + + + + + + + + +
    Data Type Encoding JS API outputDescription 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 NumberConsists 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)
    Range (Fibonacci)
    OptimizedRange
    ArrayOfRangesvariable[{'key':number, 'type':number, 'ids':Array of number}, {...}, ...]Consists of a variable amount of fields: +

    • First field is always of type Int(12). The value indicates the number of records to follow.
    • +
    • Each entry consists of three datatypes:
    • +
      • key - Int(6)
      • +
      • type - Int(2)
      • +
      • ids - OptimizedIntRange (uses Range(Int) for range of IDs, see OptimizedIntRange data type above for more details)
    +

    Note: ArrayOfRanges is used for downwards compatibility only.

    N-ArrayOfRanges(X,Y)variable[{'key':number, 'type':number, 'ids':Array of number}, {...}, ...]Consists of a variable amount of fields: +

    • First field is always of type Int(12). The value indicates the number of records to follow.
    • +
    • Each record consists of three datatypes:
    • +
      • key - Int(X) Where X is given by the field definition within the corresponding specification.
      • +
      • type - Int(Y) Where Y is given by the field definition within the corresponding specification.
      • +
      • ids - OptimizedRange (uses Fibonacci coding for range of IDs, see OptimizedRange data type above for more details)
    diff --git a/Core/README.md b/Core/README.md index 0ba679b..f8098dd 100644 --- a/Core/README.md +++ b/Core/README.md @@ -1,7 +1,7 @@ # Global Privacy Platform -Hosted in this repository are the technical specifications for the IAB Global Privacy Platform (GPP). The relevant specifications are: +Hosted in this repository are the technical specifications for the IAB Global Privacy Platform (GPP). The relevant specifications: - Global Privacy Platform String - Consent Management API diff --git a/Sections/Canada/GPPExtension: IAB Canada TCF.md b/Sections/Canada/GPPExtension: IAB Canada TCF.md index 13beaff..dcf9acf 100644 --- a/Sections/Canada/GPPExtension: IAB Canada TCF.md +++ b/Sections/Canada/GPPExtension: IAB Canada TCF.md @@ -18,28 +18,22 @@ Client side API prefix tcfcav1 -The IAB TCF Canada is registered with client side API prefix “tcfcav1” in the GPP Client Side API. +The IAB TCF Canada is registered with client side API prefix "tcfcav1" in the GPP Client Side API.

    Section encoding

    -

    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. 

    -

    Core segment

    -

    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.

    +

    Core sub-section

    +

    The core sub-section must always be present. It consists of the following fields:

    - - - + + + @@ -76,72 +70,108 @@ - + - + - + - + - + - + - + - + - + - + - + - + - - + + + + + +
    -

    Field name

    -
    -

    GPP Field Type

    -
    -

    Description

    -
    Field nameGPP Field TypeDescription
    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 vendorListVersionVersion 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 Boolean1 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 +

    0 IAB standard stacks were used

    +

    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: +

    1 Opted in (express consent)

    +

    0 Not opted in (no express consent)

    +

    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: +

    1 Express Consent

    +

    0 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 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: +

    1 implied consent established

    +

    0 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.

    VendorExpressConsent OptimizedRangeList 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 OptimizedRangeList 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.
    PubRestrictionsN-ArrayOfRanges (6,2)

    Key: The Vendor’s declared Purpose ID that the Publisher has indicated they are overriding.

    +

    Types:

    +

    0 Purpose Flatly Not Allowed by Publisher (regardless of Vendor declarations)

    +

    1 Require Express Consent (if Vendor has declared the Purpose IDs legal basis as Implied Consent and flexible)

    +

    2 Require Implied Consent (if Vendor has declared the Purpose IDs legal basis as Express Consent and flexible)

    +

    3 UNDEFINED (not used)

    +

    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.

    -

    Publisher Purposes Segment

    -

    The publisher purposes segment is appended to the core segment by using the “.” (dot) delimiter. The segment is optional. The segment fields are:

    +

    Disclosed Vendors Sub-section

    +

    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 nameGPP Field TypeDescription
    SubsectionTypeInt(3)Always set to 1
    DisclosedVendorsOptimizedRangeList of Vendor IDs that were disclosed in a CMP UI to the user
    +

    Publisher Purposes Sub-section

    +

    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:

    - - - + + + - + @@ -175,7 +205,8 @@

    Client side API

    Key Names

    -

    In the mobile or CTV context, the key names to be used in GPP are listed below. 

    +

    In the mobile or CTV context, the key names must follow the the naming conventions defined in the In-App Key Names portion of the GPP API Specification. The in-app values should also follow what is defined in the In-App Key Names portion of the specification and be transformed accordingly (for example, a field that has a data type of OptimizedRange will be converted to a string with an underscore used to separate each value).

    +

    Below are some examples of the key names for TCF Canada.

    -

    Field name

    -
    -

    GPP Field Type

    -
    -

    Description

    -
    Field nameGPP Field TypeDescription
    SegmentTypeSubsectionType Int(3) Always set to 3.
    @@ -184,60 +215,37 @@ - - - - - - - - - - - - - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - - - - - - - - - - - - - - + +
    Value(s)
    IABGPP_TCFCA_CmpSdkIDNumber: The unsigned integer ID of CMP SDK
    IABGPP_TCFCA_CmpSdkVersionNumber: The unsigned integer version number of CMP SDK
    IABGPP_TCFCA_PolicyVersionNumber: The unsigned integer representing the version of the TCF that these consents adhere to.
    IABGPP_TCFCA_UseNonStandardStacksNumber:1 - CMP used a non-standard stack0 - CMP did not use a non-standard stackIABGPP_TCFCAV1_CmpIdNumber: The unsigned integer ID of CMP SDK
    IABGPP_5_TCStringString: Full encoded TC stringIABGPP_TCFCAV1_CmpVersionNumber: The unsigned integer version number of CMP SDK
    IABGPP_TCFCA_VendorExpressConsentsBinary 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 1IABGPP_TCFCAV1_TcfPolicyVersionNumber: The unsigned integer representing the version of the TCF that these consents adhere to.
    IABGPP_TCFCA_VendorImpliedConsentsBinary 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 1IABGPP_TCFCAV1_UseNonStandardStacksNumber: 1 - CMP used a non-standard stack; 0 - CMP did not use a non-standard stack
    IABGPP_TCFCA_PurposeExpressConsentsBinary 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 1IABGPP_5_TCStringString: Full encoded TC string
    IABGPP_TCFCA_PurposeImpliedConsentsBinary 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 1IABGPP_TCFCAV1_VendorExpressConsentsString: 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_SpecialFeaturesExpressConsentsBinary 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 1IABGPP_TCFCAV1_PubRestrictionsString: 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_PublisherExpressConsentBinary 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_PublisherImpliedConsentBinary 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_PublisherCustomPurposesExpressConsentsBinary 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_PublisherCustomPurposesImpliedConsentsBinary 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 1IABGPP_TCFCAV1_PublisherExpressConsentBinary 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