I am currently refactoring accuranker.com from Google Tag manager to Matomo Tag Manager.
We are using a Cookiebot to handle our GDPR consent banner and I have set up 3 different variables inside Matomo Tag manager to track the value of our 3 different consent options: Marketing , Preferences, and Statistics
.
The variables are made using custom JavaScript and will update every time Cookiebot is updating the variables on the window object. This works well. The variables are set to false
by default and updated to true
if the user has accepted this type of consent (I get this from the window object where cookiebot is storing the info).
Now I would like to set up 3 custom events that trigger when the variable contains false. Example: CookieConsent Marketing is not accepted. This way I will be able to set tags to not fire when no consent is given in this category.
In Google Tag manager you can use the wildcard selector: .*
inside the Event Name
trigger to fire the event on any event - and then add: Only trigger when (optional)
the CookieConsent marketing variable is false.
But in Matomo tag manager the .*
wildcard selector doesn’t seem to work/fire. Can I do something similar instead? I need some way to avoid certain tags being set when the variable is set to false.