Highlighted

Pros & Cons of including utag.js synchronously and loading tags asynchronously

loreboldoTR
Bronze Contributor
loreboldoTR

Hello Support,

We have to define new guidelines for the best Tealium web implementation across the whole organisation, which also uses Adobe products (Visitor API, Target, Analytics, Audience Manager). We have some questions that are underlined.

We currently see two alternatives:

  1. utag.sync.js included in a synchronous way, then data layer definition, then utag.js loaded asynchronously: this looks like the approach Tealium recommends the most, however requires some tags to be hard-coded in the utag.sync.js template to have them working flawlessly (e.g. Adobe Experience Cloud Visitor ID Service and Adobe Target)
  2. Optional utag.sync.js included in a synchronous way (should be empty), then data layer definition, then utag.js loaded synchronously (which then loads most of the tags asynchronously): this could slightly slow down the page (we guess Load Rules are evaluated synchronously; is any Extension loaded synchronously as well - e.g. Pre-Loader, All Tags...?), but allows using the Adobe Exp. Cloud Visitor ID Service and Adobe Target tags through the standard TiQ management (flagged to be loaded synchronously). The fact that Load Rules, Extensions, etc. have exception handling, should prevent any impact on the user experience (do you confirm?

As you may understand from what's above, we tend to prefer option #2, however we would like to understand with you Tealium guys (and the Community) if we took into consideration all the possible issues and if you can recommend this implementation similarly to the "standard" one.

Looking forward to hearing from you.

Thanks,

Lorenzo

2 REPLIES 2

Pros & Cons of including utag.js synchronously and loading tags asynchronously

Azhar1
Bronze Contributor
Azhar1

The caveat I see with this, is if any tag issue which isn't related to target etc within the utag.js occurs which causes the utag.js to fail to load, then you lose the functionality of all those libraries whereas utag.sync.js remains unaffected with tealiums reccomended outlines. Instead of having multiple functionalties go down or be negatively impacted.

Just a thought :)

- Azhar

Pros & Cons of including utag.js synchronously and loading tags asynchronously

loreboldoTR
Bronze Contributor
loreboldoTR

Got this feedback from @corbinspicer through ticketing system:

We do not recommend loading Tealium synchronously regardless of how many sync tags you require. Synchronously loading Tealium may have decremental performance issues on your sites and and our best practice is, and always will be, to load Tealium in an asynchronous manner.

You can read more about why we recommend async here: https://community.tealiumiq.com/t5/iQ-Tag-Management/Synchronous-vs-Asynchronous-JavaScript-sync-vs-...

Subsequent question: does this then mean that if we want to use the flicker-free solution for Adobe Target we’ll need to put both the Visitor API and Adobe Target code in the utag.sync.js – thus losing the possibility of an easy update & versioning as when they are deployed as tags, do you confirm?

@corbinspicer :

The Marketing Cloud ID will work as a tag with the wait flag off.

The latest version of our Target tag will automatically inject code into utag.sync.js, so the concept of versioning and easy update still exists. If you use the "Adobe Target" tag in the marketplace and have utag.sync.js enabled, this will be handled automatically.