Data Mapping from hierarchical datalayer

Bronze Contributor
Bronze Contributor

Hi there,

We are new with tealium and used to work with Google tag manager. But now we stuck with a specif situation about mapping variables. How can you map hierarchical data from the layer? 

Screen Shot 2018-02-28 at 17.10.43.png

If i want to map it in gtm it something like user.user_city but that doesnt work in tealium.

Thx in advance

1 REPLY 1

Data Mapping from hierarchical datalayer

Tealium Expert
Tealium Expert

Hi @svanderhaagen,

Tealium has a Flatten JSON Object extension which will take an object of the form:

{
  user: {
    user_city: "City",
    user_country: "US",
    user_login: ""
  }
}


And turn it into a flat object:

{
  "user.user_city": "City",
  "user.user_country": "US",
  "user.user_login": ""
}

There's some guidance in this article around how to then merge that new flattened object into the UDO.

And indeed, now that I take a closer look, this article concerning converting data layer objects looks like it'd sort you out perfectly..

Public