Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tag firing section: "Only fire this tag if VARIABLE_NAME = XYZ" #892

Open
Stan-vw opened this issue Sep 24, 2024 · 5 comments
Open

Add tag firing section: "Only fire this tag if VARIABLE_NAME = XYZ" #892

Stan-vw opened this issue Sep 24, 2024 · 5 comments

Comments

@Stan-vw
Copy link

Stan-vw commented Sep 24, 2024

Currently, firing logic for Tags is a combination of:

  • fire when a specific trigger(s) happens
  • do not fire when a specific trigger(s) happened
  • fire limits
  • start/end dates

However, you cannot configure the tag to trigger:

  • only when a variable has a certain value
  • never when a variable has a certain value

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: #761 (comment)

@AltamashShaikh
Copy link
Contributor

@Stan-vw A DOM Ready trigger with below filter can solve the problem of firing a tag for a sepcific variable

Screenshot from 2024-09-25 09-22-51

@Stan-vw
Copy link
Author

Stan-vw commented Sep 25, 2024

@AltamashShaikh yes, I believe that's what I described:

  • it's currently possible, but the conditional logic for the variable value is only available in the trigger config
  • the ticket is to add this conditional logic on the tag config, which can be easier for some users / configurations
    So it's not really adding new capability, it's making an existing capability more easily available.

*I'll update the title, since the original title might be slightly inaccurate

@Stan-vw Stan-vw changed the title New feature: "Only fire this tag if VARIABLE_NAME = XYZ" Add tag firing section: "Only fire this tag if VARIABLE_NAME = XYZ" Sep 25, 2024
@SW-Vincent
Copy link

As a reference, it sounds like the "Perimeters" feature of Tag Commander (TMS from commander act).
image

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).

@Stan-vw
Copy link
Author

Stan-vw commented Oct 22, 2024

Rough indication of suggested change:
image

@snake14
Copy link
Contributor

snake14 commented Oct 22, 2024

As far as implementation, we might be able to use the same meetsConditions function that triggers use in the tag's _doFire method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants