Shreyas Rastogi
Shreyas Rastogi

Reputation: 19

do all page load rules execute on each page or only the rule related to that page

I have 20 page load rules . My question is do all page load rules execute on each page or only the rule related to that page . Reason why I am asking is when i have condition path contains and i hardcode the path or URL , in DTM debugger only the page load rule fires shows , whereas when i create a data element where i get value from page title and add condition to rule data element value = title , there it shows condition not met for all the other pages .

If i understand it correct then when url strings is defined as static it is not evaluating all page load rules , WIll evaluating all page load rules based on data element make the page slow or all rules evaluate anyways .

Thanks

Upvotes: 1

Views: 368

Answers (1)

CrayonViolent
CrayonViolent

Reputation: 32517

All page load rules have their conditions evaluated on every page load. However, not all of them actually show a console log (a _satellite.notify() call) of it. because..reasons? Honestly, I don't know why it's not consistent but at one point I did dig into the core DTM library and confirm that it doesn't always make a _satellite.notify() call, based on stuff like you pointed out. And yeah, it's kind of annoying.

WIll evaluating all page load rules based on data element make the page slow or all rules evaluate anyways .

As mentioned, all of the page load rules will have their conditions evaluated on every page. This will impact page performance, sure. But the contents of a given page load won't actually be executed unless all of the conditions for the rule evaluates true.

And, whether or not the contents in a given rule are even (pre)loaded depend on how you setup the rule. Page load rules set to evaluate synchronously (page top/bottom) or have tags in them set to output synchronously will have their contents synchronously loaded, regardless of whether or not all of the conditions actually evaluate true (and if they are true, then it will be executed).

Upvotes: 2

Related Questions