- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
03-13-2019 05:31 AM
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
03-20-2019 01:55 PM
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.
03-21-2019 01:42 AM
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
03-25-2019 06:28 AM
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"};
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
02-11-2020 09:31 AM
02-11-2020 08:42 PM
@jayvora place a line break on the first line inside utag.js file.
When it breaks, in the console check for contents of utag_data
If it is missing, create it. Then modify the data directly. Example:
utag_data = utag_data || {};
utag_data.site_region = "test";
Then unpause the breakpoint and let it run through.
Hope that helps!
Copyright All Rights Reserved © 2008-2023