overriding utag_data values within the dev google chrome console ?

spujade
Visitor
spujade

Hi the Tealium community,

 

I'm new to the Tealium Community as well i've some basic knowledge about JavaScript. So for this newbie question, I would like to know if there is a way to do like a datalayer.push function or equivalent to override the values implemented by my dev into the website's datalayer.

My idea is to do 2 things:

* to show the dev what is the expected value for a specific variable directly 'live' even if i don't have any access to the CMS ==> like an overriding of the value for the variable

* to get the possibility to trigger some tags or some events (e.g via the tealium IQ extensions) directly from the dev  google chrome console 

 

I was able to do it previously with Google analytics with some websites which were using Google tag manager.

Because i don't have access to the CMS, i should only use the Google dev console

Many thanks for your help

Sébastien

3 REPLIES 3

overriding utag_data values within the dev google chrome console ?

vinayreddy
Visitor
vinayreddy

Hi @spujade ,

You can add a new custom extension of type "setdata values" in there you can select the data layer you want to modify and pass the expected value and set the scope to all tags you shold be fine and be able to see the overrided values in the data layer. 

 

VR
Highlighted

overriding utag_data values within the dev google chrome console ?

spujade
Visitor
spujade

Hi @vinayreddy,

 

Can you please provide an example code ? 

Because, if my understanding is correct, i need to create this new custom extension within Tealium IQ, whereas i would like to change my values on the fly using my google chrome debugger console ?

Thanks in advance for your tips

All the best,

Sébastien

overriding utag_data values within the dev google chrome console ?

spujade
Visitor
spujade

Hi @vinayreddy,

James Lingham from the Tealium's support team provide me the answer.

 

You should use your console & rewrite the datalayer 

// example of rewriting the datalayer driectly within the google debugger dev ==> 'console' tab

utag_data = {"site_region":"test_test","site_currency":"EUR","page_name":"Tealium test","page_type":"test_test","tealium_event":"page_view","country_name":"France_test","country_code":"FR_test"};
rewriting the datalayer with utag_data.jpg

 

 

 

 

 

 

 

 

But if you like to keep it accross your session & when you"re refreshing the page; you need to enable 

"persistent" + "enable local Overrides"

As a result you will be able to acess to the utag.js script in editing environnement on which you changing the tealium's datalayer and values.

After, you can refresh the pages and the values will be keeping the new values you defined for the datalayer's variables.

Hope my comments can help the community,

Regards, Sébastien