Skip to main content

Connect to Google Analytics

Learn how to connect the Google Analytics APIs to Retool.

beta

The Google Analytics integration is in beta. Navigate to the Beta settings to enable.

You can connect to Google Analytics and make it available as a resource in Retool. Once complete, your users can send interactive messages, update user groups, manage channels, and much more. Retool supports connecting to the Google Analytics Management API v3 and the Analytics Reporting API v4.

Requirements

All users for Retool organizations on Free or Team plans have global Edit permissions and can add, edit, and remove resources. If your organization manages user permissions for resources, you must be a member of a group with Edit all permissions.

Self-hosted deployments must create a Google OAuth 2.0 client and provide the credentials when configuring this resource.

1. Create a new resource

Sign in to your Retool organization and create a new Google Analytics resource.

2. Configure the resource

Provide the necessary details to configure the resource so Retool can connect to Google Analytics. Not all settings are required, but refer to the Google Analytics documentation to learn what you need.

General

These settings configure the name and location of the resource within Retool.

Name

The name to use for the resource (e.g., Google Analytics).

Folder

The folder in which to save the resource.

Description

A brief description of the resource (e.g., Marketing analytics).

Credentials

These settings configure how Retool authenticates to Google Analytics.

Type

Choose whether to grant Read and write or Read only access to Retool. Retool uses this option to determine the scopes passed with the OAuth request.

Self hosted setup

note

The Client ID and Client secret fields are only required on self-hosted deployments.

Enter the Client ID and Client secret for your OAuth2 client, and confirm your Google Auth client uses the callback URL in the OAuth callback URL field.

Share credentials between users

For resources using OAuth 2.0, Retool provides the option to share credentials between users or to require each user to authenticate using their own credentials. The Google Analytics resource defaults to sharing credentials between users. If you want each app user to log in with their own Google account, uncheck Share credentials between users.

To learn more about OAuth 2.0 credentials in Retool, refer to Retool's API Authentication documentation.

3. Connect with OAuth

After you've finished setting up your Google Analytics resource, click the Connect with OAuth → button on the resource settings page to authenticate.

4. Save the resource

Click Create resource to complete the setup. You can then click either Create an app to immediately start building a Retool app or Back to resources to return to the list of resources.

Wrap up

Your Google Analytics resource is now ready to use. See the Google Analytics query guide to learn how to query your resource.