- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
05-02-2014 11:23 AM
05-02-2014
11:36 AM
- last edited on
05-16-2018
02:36 PM
by
TealiumJustin
I'm assuming you're talking about the data layer list from within Tealium iQ. If so, an example of the utag.js and utag_data code can be copied from the Code Center. It displays sample JavaScript code showing the utag_data object with all variables listed. Cheers!
05-02-2014
12:12 PM
- last edited on
11-14-2019
04:31 PM
by
TealiumJustin
For the technically savy...to get this into a CSV, run this command in the Console of the Developer Tools of your favorite browser (preferably Chrome/Firefox/Safari).
var a=utui.data.define;var output="";for(i in a){output+='"'+a[i].name+'","'+a[i].type+'","'+a[i].description+'"\n';}console.log(output);
This will output a CSV style format to the console. You can copy/paste the result and use at your convenience. To get this into Excel, copy and paste the result into a text file. You can then import the text file into Excel. The original data type will be "Delimited" and the delimiter will be a "Comma".
05-02-2014 01:17 PM
05-02-2014 01:17 PM
08-24-2017 01:43 PM
Is there any latest solution for this? I'm getting error for utui is not defined
08-24-2017 09:42 PM
Hello @jariwalayash. Great question. There is an official list of all our Tealium Tools.
I am not sure about a data layer exporter, however. The Variable Mappings Exporter sounds like it might come close?? Or not. LOL
Perhaps @dan_george might know of something better?
08-24-2017
09:43 PM
- last edited on
05-16-2018
02:39 PM
by
TealiumJustin
Note, this code is to be run from within your Tealium iQ account. It exports the variables defined in the Data Layer tab to a CSV format.
Here is the latest browser bookmark you can add, I've used it twice in the last week successfully.
(Note: below change : to the colon character :)javascript: (function() {var type = {cp: "First Party Cookie",js: "UDO Variable",js_page: "JavaScript Variable",meta: "Meta Data Element",qp: "Querystring Parameter"};var output = "";for (i in utui.data.define) {if (utui.data.define[i].type != "va") {output += '"' + utui.data.define[i].name + '","';for (t in type) {if (t == utui.data.define[i].type) {output += type[t] + '","';}}output += utui.data.define[i].title + '","';output += utui.data.define[i].description + '"\n';}}console.log(output);})();
If you want to just run the code directly from the developer console you can use:
var type = {cp: "First Party Cookie",js: "UDO Variable",js_page: "JavaScript Variable",meta: "Meta Data Element",qp: "Querystring Parameter"};var output = "";for (i in utui.data.define) {if (utui.data.define[i].type != "va") {output += '"' + utui.data.define[i].name + '","';for (t in type) {if (t == utui.data.define[i].type) {output += type[t] + '","';}}output += utui.data.define[i].title + '","';output += utui.data.define[i].description + '"\n';}}console.log(output);
Please give one a try and let me know your result.
Cheers,
-Dan
08-24-2017 09:50 PM
Wow! This is so cra-mazing @dan_george! #InAwe
08-25-2017 06:46 AM
@dan_george This is awesome. 2nd code for console worked for me but 1st code for debugger is giving some error and not able to save that script.
Thank you!
05-14-2018 03:24 PM
Hi @dan_george - I would like to try the bookmarklet and javascript snippet but I get the utui not defined errors that @jariwalayash mentioned. Any ideas, please and thanks!
05-14-2018 04:00 PM
Interesting, I may need a screenshot of what you're seeing.
Also, when you add the boomkark please make sure you change the : to an actual colon (thank TLC).
Lastly, how many variables are in the UDO?
05-15-2018 07:12 AM
Thanks for checking in, @dan_george - attaching a screenshot which should answer all the questions you posed. I caught the : issue because the bookmark manager griped when I tried to save.
05-15-2018 09:00 AM
@mitchellt Ohh! My example is to export the TiQ Data Layer Tab. utui
is only defined within the UI.
Apologies for another question, but I'm trying to learn what is being accomplished by copying from the Tealium Tool? I ask because for the most part the Common Bundles include many of the data layer variables needed and will be declared in the proper type.
However, if you need to import non UDO vars, you can go back to the Data tab of Web Companion and drill into, for example "Cookies", then click "+Add" button next to the cookie name to add, then Save them to the profile all from the Tealium Tool.
Cheers,
-Dan
05-15-2018 10:38 AM
Hahaha @dan_george I now wish I could hide under a rock. :)
I was hoping that this bookmarklet would take a snapshot of the data layer and any other variables present on any page where Tealium utag was installed. I'd like to do that for an audit process. Do you know of any such tool - or perhaps I need to cobble one together for myself....
05-15-2018 11:23 AM
@mitchellt not at all!
I think what you may be looking for is the Universal Tag (UTAG) Debugger.
05-15-2018 11:25 AM
Yes, I think you're right @dan_george - it's the closest thing to what I want. Thanks!
05-15-2018 01:03 PM
@mitchellt @dan_george Here's a simpler tool from many years ago. It only displays the contents of utag_data
, but it can be helpful in certain scenarios where you just want a quick way to see the UDO in a format that's easily copied to your clipboard.
Simple Tealium Data Layer (UDO) Viewer Bookmarklet
05-16-2018 08:49 AM - edited 05-16-2018 08:50 AM
Thanks so much @TealiumJustin - can we mark your contribution as a "second solution" on this topic? Because now there's a way to attack from both sides, web side on-site and TealiumIQ UI-side.
06-22-2018 02:39 AM
Thanks Dan! Exactly what I was looking for!
11-13-2019 11:17 AM
Copyright All Rights Reserved © 2008-2023