Highlighted

Load Rule if UDO value is blank ("")

I want to create a load rule to fire a tag (tag1) based on the UDO value (u_val1) we are setting. The UDO value is set via a lookup table (scoped to all tags) based on the pathname. If the pathname is equal to specific page then we set the 'u_val' to '000'. we want the tag to fire only when the UDO value is set. We don't want it to fire when the value is blank (""). How should I go about setting the load rule for this? is it *IF js.u_val1 DEFINED AND js.u_val1 POPULATED (tried this but the tag is not firing on the pages even when 'u_val1' is populated) Or *IF js.u_val1 NOTDEFINED OR js.u_val1 DEFINED AND js.u_val1 POPULATED (tried this but the tag is firing even when 'u_val1' is not populated) What is the correct way of creating the load rule for this?
2 REPLIES 2
Highlighted

Load Rule if UDO value is blank ("")

Employee Emeritus
Hi Pradeep, This won't work because load rules are evaluated before the extensions run. That's why the first set never fires. The second set fires because I'm assuming u_val1 is not defined in your UDO, but instead in your look up tables so the first part of the OR condition is satisfied. There is a way to re-evaluate load rules after 'all tags' scoped extensions run, try this article: https://community.tealiumiq.com/posts/839992-how-to-evaluate-load-rules-after-extensions
Highlighted

Load Rule if UDO value is blank ("")

Employee Emeritus
It could, all your 'all tags' extensions will now be evaluated before your load rules.