Open Stan-vw opened 2 months ago
@Stan-vw A DOM Ready trigger with below filter can solve the problem of firing a tag for a sepcific variable
@AltamashShaikh yes, I believe that's what I described:
*I'll update the title, since the original title might be slightly inaccurate
As a reference, it sounds like the "Perimeters" feature of Tag Commander (TMS from commander act).
The main point is to use and reuse some generic triggers for different context without having to create one trigger per context. This way we might have one consent change trigger and one consent status variable per analytics / ads tool rather than having an expodential number of triggers (this is nothing but an example of many uses).
Not to confuse with group of triggers that is an existing GTM feature (and the subject of an existing github ticket), which is more of a "wait for all triggers" trigger (ex : event + consent change, again just an example of many uses).
Rough indication of suggested change:
As far as implementation, we might be able to use the same meetsConditions function that triggers use in the tag's _doFire method.
Currently, firing logic for Tags is a combination of:
However, you cannot configure the tag to trigger:
This could be handy for managing logic like "only fire when consent is given", or "only fire for specific audiences". This logic is available in the trigger configuration, but this can result in having duplicate triggers with slight variable differences, rather than having a single generic trigger and adding the nuance to the specific tags that require it.
Related conversation: https://github.com/matomo-org/tag-manager/issues/761#issuecomment-2370160407