- Name:
GDPR Consent level
- Variable type: 1st Party Cookie
- Cookie Name:
__cookie_consent
If you change your cookie name in cookie-consent.php
, don't forget to change this one too!
- Name:
GDPR - Has not given consent
- Trigger type: Custom Event
- Event name: .* (regex.* triggers all types of events eg pageview, clicks, user engagement… )
- Tick 'Use regex matching'
- This trigger fires on: Some Custom Event
- Fire this trigger when GDPR consent level matches RegEX
^(undefined|null|0|false|NaN|)$
(^(undefined|null|0|false|NaN|)$
= RegEx to indicate that the cookie must have a value that is equel to 0, null, undefinded, false…)
Open tag > beneath the title ‘triggering’ click the plus icon next to exceptions and select the right trigger.
It's possible that there are no tags created yet. If that's the case, create a new one (click right top 'new')
Give it the name Google Analytics
(Or you can give this another name, but keep that in mind when you follow the next steps).
For Tag Type you choose Google Analytics: Universal Analytics
.
Tag with some settings already set after config
- Name:
GDPR - Consent for analytical cookies
- Trigger type: Custom Event
- Event name: .*
- Tick 'Use regex matching'
- This trigger fires on: Some Custom Event
- Fire this trigger when GDPR Consent Level does not match RegEx
2|true
- (
2|true
= RegEx to indicate that the cookie can't have the value 2 OR true/1, this does mean that in combination with the previous exception, the value of the cookie should be 3 to fire the tag.)
Examples of analytic cookies are: Google Analytics, Hotjar, Matomo Analytics,...
- Name:
GDPR - Consent for marketing cookies
- Trigger type: Custom Event
- Event name: .*
- Tick 'Use regex matching'
- This trigger fires on: Some Custom Event
- Fire this trigger when GDPR Consent level does not match RegEx
3|true
(3|true
= RegEx to indicate that the cookie can't have the value 3 OR true/1 , this does mean that in combination with the previous exception, the value of the cookie should be 2 to fire the tag.)
Examples of marketing cookies are: Facebook Pixel, Google Ads conversion tags, Online pop ups/surveys, Doubleclick, ...
You do the same as you do in Step 3 and Step 5, Add exception to your trigger.
- Name:
Cookie refresh
- Trigger type: Custom Event
- Event name:
cookie_refresh
- This trigger fires on: All Custom events
Check if the righ tag get's fired eg. when your site visitor only wants analytic cookies.
Don't forget to publish all your changes ;-)