How to assign values to data sources in dom ready JS extension?

Gold Contributor
Gold Contributor
 
3 REPLIES 3

How to assign values to data sources in dom ready JS extension?

Tealium Employee
Hi Tomas, I am assuming you may have tried using the "b." notation which is only available within the Tealium library during page load. For DOM Ready scoped JS extensions, you will need to use "utag.data." notation. For example if you want to apply the value "button click" to an "event" data source, you can use: utag.data.event="button click"; Please let me know if this is what you're looking for. Cheers, -Dan

How to assign values to data sources in dom ready JS extension?

Employee Emeritus
Hi Tomas; In the JS Extension set to DOM Ready scope, you will need to use utag.data['datasourcevar'] notation to access your data sources. You can use this syntax to get or set the value of your datasource of choice. Hope that helps. Regards, -Bahman

How to assign values to data sources in dom ready JS extension?

Gold Contributor
Gold Contributor
Thanks. Craig told me it is also necessary to append "js_code." string. It's not cool that Tealium converts objects into strings.
Public