Import Google Analytics Data to Google Sheets

“How do I import Google Analytics data into Google Sheets?”
“Can I pull data from Google Analytics?
“How do I automate Google Analytics reports to Google Sheets?”

Digital marketer

Reports from Google Analytics are not straightforward. An analyst might think that it’s as simple as one click to “do everything”. But GA is more than meets the eye. It may be an off-the-shelf tool, but reporting is a nightmare, especially connecting data to Google Sheets.

You CAN import Google Analytics data from the API to Google Sheets. You do copy and paste, delete rows manually until your eyes and fingers can’t take it anymore. It’s an unbearable nightmare. This article teaches how to automate reporting step-by-step.

Note: This is for Google Analytics 3 (Universal Analytics), not Google Analytics 4.

Why Pay for Automation at All?

Automations solve huge problems in organizations. So, most automation tools are paid products. Yes, you can do everything manually for free to save money. But in perspective, instead, you might want to spend a little to save time. The number of hours that you take back to avoid hellish and repetitive work is worth the price.

busy desktop

I hate a super cluttered desktop. Ever experienced a desktop (or Downloads folder) full of spreadsheet files? I hate them. It increases stress and decreases productivity. The amount of time I clicked the Export CSV button is unbearable. Automation avoids all this.

How to Import Google Analytics to Google Sheets

This article shows two options on how to import Google Analytics to Google Sheets. Option 1 is using a FREE Google Sheets add-on. Option 2 is using a PAID Google Sheets add-on. In either option, you need a spreadsheet to start.

Option 1: Official Google Sheets Add-on (Free)

First option is to use the official Google Analytics Spreadsheet add-on. This is free and is the only free option in this article.

Installing The Google Sheets Add-on

1 – Go to your Google Drive workspace.

2 – Click on + New then create a new Google Sheets file. Name your Google Sheets as well.

tmr 0
tmr 00

3 – At the top of your file, click on Extensions. Then click on Add-ons. Then click on Get add-ons.

sheets 01

4 – Search for the Google Analytics sheets add-on. Then install it.

ga sheets 09

Set Up Google Analytics Data Source

1 – Launch the add-on. Click on Extensions. Then click on Google Analytics. Then click on Create new report. A navigation pane on the right side appears.

ga sheets 10

2 – Name your data query.

3 – Select the Google Analytics Account, Property and View where you want to get data from. Note: Make sure you’re familiar with the names of your Google Analytics setup.

ga sheets 11

4 – Under Metrics, select the metrics you want to import. In this example, add Sessions.

5 – Under Dimensions, select the dimensions you want to import. In this example, add Source and Medium.

You may leave Segments empty for now.

ga sheets 12e

5 – Click on Create Report.

Note: This doesn’t create the actual report just yet. This section only syncs up the data sources. The results looks like this:

ga sheets 13b

Running Google Analytics Reports

This allows the API (application programming interface) to get data from Google Analytics without errors.

1 – At the top of your file, click on Extensions. Then click on Google Analytics, then click on Run reports.

ga sheets 14

2 – If setup is correct, the API runs the query. You get a success notification. Click on OK.

ga sheets 15

A new Google Sheets tab is created, and that contains the report.

ga sheets 16

Running Other Google Analytics Reports

This part becomes tricky since you need to replace some of the fields based on your use cases.

1 – Go back to Report Configuration sheets tab. This is where you replace some of the fields.

2 – For Start Date, you may change it based on your use case in YYYY-MM-DD format. In this example, use 2021-01-01 for January 01, 2021.

3 – For Start Date, you may change it based on your use case in YYYY-MM-DD format. In this example, use 2021-12-31 for December 31, 2021.

ga sheets 17

For Metrics and Dimensions, you need to consult and understand the API documentation of Google Analytics.

4 – Under Metrics, you may add Bounce rate, Goal conversions, or eCommerce transactions. These parameters translate to:

ga:sessions,ga:bounceRate,ga:goal1Completions,ga:transactions

5 – Under Dimensions, you may add Device category and city. These parameters translate to:

ga:source,ga:medium,ga:deviceCategory,ga:city

You may leave the Order and other fields untouched for now.

ga sheets 18

6 – At the top of your file, click on Extensions. Then click on Google Analytics, then click on Run reports.

ga sheets 14

7 – If setup is correct, the API runs the query. You get a success notification. Click on OK.

ga sheets 15

8 – Go back to the Google Sheets tab that contains the report. The sheet is now updated with new data points.

ga sheets 19

Viola! You imported your Google Analytics data to Google Sheets!

Schedule Google Analytics Reports

Google Analytics sheets add-on has a scheduling function. This means the spreadsheet refreshes the acquired data from the API.

