Highlighted

Can we pass all the metadata from the page as JavaScript variables? instead of sending them as the data objects in the utag_data? what will be the implications?

Rookie Contributor
 
8 REPLIES 8
Highlighted

Can we pass all the metadata from the page as JavaScript variables? instead of sending them as the data objects in the utag_data? what will be the implications?

Employee Emeritus
As long as the meta tags have a "name" attribute Tealium will automatically capture the meta variables for you. Tealium will capture the "name" attribute as the variable name and the "content" attribute as the value of that variable. For example: <meta property="og:site_name" name="pageType" content="category" /> The variable Tealium will capture is: meta.pageType = "category" Then within the UI on the Data Sources Tab, you can add a variable called "pageType" and select Meta Tag from the drop down. Then you will be able to use this variable in Load Rules, Mappings and Extensions. Hope this helps!
Highlighted

Can we pass all the metadata from the page as JavaScript variables? instead of sending them as the data objects in the utag_data? what will be the implications?

Hello Suganya, Here are a few advantages of using a Data Layer: 1) Data layer greatly assists in a seamless vendor migration. 2) It allows you to document all dimensions and metrics in one common place which makes implementation easier. 3) It doesn't get affected by Site redesigns and the possibility of certain meta data or JavaScript variables getting removed. Hope it helps. Rohan
Highlighted

Can we pass all the metadata from the page as JavaScript variables? instead of sending them as the data objects in the utag_data? what will be the implications?

Rookie Contributor
Thanks Rohan
Highlighted

Can we pass all the metadata from the page as JavaScript variables? instead of sending them as the data objects in the utag_data? what will be the implications?

Rookie Contributor
Thanks Jared, Can you explain what happens in case of multiple values in the same variable. example multiple product id's in the product id variable. Thanks again for your help and it is super helpful.
Highlighted

Can we pass all the metadata from the page as JavaScript variables? instead of sending them as the data objects in the utag_data? what will be the implications?

Employee Emeritus
As a best practice, it is recommended that you pass all product values into the same variable. i.e. product_id=["prodID1","prodID2","prodID3"] Or it can be a string. i.e. product_id="prodID1,prodID2,prodID3" Tealium will parse the product variables and send them to the individual tag vendors. You can pass other variables that contain multiple values as well and use an extension to parse it out as needed. If the above doesn't help you can send an example and we can take a look at your specific use case. Thanks
Highlighted

Can we pass all the metadata from the page as JavaScript variables? instead of sending them as the data objects in the utag_data? what will be the implications?

Rookie Contributor
What about meta tags that don't have a "name" attribute? For example: meta property="og:locale" content="en_US" Is there a way to include this info in the data layer and map, for example, to a Google Analytics Custom Variable? Thanks, JY
Highlighted

Can we pass all the metadata from the page as JavaScript variables? instead of sending them as the data objects in the utag_data? what will be the implications?

Employee Emeritus
John, There was an update to the utag.js that will check for the "name" attribute first, but if that is not available it will use the "property" attribute instead. The Meta Tag that you have used as an example will get picked up automatically by Tealium like: og:locale: "en_US" All that is needed to make this available for use within TiQ is adding a new Data Source titled "og:local" and selecting Meta Tag as the Data Source Type. Then this Data Source will be available for mappings within TiQ.
Highlighted

Can we pass all the metadata from the page as JavaScript variables? instead of sending them as the data objects in the utag_data? what will be the implications?

Rookie Contributor
Thanks for the response, Jared! We've been working with this, but still no success. The closest option to 'Meta Tag' in Data Source Type is 'Meta Data Elements' so I assume that is what you are referring to. We are double-checking the mappings but have them set up the same as for our other data sources. Will let you know if we have any more specific questions. Thanks, JY