Is there a way to export the data layer list? Would like to get the name and description in a CSV or excel file?

Gold Contributor
Gold Contributor
 
20 REPLIES 20

Is there a way to export the data layer list? Would like to get the name and description in a CSV or excel file?

Employee Emeritus

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!

Is there a way to export the data layer list? Would like to get the name and description in a CSV or excel file?

Tealium Employee

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".

Is there a way to export the data layer list? Would like to get the name and description in a CSV or excel file?

Gold Contributor
Gold Contributor
Thanks, I guess that will work for now.

Is there a way to export the data layer list? Would like to get the name and description in a CSV or excel file?

Gold Contributor
Gold Contributor
Thanks for sharing this.

Is there a way to export the data layer list? Would like to get the name and description in a CSV or excel file?

Bronze Contributor
Bronze Contributor

Is there any latest solution for this? I'm getting error for utui is not defined

Is there a way to export the data layer list? Would like to get the name and description in a CSV or excel file?

Employee Emeritus

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? 

Remember to give me a kudo if you like my post! Accepting my post as a solution is even better! Also remember that search is your friend.

Is there a way to export the data layer list? Would like to get the name and description in a CSV or excel file?

Tealium Employee

@jariwalayash

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

Is there a way to export the data layer list? Would like to get the name and description in a CSV or excel file?

Moderator
Moderator

Wow! This is so cra-mazing @dan_george! #InAwe

If you liked it then you should have put a kudo on it!

Is there a way to export the data layer list? Would like to get the name and description in a CSV or excel file?

Bronze Contributor
Bronze Contributor

@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!

Is there a way to export the data layer list? Would like to get the name and description in a CSV or excel file?

Tealium Expert
Tealium Expert

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!

Tealium Expert

Is there a way to export the data layer list? Would like to get the name and description in a CSV or excel file?

Tealium Employee

@mitchellt

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?

Is there a way to export the data layer list? Would like to get the name and description in a CSV or excel file?

Tealium Expert
Tealium Expert

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. 

 

Screen Shot 2018-05-15 at 10.09.49 AM.png

Tealium Expert

Is there a way to export the data layer list? Would like to get the name and description in a CSV or excel file?

Tealium Employee

@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

Is there a way to export the data layer list? Would like to get the name and description in a CSV or excel file?

Tealium Expert
Tealium Expert

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....

 

Tealium Expert

Is there a way to export the data layer list? Would like to get the name and description in a CSV or excel file?

Tealium Employee

@mitchellt not at all!

I think what you may be looking for is the Universal Tag (UTAG) Debugger.

Is there a way to export the data layer list? Would like to get the name and description in a CSV or excel file?

Tealium Expert
Tealium Expert

Yes, I think you're right @dan_george - it's the closest thing to what I want.  Thanks!

Tealium Expert

Is there a way to export the data layer list? Would like to get the name and description in a CSV or excel file?

Community Manager
Community Manager

@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

Remember to "Accept as Solution" when your question has been answered and to give kudos to helpful replies.

Is there a way to export the data layer list? Would like to get the name and description in a CSV or excel file?

Tealium Expert
Tealium Expert

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.

 

 

Tealium Expert

Is there a way to export the data layer list? Would like to get the name and description in a CSV or excel file?

Bronze Contributor
Bronze Contributor

Thanks Dan! Exactly what I was looking for!

Is there a way to export the data layer list? Would like to get the name and description in a CSV or excel file?

Bronze Contributor
Bronze Contributor

is there a way to modify the console code to include AudienceStream attributes in the export?

Public