Variable persistence in data layer

Gold Contributor
Gold 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 contains {helllo:'world'}


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


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

after the tags have been fired.


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


Variable persistence in data layer

Employee Emeritus



Yes, that is the expected behavior.  Any track call (e.g. utag.view or 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