- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
12-03-2018 04:47 AM
Hello,
I want to fire certain tags under certain conditions, for which I can use utag.view() with an array of UID. However, a side effect of passing in the array of UID is that load rules are ignored. I don't want the load rules ignored. I want them processed. Essentially, I will have two layers of conditional execution. After the condition is met to fire utag.view(), I want individual tags to fire only if load rule conditions are also met.
How can I do this? Can I use utag.track() and pass in the load rules as part of the config object?
Thanks.
Solved! Go to Solution.
12-05-2018 08:09 AM
Hi @powem
Here is one possible approach:
// 8 and 9 are the load rules IDS var load_rules = {8:0, 9:0}, tag_ids = []; // update scope load_rules utag.loader.loadrules(utag.data, load_rules); // start building the IDS collection if (load_rules[8]) tag_ids.push(345); // where 345 is the tag id for load rule with id 8 if (load_rules[9]) tag_ids.push(43); // where 43 is the tag id for load rule with id 9 // send tracking if (tag_ids.length > 0) utag.link({}, null, tag_ids)
12-05-2018 12:16 PM
Copyright All Rights Reserved © 2008-2023