What is stored in the cookiehub cookie?
To avoid showing the CookieHub widget repeatedly for the same end user, CookieHub must store the cookie choices in a first party cookie in the user’s browser. The cookie expiration is one year by default but can be customized using the JavaScript API.
Our goal is to avoid storing any unnecessary information and be transparent about any data collected or processed and below you can find detailed information about the cookiehub cookie structure and purpose of each section.
Base64 encoded
The cookie value is base64 encoded to avoid issues caused by special characters that are not allowed in cookies. The value can be decoded using various base64 decoding tools like this one: https://networktools.co/base64-encode-decode
Cookie value
The base64 encoded value will look something like this:
eyJhbnN3ZXJlZCI6dHJ1ZSwicHJlY29uc2VudCI6ZmFsc2UsInJldmlzaW9uIjozLCJkbnQiOnRydWUsImNvb2tpZUxhd3MiOnRydWUsInRva2VuIjoiZE9TV0xOWmlsdmNReVNXVjBrN3ZQVnY2Y0N6UmN0R0JITEZwVmxaZW9sY2wyWEhlaUgxaGpZOFNvd1RXZTZRVyIsImNhdGVnb3JpZXMiOlt7ImNpZCI6MSwiaWQiOiJuZWNlc3NhcnkiLCJ2YWx1ZSI6dHJ1ZX0seyJjaWQiOjMsImlkIjoiYW5hbHl0aWNzIiwidmFsdWUiOnRydWV9LHsiY2lkIjo0LCJpZCI6Im1hcmtldGluZyIsInZhbHVlIjp0cnVlfV19
Once decoded, the value will look like this and contains a JSON structured object:
{ "answered":true, "preconsent":false, "revision":3, "dnt":true, "cookieLaws":true, "token":"dOSWLNZilvcQySWV0k7vPVv6cCzRctGBHLFpVlZeolcl2XHeiH1hjY8SowTWe6QW", "categories":[ {"cid":1,"id":"necessary","value":true}, {"cid":3,"id":"analytics","value":true}, {"cid":4,"id":"marketing","value":true} ] }
Contents
In the table below you’ll find a table showing each property from the JSON object along with details and/or purpose.
Property | Details / Purpose |
---|---|
answered | This property is set to true if the user has made any cookie choices in the CookieHub widget, including allowing all categories, denying all categories or allowing some categories. |
preconsent | Set to true if preconsent was enabled for the domain at the time the cookie was set. |
revision | By default the value is 1 but if you click the Reset consents button in the CookieHub Dashboard, the value is increased by 1 each time. If the value of the revision property is set to a lower number than the current revision for the domain, the user will get the CookieHub widget again and forced to make his cookie choices again. |
dnt | If the user’s browser sends the dnt (do-not-track) flag, this value will be set to true. CookieHub respects the dnt flag and doesn’t automatically load cookie categories used for tracking if the dnt flag is sent. |
token | Unique token created for each user that can be used to look up user’s consent in the consent log. |
categories | List of categories enabled for the domain and the value property indicates whether the user allowed that cookie category. |