Highlighted

Is it possible to add a tag to the head of a page (DynaTrace)

Silver Contributor
Silver Contributor

We have a request to add Dynatrace to our pages.  This requires the tag be added to the head of the page.  It is a js include.  Is this possible in Tealium?  The relevance of getting it added to the top of the page is to ensure it executes before anything else on the page.

If I have seen further it is by standing on the shoulders of giants
2 REPLIES 2
Highlighted

Is it possible to add a tag to the head of a page (DynaTrace)

Employee Emeritus

@brian_greig

Tealium's code by default runs Asynchronous

https://community.tealiumiq.com/t5/Developers/Asynchronous-vs-Synchronous-async-vs-sync/m-p/1078/hig...

This effectivally means you would not be able to gauranteen the code runs before any other code unless the following code is in the form of a callback.

 

However if you still find you have a need to some JavaScrpt to execute prior to your page and you want to host that within the Tealium platform, we do have a solution.  In addition to utag_data JSON object in the body and the utag.js being called from the body, you would add a call to utag.sync.js in the head of your page.  This will require code to be added to the page by your web developers.  However once this code is added to the page, you can put whatever you want inside of utag.sync.js via the Tealium iQ interface.

https://community.tealiumiq.com/t5/Developers/Publish-Configurations/m-p/2010/highlight/true#M3820

 

Most clients that are using Tealium's utag.sync.js are using it for Adobe Test and Target, Optimizely A/B testing or other providers that are altering the content on the page and do not want the page to "flicker"

https://community.tealiumiq.com/t5/Developers/Flicker-Free-Test-amp-Target/m-p/1560

 

This code does come at a cost though.  You can read about some of that here:

https://help.optimizely.com/hc/en-us/articles/202666094-Synchronous-and-Asynchronous-snippet-loading

 

 

Is it possible to add a tag to the head of a page (DynaTrace)

Silver Contributor
Silver Contributor

Thanks for the detailed answer Brian

If I have seen further it is by standing on the shoulders of giants