- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
05-11-2016 01:04 PM
05-11-2016 03:45 PM
Hi @madhan_v,
The utag_data object would need to be referenced before utag.sync.js. If this is the case, you would simply access the data layer elements by typing the following into utag.sync.js
utag_data["key_name"]
Please note that the utag_data object won't include the automatic data points such as first party cookies because utag.js hasn't run yet. The utag.js library adds these data points once it has loaded.
05-11-2016 08:05 PM
05-12-2016 08:08 AM
Hi @madhan_v,
You would need to move the utag_data code into the head before referencing utag.sync.js. If utag.sync.js is loaded before utag_data, utag.sync.js can't see utag_data.
Keep in mind that you don't need to define the whole utag_data object before referencing utag.sync.js. You only need to include the data points needed for utag.sync.js. The remaining data points can be added to utag_data in the body before referencing the main utag.js library.
Let us know if there are any other questions.
Copyright All Rights Reserved © 2008-2023