Consent Cookie
Format of the TrustCommander consent cookie.
The Consent Object received via the onsite API is now the official way to access the consent settings of TrustCommander with JavaScript. The direct usage of the consent cookie is deprecated.
TrustCommander stores the consent of website visitors in a 1st party cookie.
This article only explains the consent cookie. Here you can find a list of all TrustCommander cookies.
Name
The default name of the consent cookie is TC_PRIVACY
. It can be configured in TRUST > Options
.
Domain
The cookie is set as a 1st party cookie. The subdomain/domain of the cookie can be configured in TRUST > Options
Value
The value consist of multiple fields separated by @
symbols. The separator can be configured in TRUST > Options
.
The consent cookie format is not 100% guaranteed to stay stable. We try to keep the format as stable as possible and extend it with "append only approach (adding new information with a new @
)", but changes might happen in the unforeseeable future due to limited storage space in cookies.
The cookie value follows following pattern (optional elements are wrapped in []
).
<status>@<privacy_version>[|<tcf_version>]@<banner_id>@<site_id>@<consent_categories>@<blocked_on_categories>@<updated_timestamp>,<creation_timestamp>,<to_expire_timestamp>[@<vendor_consent_string>]
Field | Description | Example Value |
| Status that indicates if a visitor provided his optin or optout. |
|
| Version of the privacy banner the visitor interacted with. |
|
| Version of the IAB TCF framework. Only available in case IAB is activated for the account and an IAB banner is used to manage consent. It follows this format: |
|
| ID of the privacy banner the visitor interacted with. | 12 |
| ID of the site in the Commanders Act Platform. | 34 |
| Comma-separated-list of optin, or optout categories. Meaning depends on |
|
| Comma-separated-list of blocked on categories. The value is URL encoded. Therefore the comma separator is replaced with |
|
| UNIX timestamp for when the consent was last updated | |
| UNIX timestamp in milliseconds when the consent was provided. |
|
| UNIX timestamp for when the consent will expire | |
| Vendor consent information (e.g. for IAB TCF vendors). Only available when vendors are activated for the account and in case vendors are used in the banner. The value is compressed and encoded to keep the cookie size small. |
|
Examples
Example1: Optin for some categories
0@002|12|34@1%2C3@4@1592900933049@1592900933049
Field | Description |
| Visitor is optin. |
| Visitor provided optin on banner version 002. |
| Banner ID is 12. |
| Site ID is 34. |
| Visitor provided optin for categories 1 and 3. |
| The category 4 is blocked on. |
| Visitor provided optin on Tue Jun 23 2020 08:28:53. |
Example 2: Optout for all categories
1@012|26|4221@@4@1592900933049@1592900933049
Field | Description |
| Visitor is optout |
| Visitor provided optin on banner version 012. |
| Banner ID is 26. |
| Site ID is 4221. |
Visitor provided optout to all categories. | |
| The category 4 is blocked on. |
| Visitor provided optout on Tue Jun 23 2020 08:28:53. |
/!\ good to know : special caracters such as "@" or "|" are encoded in the cooke value %2C = "," %7C = "|" %40 = "@"
Last updated