copying DLE data into UDOs

Bronze Contributor
Bronze Contributor

How we can access the DLE values into the UDOs inside the javascript extension

3 REPLIES 3

copying DLE data into UDOs

Tealium Expert
Tealium Expert

Hi @sandeshi,

 

DLE values, Can you give a sample data.

Thanks!

copying DLE data into UDOs

Bronze Contributor
Bronze Contributor

Hi @mvenkatesan

utag.globals.dle.enrichments['d_366c12577747284e89d'] = { "page": { "url": “sampleurl”, "digitalData.page.pageInfo.test”: “test”, "digitalData.page.category.primaryCategory": "test", "team": "test", "digitalData.page.category": "test", "digitalData.page.category.": "test", "digitalData.page.category": "test", "digitalData.page.pageInfo.productTitle": null, "digitalData.page.category": [], "digitalData.page.category: [], "digitalData.page.category”: [], "dleVersion": "Tue Mar 20 09:44:15 UTC 2018" }, "events": { "pageview": { "digitalData.page.pageInfo.testevent”: [{ "conditions": [[]] }], "digitalData.page.pageInfo.test”: [{ "conditions": [[]] }], “test_event”: [{ “test_init": “1234”, “test_async": "true", “test_enabled": "true", "conditions": [[{ "variable": "dom.query_string", "condition": "equals", "value": "htmlfid=test12345” }]] }] } } }

copying DLE data into UDOs

Tealium Expert
Tealium Expert

Hi @sandeshi,

It looks like a JSON object, so assuming 'utag_data' is your data layer when you assign

utag_data.dle  = utag.globals.dle.enrichments['d_366c12577747284e89d']


to refere it -
example: console.log(utag_data.dle.page.url)
will return "sampleurl"

or

if your data layer is "utag.globals.dle.enrichments" then you can access it using

example: console.log(utag.globals.dle.enrichments.d_366c12577747284e89d.page.url)

will return : "sampleurl"


or you can set a pointer to the dle object, example

dleobt = utag.globals.dle.enrichments.d_366c12577747284e89d

and then access it.

console.log(dleobj.page.url)

will return
"sampleurl"

Above solution is based on my understanding, please let me know if it helps or need more information

Thanks!

Public