Posts: 1
Registered: ‎06-19-2017

utag_data and

What's the diference between utag_data and


0 Kudos
Occasional Contributor
Posts: 120
Registered: ‎12-11-2015

Re: utag_data and

It depends...

If window.utag_data exists prior to utag.js being loaded (as per best practice) then there is no difference between them - is initialised as a reference to window.utag_data and consequently changes to either are reflected in the other. The code that does that is here: = (typeof utag_data != 'undefined') ? utag_data : {};

If window.utag_data is initialised after utag.js is loaded, it gets a bit trickier.. There is a function (utag.loader.WQ) that merges the contents into, but in that case it's only copies of the data item rather than a direct reference, and I forget now under which circumstances it fires. Suffice it to say, your experience of Tealium will be more straightforward if utag_data is always initialised before loading utag.js.

Posts: 67
Registered: ‎04-20-2016

Re: utag_data and

[ Edited ]

Hi @yan_almeida

Additionally to what @UnknownJ says:

utag_data is (usually) declared on the page, and (usually) contains stuff set by the developers from the server is the processed data layer. 

This contains everything from utag_data...
plus any DOM stuff (properties prefixed with "dom." such as["dom.url"])
plus any cookie values (properties prefixed with "cp.")
plus any page JS variables you may have declared
plus any querystring parameters (properties prefixed with "qp.")

Also will have had any extension manipulation code applied

Checkout our blog:
0 Kudos