All Tag Extesion execution time

Gold Contributor
Gold Contributor
We are having some problem with the extension excution time. It seem that the load condition are evalueted before the execution of the extensions deployed in the scope All Tags. Tha even more strange aspect id that we do not have consistency in the excution if we load the development configuration and the production one. Can someone help us? Thank You, Claudio.
6 REPLIES 6

All Tag Extesion execution time

Employee Emeritus
Claudio, Load Rules are evaluated before extensions scoped to All Tags. If you want to use an value from an extension in a load rule then you'd need to scope that extension to PreLoader. "we do not have consistency in the execution if we load the development configuration and the production one." I don't want to assume what is happening so if you could provide some details around what you're doing in the extension that may help us understand what could be happening. However, re-scoping the tag to PreLoader is what needs to happen if you'd like to use the output of the extension in a Load Rule.

All Tag Extesion execution time

Gold Contributor
Gold Contributor
Hello Jared, for the Dev/Prod problem you can have a look at this URL: https://www.unicredit.it/it/privati/mutui/mutuovaloreitalia.html All environments have the same configuration but in dev 3 tag are fired and in prod nly 2. The one loading only in dev is bounded to an extesion populating a dataLayer variable. For the extension evaluation time problem now it's all clear, but i think you have to redesign the scenario tab in TealiumIQ, because from this tab the excution is: - preloader - datalayer - alltag extension - load rule - tags Claudio.

All Tag Extesion execution time

Employee Emeritus
I completely agree about the scenarios tab, and there is a ticket already logged to have it updated. I had a hunch about the inconsistent behavior but wanted to see what was happening. My hunch is that there is a race condition happening on the page that is creating the inconsistencies. The extension is setting a data source to a JavaScript Page Variable, s.pageName. But as long as s.pageName is defined as a data source Tealium will automatically look for that value on the page and set the utag.data variable just like you're doing in the extension. The code that grabs the page variables, like s.pageName, DOES run before load rules are evaluated. So my hunch is that when Tealium runs, sometimes the CQ code has ran and the s.pageName variable is defined and sometimes it has not. Therefore, sometimes s.pageName is defined in time for Tealium to pick it up and use it in the load rule and sometimes it is not defined in time.

All Tag Extesion execution time

Gold Contributor
Gold Contributor
Thank You very much for the explanation. Instead of correcting the scenarios tab, there is no way that the excution time will be switched? It would be great to have the possibility to work with the extensions before the load rule are processed.

All Tag Extesion execution time

Employee Emeritus
You can do the same thing in a JavaScript Code Extension with the PreLoader scope. Just know that the "b" object and the "utag.data" object is not defined at that point so you'll need to use "utag_data." Tealium will grab the values from utag_data and will use them in load rules, extensions, etc. "Instead of correcting the scenarios tab, there is no way that the excution time will be switched?" Unfortunately no. As you can imagine this could wreak havoc with existing customers that are relying on the execution order they currently have. With that said, there are plans to re-do the scoping options. So instead of being limited to PreLoader, All Tags, and DOM Ready, you'll have options like, Before Load Rules, After Load rules, "As soon as Possible" :) Don't quote me on those but they will be similar. I do not have an ETA on that enhancement.

All Tag Extesion execution time

Gold Contributor
Gold Contributor
Thank You for your help. Do you know if you have an extension already built for the import in the utag_data of the standard CQ5 dataLayer?
Public