Search API Connector Documentation


Import Google Analytics Management Data to Google Sheets


In this guide, we’ll walk through how to pull data from the Google Analytics Management API directly into Google Sheets, using the API Connector add-on for Sheets. The Google Analytics Management API enables programmatic access to Google Analytics configuration data, such as lists of all the accounts, properties, and views that you have access to.


Before You Begin

Click here to install the API Connector add-on from the Google Marketplace.

Part 1: Connect to the Google Analytics Management API

If you haven’t connected API Connector to the Google Analytics Management API before, you’ll first need to initiate the connection as follows:

  1. Open up Google Sheets and click Extensions > API Connector > Manage Connections.
  2. In the list of available connections, find “Google Analytics” and click Connect.
  3. You will be directed to and asked to allow API Connector to view your Google Analytics user permissions and your Google Analytics data. Click Allow.
  4. You’ll then be returned to your Google Sheet, and can verify that your Google Analytics connection is active in the Connections screen.

Part 2: Create Your Google Analytics Management API Request

For our first request, we’ll get a list of all the Google Analytics accounts you have access to.

  • Base URL:
  • Endpoint: /accounts/

Putting it all together, we get the full API Request URL:

Part 3: Pull Google Analytics Management API Data into Sheets

We can now enter our values into API Connector and import your account configuration data into Google Sheets.

  1. Open up Google Sheets and click Exensions > API Connector > Open.
  2. In the Create screen, enter the API URL we just created
  3. We don’t need any headers, so just leave that section blank.
  4. Choose ‘Google Analytics’ from the authentication dropdown.
  5. Create a new tab and click Set current to use that tab as your data destination.
  6. Name your request and click Run. A moment later you’ll see metadata about your Google Analytics accounts populate your sheet.

Part 4: More Example API Requests

  • View metadata about all the properties within an account (substitute in the account ID found in the field from the prior request.
  • List the views you have access to within a property

Part 5: API Documentation

Official API documentation:

Previous Import Google Analytics Data to Google Sheets
Next Import Google Calendar Data to Google Sheets

Leave a Comment

Table of Contents