The dataLayer is an object used by Google Tag Manager and gtag.js to pass information to tags. Events or variables can be passed via the data layer, and triggers can be set up based on the values of variables.
Our application is pushing a custom event to dataLayer in order to be used by other apps or services and take information about the user's consent.
The event name that is pushed is called: Pandectes_Consent_Update
The categories mapping is the following:
C0000: Strictly necessary
These categories are under the pandectes_categories property. The allowed values for each category are:
The status property is called pandectes_status and the allowed values are:
allow (all categories are allowed)
deny (none of the categories is allowed)
mixed (some of the categories are allowed)
revoke (the user clicked on the revoke consent link)
When a visitor interacts with the banner then the event is pushed and if we check the dataLayer from the browser console we will see something like this 👇
Note: dataLayer consent event is only available on the paid plans.