Info
Content

Compressed Custom IDs Format

In order to save storage and cookie size, the CMP will store the consent information in a propriatary format. This format is based on the bit-encoding logic of the IAB TCF Consent String or tcString (see https://github.com/InteractiveAdvertisingBureau/GDPR-Transparency-and-Consent-Framework ) but uses a different field order.

Note: In order to distinguish the Compressed Custom IDs Format from "normal" Consent Strings or tcStrings, the encoded string will alway start with a lowercase a.

Version 1

A Compressed Custom IDs string of version 1 will use the following field order:

Field Data Type Description
Version Int (6 bit) Version of the string format. Should be 1.
Created Date (36 bit) Date when the string was created/changed.
User choice Bool (1 bit) 1= A user choice exists (user clicked on accept/reject/save)
0=The string is based on indirect behavior (CMP was shown, legitimate interest is established but user did not yet choose)
Purposes range length Int (12 bit) Amount of items in the following range field.
Purposes allowed Range Range of custom purpose IDs that are allowed
Systemvendors range length Int (12 bit) Amount of items in the following range field.
Systemvendors allowed Range Range of system vendor IDs that are allowed
Customvendors range length Int (12 bit) Amount of items in the following range field.
Customvendors allowed Range Range of custom vendor IDs that are allowed

Reading range fields

When reading a range field, please follow these steps:

  1. Get range length (12 bit integer)
  2. Read first bit
  3. if first bit is 0, read two 16 bit integer as start-ID and end-ID of the range item
  4. if first bit is 1, read one 16 bit integer as single ID item
  5. Perform steps 2 - 4 for each range item (see range length)

Please note that range items with start-ID and end-ID mean, that all IDs within the two IDs are allowed (including start-ID and end-ID). E.g. a range item with start-ID 3 and end-ID 6 mean that IDs 3, 4, 5 and 6 are allowed.

Back to top