What is a consent log?
Continuing over what you can do with the API, now it is the time to start knowing about consent logs.
We define a consent as the intent of a user that gives its acknowledgment about which cookie can be saved in its browser and which can't.
When a consent is given, either positive, negative or partial, then a log is created on our servers. That consent would have the following fields:
Consent log format
Format: json
Property | Type | Description |
---|---|---|
country | string | The country from which the consent was given, as a two letter string |
createdAt | number | The timestamp from where the consent was given |
companyId | string | The company id from which the consent log belongs to |
siteId | string | The company site from which the consent log belongs to |
anonymizedIp | string | The ip anonymized of the user that gave the consent |
id | string | The id of the consent given by the user. |
categories | Categories | The categories which the user agreed upon |
status | string | The status of the consent given, can be accepted, rejected, or partial |
fromUSA | boolean | If the consent was given with the format of noticeUSA or in a ccpaBanner |
Categories object
Format: json
Property | Type | Description |
---|---|---|
marketing | boolean | If the user agreed to have cookies of type marketing |
preferences | boolean | If the user agreed to have cookies of type preferences |
statistics | boolean | If the user agreed to have cookies of type analytics/statistics |
unclassified | boolean | If the user agreed to have unclassified cookies, this will be always true |
necessary | boolean | The status of the necessary cookies, will be always on true, as the user can't opt out of this ones |
optedIn | boolean | If the user opted in for the consent, only valid when the banner is a ccpaBanner |
A JSON example of this would be the following:
{
"country": "country",
"createdAt": 1693870928049,
"companyId": "COMPANY_ID",
"hasPrivatePolicyLink": false,
"siteId": "SITE_ID",
"anonymizedIp": "ANONYMIZED_IP",
"fromUSA": false,
"id": "CONSENT_ID",
"categories": {
"marketing": true,
"preferences": true,
"unclassified": true,
"optedIn": false,
"necessary": true,
"statistics": true
},
"status": "accepted OR partial OR rejected"
}
info
At illow, we don't save personal data of the user, the ip of the user is anonymized and anything that could be used for unequivocally identifying a user is not saved
Having clarified what is a consent log, lets continue with how you can retrieve them for a specific site.