“How do I import Google Analytics data into Google Sheets?”
Digital marketer
“Can I pull data from Google Analytics?
“How do I automate Google Analytics reports to Google Sheets?”
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, 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.
I hate a super cluttered desktop. You ever experienced a desktop full of spreadsheet files? I hate them. It increases stress and productivity comes to an all-time low. The amount of time I clicked the Export CSV button is unbearable. Automation avoids all of this and is useful when you’re tracking marketing campaigns.
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.
3 – At the top of your file, click on Extensions. Then click on Add-ons. Then click on Get add-ons.
4 – Search for the Google Analytics sheets add-on. Then install it.
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.
2 – Name your report.
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.
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.
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:
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.
2 – If setup is correct, the API runs the query. You get a success notification. Click on OK.
A new Google Sheets tab is created, and that contains the report.
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, 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 End Date, same thing. Change it based on your use case in YYYY-MM-DD
format. In this example, use 2021-12-31
for December 31, 2021.
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 are separated by comma.
ga:sessions
ga:bounceRate
ga:goal1Completions
ga:transactions
5 – Under Dimensions, you may add Device category and city. These parameters are separated by comma.
ga:source
ga:medium
ga:deviceCategory
ga:city
You may leave the Order and other fields untouched for now.
6 – At the top of your file, click on Extensions. Then click on Google Analytics, then click on Run reports.
7 – If setup is correct, the API runs the query. You get a success notification. Click on OK.
8 – Go back to the Google Sheets tab that contains the report. The sheet is now updated with new data points.
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.
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.
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.
Installing The Google Sheets Add-on
1 – Go to your Google Drive workspace.
2 – Click + New then create a new Google Sheets file.
3 – At the top of your file, click on Extensions. Then click on Add-ons. Then click on Get add-ons.
4 – Search for Two Minute Reports. Then install it.
5 – You now have the extension installed on your Google Sheets file.
Import Google Analytics Data Source
1 – Launch the extension. A navigation pane on the right side appears.
2 – Click on Add + under Data Sources.
3 – Name your data source. Then select Google Analytics.
4 – Sign-in to your Google Analytics account.
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.
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 +.
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.
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.
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.
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 +.
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
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.
5 – Click on Save.
Scheduling helps when you need to report on overtime. No more copy and paste manual reports every day, or every week, or every month.
More articles on automation:
Import Facebook Page Insights to Google Sheets
Import LinkedIn Page post data to Google Sheets
Import LinkedIn Ads API data to Google Sheets
Import Google Analytics data to Google Sheets
Import Search Console Data to Google Sheets
Import WooCommerce data to Google Sheets
Import Facebook Ads data to Google Sheets
Import Google Ads data to Google Sheets
Import Mailchimp data To Google Sheets
Import Shopify data to Google Sheets
Import TikTok ads to Google Sheets
Import GA4 data to Google Sheets
Import ChatGPT to Google Sheets
Import JSON to Google Sheets
Export Gmail 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.