Highlighted

Variable persistence in data layer

Silver Contributor
Silver Contributor

I was wondering if the below behavior is intended or if we have some strange things in our implementation.

The behavior is as such:

 

Having the UDO on the page with the following content:

 

var utag_data= {hello: 'world'}

 

Issuing a utag.view(utag_data) yields a correct firing of the configured tags and utag.data contains {helllo:'world'}

 

When then doing a munal utag.view with as parameter {foo:'bar'} then I can see that both utag_data AND utag.data contain

 

 {hello:'world',foo:'bar' }

after the tags have been fired.

 

Is this intended? I actually would expect that utag_data and utag.data would still only contain {hello:'world'} and should not be 'augmented' with the newly added variables from the utag.view call...

1 REPLY 1
Highlighted

Variable persistence in data layer

Employee Emeritus

@jan_van_damme,

 

Yes, that is the expected behavior.  Any track call (e.g. utag.view or utag.link) will merge the data into your UDO.

 

In our latest version of utag.js (v4.40), this behavior no longer "merges" the data.  If you'd like to upgrade to the latest version, please reach out to your Account Manager and they can help with this to ensure a smooth transition.

 

Here is our release notes for v4.40 with its changes https://community.tealiumiq.com/t5/uTag/utag-js-version-4-40-Release-Notes/ta-p/12946