Highlighted

Updating Datalayer in Webpage

Rookie Contributor

Hi All,

I have question regarding Datalayer.

So if i create a UDO variable Datalayer tab of Tealium iq, will taht get value directly from website once i publish it or i need to ask my dev team to populate the values on page with building some logic and then update it on every page load.

Thanks in Advance

 

3 REPLIES 3
Highlighted

Updating Datalayer in Webpage

Gold Contributor
Gold Contributor

Hi @ashishrtd2 ,

You should ask your dev team to pass the values in the dataLayer named utag_data.

You could get the syntx of utga_data from codecenter.

The datalayer name from webpage should match the UDO variable created in the Tealium, then only you can use in the tags. If not the values will not be captured.

Example :

from webpage

var utag_data = {

'page_name' : 'home',

'page_url' : 'www.example.com'

};

then you should create a UDO varibale with same name 'page_name' and 'page_url'

 

Please go through the below link for better understanding of dataLayer:

 https://community.tealiumiq.com/t5/Data-Layer/An-Introduction-to-the-Data-Layer/ta-p/15885

 

Thanks

Its Not Who I am Underneath, but What I Do That Defines Me
Highlighted

Updating Datalayer in Webpage

Rookie Contributor

Creating a UDO variable in the Data Layer tab does nothing but tells Tealium the name of the variable to pull from the actual data layer of the page. (utag_data). 

So it will only get the value from the page if it is set in utag_data and the variable name are identical.

And yes, you will need to ask the dev teams to populate utag_data on every page that you're adding utag.js too.  Also, utag_data needs to be defined and set before adding utag.js.  Once utag.js is loaded, it will look for utag_data and pull in any matching variables so that you can use them in the extensions and tags tabs.

 

Highlighted

Updating Datalayer in Webpage

Tealium Expert
Tealium Expert

Make sure you have the piece of code for your IQ profile on every page on your site. The code you get from Code Center in IQ (menu top right corner). Make sure the exact URL in the code to utag.js matches the environment (dev, qa, prod).

If you want to use data from the rest of the website, create a corresponding variable in the datalayer with exactly the same name.

Other variables used only within TealiumIQ tags or scripts, e g to pass data to a pixel, can have any name following a name convention of your choice.