- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
02-06-2020 04:29 PM - edited 02-07-2020 03:40 PM
I am not sure how to properly ask this. Hopefully this makes sense. Very new to Tealium. Inside of iQ Tag Management I have added a Universal Data Object called sitetest_abcdefg. The type if UDO Vaiable. Then in Extensions I have one called "Grab Site Test Data" with the scope "All Tags - Before Load Rules" and in configuration I have the set as the UDO variable name and the "To" as "Js Code" which maps to my defined object on my site.
I assume Tealium looks at this path I gave it to find the value from my site, and adds it to the utag.data object? However this is not happening. For some reason it is not persisting the data to this in "utag.data.someVarIDefine"
On my page I console log both "utag" and "utag.data". The odd thing is when I look at the "utag" object that is logged I drill down to utag.data and I do see my sitetest_abcdefg variable there with the correct value. However the very next line that console logs "utag.data" does not have my sitetest_abcdefg variable name or value. Why would it include my value within just logging "utag" but once "utag.data" is logged my variable is not included? What is happening here?
How I am trying to use this:
if (utag.data.sitetest_abcdefg === 'hijkl'){
// code for site this site test group
} else {
// code when not in site test group
}
but utag.data.sitetest_abcdefg is undefined, but that value shows up when just console logging "utag"
Hope this makes sense, or someone knows whats going on here
** Edited **
02-07-2020 08:51 AM
Hi Chipe,
There is a setting called Page Data Object in the publish settings. This enables you to tell utag.js that you are using a datalayer with a custom name. Have you used that setting?
https://community.tealiumiq.com/t5/iQ-Tag-Management/Publish-Configuration/ta-p/13632
Regards,
Thomas
02-07-2020 11:24 AM
Copyright All Rights Reserved © 2008-2023