On this page
Before you start
Note: Plans
The Google Tag Manager events setting is on Premium and Enterprise plans.
You need CookieScan installed with either method, and Google Tag Manager on every page of your website.
Google tags don't need these events, because they read Google Consent Mode. Use the events for tags that don't read Consent Mode, such as many ad pixels and chat widgets from other companies.
Turn on Tag Manager events
Open the banner settings
Go to Cookie Banner, then Settings.
Tick Google Tag Manager events
Under Premium account features, tick Google Tag Manager events.
Save your settings
Select Save & Publish.
The events CookieScan sends
CookieScan adds an event to the data layer for each category the visitor has accepted. Use the event names exactly as written.
| Event | Sent when |
|---|---|
| cookie-consent-necessary | The visitor has made a choice on your banner. |
| 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 the events on every page, once your banner has loaded. After a new choice, it sends them straight away if Seamless consent (no page reload) is on. Otherwise the page reloads and it sends them on the reloaded page. Tag Manager events has the full details.
Create a trigger for each category
Create a new trigger
In Tag Manager, go to Triggers and select New.
Choose Custom Event
Select Trigger Configuration, then Custom Event.
Enter the event name
In Event name, enter the event for the category, such as
cookie-consent-marketing.Save the trigger
Leave All Custom Events selected. Give the trigger a name, such as CookieScan Marketing consent, and select Save.
Repeat these steps for each category your tags need.
Fire your tags on the new trigger
Open the tag
Open a tag that needs consent, such as a Marketing pixel.
Replace its trigger
Remove its current trigger, such as All Pages. Add the CookieScan trigger for the tag's category.
Publish your container
Select Submit, then Publish.
Warning: Remove the old trigger
A tag that still has All Pages or another page trigger fires before the visitor consents. Each tag should keep only its CookieScan trigger.
Check it worked
Preview your container
In Tag Manager, select Preview and open your website in a private window.
Check before you choose
No
cookie-consent-events appear, and your tag doesn't fire.Accept on your banner
Select Accept all. The events appear, after the reload if the page reloads, and your tag fires.
Note
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.
Add these tags' cookies yourself
A scan doesn't fire tags that wait for these events, because the scanner never makes a choice on your banner. So your scan doesn't find the cookies those tags set.
Add each of those cookies yourself at Cookie Manager, then Add Cookie, in the category its tag waits for. See Can I add a cookie the scan missed?