Skip to content

Google Analytics connects with OAuth 2.0 through Truto's Google app or your own Google Cloud OAuth client.

Install the Google Analytics integration

Install Google Analytics from Available integrations in each environment you connect accounts from.

Use your own Google Analytics OAuth app

Truto connects Google Analytics accounts through its own OAuth app, so this step is optional. To show your own app on the consent screen instead:

  1. Create an OAuth client in the Google Cloud console and add https://api.truto.one/connect/googleanalytics/callback as its redirect URL. If you use a redirect URL on your own domain, add that URL instead.
  2. Enter the app's Client ID and Client Secret on the installed Google Analytics integration. See Overriding OAuth credentials.

By default, Truto asks Google Analytics for these scopes. The Connect UI lists them under Permissions required, and you can change them when you override the OAuth credentials.

  • https://www.googleapis.com/auth/analytics.readonly
  • https://www.googleapis.com/auth/analytics.manage.users.readonly
  • https://www.googleapis.com/auth/userinfo.email
  • https://www.googleapis.com/auth/userinfo.profile
  • openid

Enable the same scopes on your app. If your app allows fewer, change the list under Use your own OAuth settings → Scopes on the installed integration's Configuration tab to match.

Connect a Google Analytics account

  1. In Integrated Accounts, click Connect Account. Click Connect Account
  2. Enter a Tenant ID (your customer's ID; Truto creates the tenant if it is new), or pick one under Existing tenant (optional). Check the Environment and the Region (where Truto places the account; Western North America by default). To open the link straight on Google Analytics, pick it under Advanced settings → Integration (optional). Click Get connection link. Get connection link
  3. Click the open-in-new-tab button, or click Copy and send the link to your customer so they connect their own Google Analytics account. The link works for 7 days, until an account is connected with it. Share connection link
  4. Click Get Started if it shows, then select Google Analytics. Select Google Analytics
  5. Log in to your Google account and allow access to Truto.
  6. Close the tab when you see Connection successful. The new account appears under Integrated Accounts. Click its Account ID to see its details and make API calls.