> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.pandectes.io/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Cookie Consent event in dataLayer

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
*   **C0001**: Functionality
*   **C0002**: Performance
*   **C0003**: Targeting

These categories are under the **pandectes_categories** property. The allowed values for each category are:

*   allow
*   deny

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)
  
We also have the **pandectes_action **to specify if the consent is **new** or **stored**.

When a visitor interacts with the banner then the event is pushed and if we check the dataLayer from the browser console we can see the full event data.

**Note:** dataLayer consent event is only available on the paid plans.