1 – At the top of your file, click on Extensions. Then click on Google Analytics, then click on Schedule reports.

ga sheets 20

2 – Tick Enable reports to run automatically.

3 – Select the schedule for your use cases. You may select every hour, every day, every week, or every month.

ga sheets 21

Scheduling helps when you need to report on events and engagements in the future. No more copy and paste every day, or every week, or every month.

Option 2: Third-Party Google Sheets Add-on (Paid)

Second option is to use a third-party Google Sheets add-on. Use Two Minute Reports for this example. TMR imports data from the API directly to Google Sheets in minutes. Another Google Sheets add-on to use is Supermetrics.

two minute reports 01

Installing The Google Sheets Add-on

1 – Go to your Google Drive workspace.

2 – Click on + New then create a new Google Sheets file.

tmr 0
tmr 00

3 – At the top of your file, click on Extensions. Then click on Add-ons. Then click on Get add-ons.

sheets 01

4 – Search for Two Minute Reports. Then install it.

tmr 1

5 – You now have the add-on installed on your Google Sheets file.

sheets tmr 01

Import Google Analytics Data Source

1 – Launch the add-on. Click on Extensions. Then click on Two Minute Reports, then Launch. A navigation pane on the right side appears.

sheets tmr 02

2 – Click on Add + under Data Sources.

tmr 4

3 – Name your data source. Then select Google Analytics.

ga sheets 01

4 – Sign-in to your Google Analytics account.

ga sheets 02

5 – Link your GA account to the tool. To be sure, allow and give full access to the tool for seamless integration.

Make sure the account you’re giving access to has access to Google Analytics.

6 – Go through the login process until the tool instructs you to close the tab since the sign-in is successful.

ga4 to sheets 03 template

Import Google Analytics Data Query

This point in the process is importing data from the Google Analytics API to the spreadsheet.

1 – Click on the burger icon. Then click on Data Queries.

2 – Click on Add +.

tmr 11

3 – Name your data query. Then find the Google Analytics data source you imported earlier.

4 – Save on Sheet is the location of the sheet where the data is imported to, so make you know what your tabs are named after. Add A1 under Cell in this example.

ga sheets 03

5 – Under Query, select the Google Analytics account you want to get data from. Then select the correct Property and View.

6 – Under Metrics, select the metrics you want to import. In this example, we use Sessions and Goal 1 Completions.

7 – Under Dimensions, select the dimensions you want to import. In this example, we use Medium, Source, and Device category.

8 – Under Date, Select the date range to your use case. In this example, it’s the Last 6 months.

As for the Segments, Filters and other data options, you may leave them unticked or empty for now.

ga sheets 04

9 – Click on the Run query button.

Viola! You imported your Google Analytics data to Google Sheets much quicker! You can create reporting templates from here depending on your business needs.

ga sheets 06

In this example, we imported website data from Google Analytics. The number of Sessions and Conversions are now within reach for reporting. You can adjust the parameters depending on your use cases like Device category.

Schedule Google Analytics Reports

Two Minute Reports has a scheduling function. This means the spreadsheet refreshes the acquired data from the API. Reports are automated even more.

1 – Click on the burger icon. Then click on Schedule Refresh.

2 – Click on New +.

tmr fb5

3 – Once inside, you can set the terms of the report schedule.

-Name
-Repeats: This is where you set how often the data refresh happens. Two Minute Reports can do hourly refreshes.
-Timezone

tmr li3

4 – You can also set the notification terms. Two Minute Reports can email you a PDF or Excel of the data. You can also decide to have the email contain the sheet content in the email body.

tmr fb7
tmr fb8

5 – Click on Save.

Scheduling helps when you need to report on events and engagements overtime. No more copy and paste every day, or every week, or every month. Congratulations! You’re automating Google Analytics reporting in Google Sheets!

More articles on automation:
Import GA4 data to Google Sheets
Import Shopify data to Google Sheets
Import Google Ads data to Google Sheets
Import WooCommerce data to Google Sheets
Import Facebook Page Insights to Google Sheets
Import LinkedIn Ads API data to Google Sheets
Import Facebook Ads data to Google Sheets
Import Mailchimp data To Google Sheets
Export Gmail to Google Sheets
Import JSON to Google Sheets

Conclusion: Create Google Analytics reports quicker

This is one of the many add-ons to connect Google Analytics data in Google Sheets. These are the current methods to do API integrations between third-party tools. These add-ons cost money, but the benefits outweigh more.

Avoid import and export spreadsheet hell. Maintain everything step-by-step in Google Sheets with tools if needed. Stop wasting time on repetitive tasks. Start focusing on important stuff that impacts the business. Hire a digital analyst to help you.


About The Author