On this page
Overview
CookieScan adds events to the Google Tag Manager data layer, so you can use them as triggers. There are two kinds: a category event for each category a visitor accepted, and a consent-update event for Google Consent Mode. Both need a data layer on the page, which Tag Manager creates.
To use the events step by step, see Fire tags on consent in Tag Manager.
Category events
These events need Google Tag Manager events turned on at Cookie Banner, then Settings, then Google Tag Manager events. The setting is on Premium and Enterprise plans.
| Event | Sent when |
|---|---|
| cookie-consent-necessary | The visitor has made a choice on your banner, whatever they chose. |
| cookie-consent-preference | The visitor accepted Preference. |
| cookie-consent-statistics | The visitor accepted Statistics. |
| cookie-consent-marketing | The visitor accepted Marketing. |
| cookie-consent-unclassified | The visitor accepted Unclassified. |
CookieScan sends no event for a category the visitor turned down.
The consent-update event
CookieScan sends consent-update when Use Google Consent Mode is on. It doesn't need the Google Tag Manager events setting.
CookieScan sends it as each page loads, and straight after each Consent Mode update. A tag on this trigger sees the visitor's latest consent state.
When events are sent
| Situation | What CookieScan sends |
|---|---|
| A first visit, before any choice | consent-update only, if Consent Mode is on. |
| Any page, with a saved choice | The category events for that choice, once your banner has loaded. |
| A new choice, with Seamless consent (no page reload) on | The events straight away, without a page reload. |
| A new choice, with seamless consent off | The events on the page that reloads after the choice. |
With Geo-Awareness on, a visitor from a country that doesn't need consent starts with every category allowed. CookieScan then sends the category events from their first page.
Related settings
- Fire tags on consent in Tag Manager
- JavaScript API, to read the same choices from your own code
- How categories map to Consent Mode
- Banner settings