Overview
Connect Google Analytics by authorizing Mistle with a Google OAuth client that you create in Google Cloud. Mistle uses the OAuth authorization code flow to obtain Google access tokens. The local Google Analytics MCP server runs inside the sandbox runtime boundary and calls the Google Analytics Admin API and Google Analytics Data API through Mistle-managed egress, where Mistle injects the connected OAuth token into those outbound requests. The Google Analytics integration is read-only. Mistle requests only this OAuth scope:https://www.googleapis.com/auth/analytics.readonly
Prerequisites
Before connecting Google Analytics:- Create or choose a Google Analytics 4 property.
- Make sure the Google account that will authorize Mistle has access to that Analytics account or property.
- Create or choose a Google Cloud project that will own the OAuth client.
- If your Google Auth Platform app is in testing mode, add the authorizing Google account as a test user.
Enable Google Analytics APIs
Enable the Google Analytics Admin API and Google Analytics Data API in the Google Cloud project that owns the OAuth client:PROJECT_ID with the Google Cloud project ID.
Configure OAuth Consent
In Google Auth Platform, configure branding, audience, and data access for the OAuth app. Add this scope:https://www.googleapis.com/auth/analytics.readonly
Create A Google OAuth Client
Create a Web application OAuth client in Google Auth Platform.- In Mistle, open Integrations and choose Google Analytics.
- Copy the callback URL shown by Mistle.
- In Google Cloud, open Google Auth Platform > Clients.
- Create an OAuth client with Application type set to Web application.
- Add the Mistle callback URL to Authorized redirect URIs.
- Create the client and copy its Client ID and Client secret.
- Return to Mistle, enter the client ID and client secret, and click Connect Google Analytics.
- Complete the Google consent flow with the Google account that should back the connection.
Connect Google Analytics To A Sandbox Profile
After the Google Analytics connection is active:- Open the sandbox profile that should use Google Analytics.
- Add the Google Analytics integration connection to the profile.
- In Resources & Tools, select the Google Analytics MCP server.
- Publish the profile version.