- Name:
GDPR Consent level
- Variable type: 1st Party Cookie
- Cookie Name:
__{site_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|none)$
(^(undefined|null|0|false|NaN|none)$
= RegEx to indicate that the cookie must have a value that is equal to 0, null, undefinded, none, 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 matches RegEX
analytics|all
- (
analytics|all
= RegEx to indicate that the cookie should be analytics or all 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 matches RegEX
marketing|all
(marketing|all
= RegEx to indicate that the cookie should be marketing or all 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 ;-)