1 Year Until Universal Analytics Ends - Don't Miss Your Yearly Comparison-1
1 Year Until Universal Analytics Ends – Don’t Miss Your Yearly Comparison
30/06/2022
An Introduction to Google Search Console
How to be GDPR Compliant: Checklist and Consent Mode Tools
14/07/2022

How to Import & Export GTM Lookup Tables into Spreadsheets

How to Import and Export GTM Lookup Tables to Spreadsheets

In this blog post, I want to describe one of the features of the GTM tool chrome extension that we’ve made here at MeasureMinds. This feature allows you to import and export GTM tables into spreadsheets.

Why Would Importing/Exporting GTM Lookup Tables to Spreadsheets be Useful?

Now there are multiple ways that you could use this tool and ultimately it is down to you how you do that. However, an example of where this may be useful is in situations where you have a lookup table variable filled with a huge list of domains or different country codes.

The above can be a problem because it can take a long time to change the values inside the tables within GTM manually. We find it’s much easier to copy everything to spreadsheets and change values much quicker because you can use formulas and the larger range of tools available.

But for smaller lookup tables, you won’t find as much use because you can do everything manually inside GTM.

Now you have decided whether this will be useful to you or not, we can tell you how to use it.

First of all, here’s a link to the extension:

Install the Chrome Extension

Once you have installed the extension, go to your GTM account and navigate to any lookup table variable. You will see 3 new buttons at the top:

  • Export sheets
  • Import sheets
  • Export CSV

exporting-gtm-variable-in-csv

Exporting a Lookup Table

You can now export the lookup table as a CSV file. This can be helpful if you just need to grab all the values from a huge table with lots of data. Otherwise, you’ll be clicking on each row to copy all values, which would take you lots of time.

Exporting a Lookup Table to Google Sheets

Another way is to export all values to a Google Sheet. If you are using the ‘Export Sheets’ button for the first time, the extension will ask you for Google Drive permissions:

measureminds-gtm-extention-requesting-access-to-google-drive

Grant Permissions

You need to click the Allow button. Please be aware, the extension won’t have access to your existing Google Docs. It can only create new Sheets and have access to them.

After the export is finished, you will get a modal window with a link to a Google Sheet with the values.

gtm-variable-exporting-into-google-sheet-complete

Add More Rows and Change Values if Needed

The Google Sheet will have all the table’s rows and default values. If needed, you can add more rows and change existing values.

After the export, the ‘Import Sheet’ button will become active. The extension saves the URL of the last exported sheet in storage and now you can import back all the changes.

For example, I can change all the values in the sheet and add a few rows:

gtm-container-data-in-googlesheet

Import Sheet Into Google Tag Manager Interface

Now I can go back to the GTM interface and click the ‘Import Sheets’ button.

As soon as the import is complete a modal window will open and a JSON file will be downloaded.

Then I can import the JSON file into GTM by going to the ‘admin tab’ and clicking ‘import container’:

admin-area-of-gtm-account

 

The import container interface will now open:

importing-container-into-gtm

Choose the container file and select the recently exported .json file. Select the existing workspace or create a new one.

Please don’t forget to select the ‘merge’, not the ‘overwrite’ option as we only need to change one variable. If you select ‘overwrite’, it will delete all other tags, variables and triggers. But if you do make this mistake, you can always go back to the previous GTM version.

Now you have all the changes available to you in GTM.

gtm-variable-configuration-setting

The import option is available only for a Google Sheet export.

This feature can be very handy if you want to bulk update GTM using Google Sheets macros or if you want to blend values with values from other Sheets.

I hope this extension saves you time and makes working with large GTM tables not so painful.

Please share your opinion. Do you find this export/import useful? What did you use it for? What other features do you need for your everyday GTM tasks? We might be able to make an app for you!

Phil Pearce
Follow me
0 0 votes
Article Rating
Phil Pearce
Phil Pearce
Phil is an analytics expert, author, and web analyst. He's also the Analytics Director & Founder of Google Analytics, Google Tag Manager, Google Ads and CRO agency, MeasureMinds Group. Over the past 20+ years, Phil has helped clients improve their analytics and search engine marketing through the introduction of new tools and disruptive techniques.
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Inline Feedbacks
View all comments
07723012727
0
Would love your thoughts, please comment.x
()
x