- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
03-08-2019 12:38 AM
I need to fire a particular tag in case of only events occuring on the site.
In that too there is a condition that i want that tag to not fire on few events and it can be fired for rest all.
We capture all the events values in "EventType" variable.
I am using the following load rule for that tag as -
EventType is populated AND
EventType does not contain EventValue1|EventValue2|EventValue3
but it is not working and tag doesn't fire for any events on the site.
can someone help me understand how i can use multiple values in that condition to check the load rule and it should work?
Solved! Go to Solution.
03-11-2019 08:25 AM
Hi @shailesh_gaikwa - it seems that you would want to actively debug this to see what's happening on the page. Check out the documentation here (via search results) on how to set the debug cookie so you can watch the code execute and determine how to address the issue. You will want to open utag.js in the browser Sources tab, enable Pretty Print and set some debug breakpoints to see what's happening.
03-12-2019 07:18 AM
Hi
THe multiple value exclude is always a tricky one, and the reason for its failure is that the condition
Is it possible to set the condition in the reverse manner?
Is popualted and contains....
03-15-2019 06:25 AM
Hi Gavin,
to use the condition in reverse manner i will have to add 50+ such event values in there.
Which will be too much ask to do from configuration and also from testing poin of view.
Isn;t there a way that this works?
any regular expression which can be used in this case?
03-15-2019 08:24 AM
Hi @shailesh_gaikwa,
have you tried splitting it out like this:
EventType is populated AND
EventType does not contain EventValue1 AND
EventType does not contain EventValue2 AND
EventType does not contain EventValue3 AND
I'd expect that do what you're looking for if I've understood your issue correctly, and it has the advantage of being easier to manage than regular expressions - hope that helps?
Best
Caleb
03-19-2019 12:52 AM
Hi @calebjaquith ,
I used your solution and it did work for me :) thanks for the solution
I have a query though - need little clarity for my understanding -
when we put AND condition then it means that tag will only fire if all the conditions are met in the AND clause, right?
then how come this worked because all those event values are not fired in the single call?
When we say EventTypeValue1 AND EventTypeValue2 AND EventTypeValue3 means if the value of events has all three then only it will fire but we are passing individual values per event then how come it worked?
03-19-2019 04:34 AM
glad to hear it's working!
Since you're using AND, the rule will only evaluate to TRUE if all of the component conditions evaluate to TRUE.
Here are three cases to illustrate what's happening when TiQ evaluates the Load Rule:
Condition | Result |
EventType is populated | TRUE |
EventType does not contain EventValue1 | TRUE |
EventType does not contain EventValue2 | TRUE |
EventType does not contain EventValue3 | TRUE |
> Evaluates to TRUE, tag will fire.
Condition | Result |
EventType is populated | TRUE |
EventType does not contain EventValue1 | TRUE |
EventType does not contain EventValue2 | FALSE |
EventType does not contain EventValue3 | TRUE |
> Evaluates to FALSE, tag will not fire.
Condition | Result |
EventType is populated | FALSE |
EventType does not contain EventValue1 | TRUE |
EventType does not contain EventValue2 | TRUE |
EventType does not contain EventValue3 | TRUE |
> Evaluates to FALSE, tag will not fire.
Does that help?
Best
Caleb
03-19-2019 05:34 AM
Copyright All Rights Reserved © 2008-2023