I'm triggering a number of events using jQuery onHandler events. On a few of these events, I want to fire only one tag instead of all tags, and I'm trying to identify the best way to do this.
One option I can think of would be to have the extensions that should fire only one tag to populate a UDO variable (only_tag=dart for example), then use load rules on my other tags to fire only when only_tag!=dart. This makes for undesirably complex load rules that require adjustment whenever I add a new configuration, though.
Ideally, the onHandler would have a dropdown box that would let me limit which tags would fire, just like utag.view and utag.link do, but that feature doesn't seem to be present.
Is there another option I'm missing? Any other factors I should consider when making my decision? Has anyone else implemented something like this and run into any gotcha moments?
utag.view(data_object_to_be_used_in_track_call, null, array_of_ids_to_fire);
If you are using utag version 4.38 or greater, you can also call utag.link with an array of ids.
utag.link(data_object_to_be_used_in_track_call, null, array_of_ids_to_fire);
To find out what version of utag you are running, bring up your webpage and in the console run this command:
Looks like I'm stuck on 4.33 for the moment, and upgrading would break some other functionality that we don't have resources to update at the moment. If it doesn't support doing that with utag.link, I've got to find another solution.
Are load rules evaluated after extensions scoped to all tags? If so, it occurs to me that I could use a single extension to set a UDO variable for each tag, and set a load rule for each tag to fire only when that variable is set. Then when I want to disable one tag, I can change the variable value, knowing that it'll still be enabled again for the next event to fire. Would that work?
I got pulled away yesterday and was not able to get back to this conversation until just now. Looks like Samrat beat me to it. Let me know if his solution does not work and we can try to address in more detail.