68publishers/cookie-consent

How to create a trigger with Analytics Consent and History Change Built-In GTM Trigger ?

red1 opened this issue · 2 comments

red1 commented

Hello
First above all let me say that I found this Consent Module excellent. It fits almost all my needs.
I have though a complex need: I need to send history change events to GA, so I use for that a Built-In GTM Trigger.
Is there a way to make this trigger only fired when the Analytics Consent is given as well ? When I add the 2 triggers it's treated as ORs in GTM:
image
if not possible how can I grab the Denied event like the Consents Events ? May be I can add the denied event as a blocking event for the tag to fire?
Thanks

tg666 commented

Hi,
it's great to hear that you like our package :))
To the point, once a user confirms the consent modal or changes his preferences through the settings modal, we send the "native" event "consent.default" respectively "consent.update" to GTM in addition to the custom events.

So you can try to set the following rule for the tag and set only "History change" as a trigger:

Snímek obrazovky 2023-03-26 v 4 26 27

red1 commented

It looks like it does work ! Thanks @tg666. btw I've pushed a PR for contributing to the translations.