Google Analytics
Web and app analytics.
Verdict
Common use cases
- Audit GA4 account hierarchy across clients
- List all audiences before campaign launch
- Provision custom data sets for dashboards
- Verify account access for new team members
- Document property configurations in chat
Integration
- Vendor
- Google Analytics
- Category
- developer-tools
- Auth
- OAUTH2
- Tools
- 4
- Composio slug
google_analytics
Tools
- Create Expanded Data Set
Tool to create an expanded data set for a property. use when you need to combine specific dimensions and metrics into a custom dataset after property creation.
- Get Account
Tool to retrieve a single account by its resource name. use when you need detailed account info after confirming the account resource name (e.g., accounts/100).
- List Accounts
Tool to list all accounts accessible by the caller. use when you need to enumerate all google analytics accounts your credentials can access.
- List Audiences
Tool to list all audiences on a property. use when you need to fetch all audiences for a ga4 property after confirming its existence.
Setup
Setup guide
- 11. Open your Switchy workspace and navigate to Settings → Integrations → Browse MCP Servers. 2. Find Google Analytics in the developer-tools category and click Connect. 3. You'll be redirected to Google's OAuth consent screen — sign in with the Google account that owns or has Editor access to your Analytics properties. 4. Grant the requested scopes (analytics.readonly and analytics.edit) so Switchy can read account structures and create data sets on your behalf. 5. After authorizing, you'll return to Switchy and see a green Connected badge next to Google Analytics. 6. Open any Space, type '@Google Analytics list my accounts' and send — if the MCP replies with account names and resource identifiers, the connection is live. 7. To test data-set creation, pick a property resource name from the list and ask '@Google Analytics create an expanded data set for property properties/123456789 with dimensions city and country and metric activeUsers'.
What teammates see: by default, memories from Google Analytics are scoped to the Space (PROJECT visibility) - you can mark any memory PRIVATE or share it ORG-wide.
Works well with
Top models
Compatibility data appears once enough Spaces have used this MCP together with a given model.
How Switchy teams use it
Starter prompts
List All Accounts
@Google Analytics list all accounts I have access to and show their resource names.Open in a Space →
Fetch Property Audiences
@Google Analytics list all audiences for property properties/123456789 and include their names and membership durations.Open in a Space →
Get Account Details
@Google Analytics get details for account accounts/100 and tell me its display name and region.Open in a Space →
Create Custom Data Set
@Google Analytics create an expanded data set for property properties/987654321 with dimensions sessionSource, sessionMedium, and deviceCategory and metrics sessions and conversions.Open in a Space →
Audit Multi-Property Setup
@Google Analytics list accounts, then for each account list its properties, and for the first property list audiences and data sets.Open in a Space →
Example outputs
Illustrative - representative of the model's voice and quality, not literal recordings.
@google-analytics list all accounts I have access to and show me their property counts
Found 3 Google Analytics accounts accessible with your credentials: 'Acme Corp Marketing' (accounts/123456) with 5 properties, 'Personal Blog Analytics' (accounts/789012) with 1 property, and 'Client Project Hub' (accounts/345678) with 12 properties. Each account resource name can be used to drill into specific properties or audiences. This illustrative example shows typical account enumeration output—actual counts and names depend on your Google Analytics setup.
This example demonstrates the List Accounts tool, which is typically your first step when exploring GA4 data via MCP. Requires OAuth2 consent with analytics.readonly scope at minimum. If you manage many accounts, response size can grow—consider filtering by display name in follow-up prompts.
@google-analytics create an expanded data set for property properties/987654321 combining session source, device category, and total revenue metrics
Successfully created expanded data set 'Session Source Revenue Analysis' (properties/987654321/expandedDataSets/abc123) combining dimensions [sessionSource, deviceCategory] with metric [totalRevenue]. This dataset will now appear in your GA4 property's data exploration tools and can be queried via the Data API. Note this is an illustrative example—actual dataset ID and availability timing depend on Google's processing queue, typically ready within minutes.
This write-action example shows the Create Expanded Data Set tool, useful for pre-aggregating custom dimension/metric combinations that you query repeatedly. Requires analytics.edit scope. Be mindful of GA4's quota limits on expanded datasets per property (typically 50). Once created, datasets persist until manually deleted.
@google-analytics fetch all audiences for property properties/987654321 and summarize which ones are actively collecting data versus archived
Retrieved 8 audiences from property properties/987654321. Active audiences collecting data: 'High-Value Purchasers' (14,203 users, last updated 2 hours ago), 'Cart Abandoners' (8,891 users, last updated 1 hour ago), 'Newsletter Subscribers' (22,456 users, last updated 30 minutes ago). Archived audiences: 'Q3 Campaign Test' (archived 45 days ago), 'Legacy Mobile Users' (archived 120 days ago). Three audiences are in draft state and not yet collecting. This illustrative summary shows typical audience metadata—actual user counts and update times reflect your property's real-time traffic.
This synthesis example pairs the List Audiences tool with AI reasoning to categorize audience states. Requires analytics.readonly scope. Audience membership counts update hourly in GA4, so expect slight lag between this output and the GA4 UI. Useful for auditing audience health before launching remarketing campaigns.
Use-case deep-dives
When this MCP makes sense for small marketing teams
A 3-person marketing team at a SaaS startup runs weekly performance reviews in Switchy, pulling GA4 audience data and account-level metrics into a shared workspace. The Google Analytics MCP works here because the team already uses OAuth2 for their Google Workspace, the 4 tools cover the read-heavy workflow (list accounts, fetch audiences, check expanded data sets), and no one needs to context-switch to the GA4 UI mid-meeting. The trade-off: if your team needs to create custom reports or dimensions on the fly, this MCP only handles expanded data set creation—you'll still open the GA4 console for most configuration work. Use this MCP when your review cadence is predictable and your data structure is stable.
Why this MCP falls short for real-time dashboards
A 6-person customer success team wants to pull GA4 engagement metrics into Switchy to flag at-risk accounts during daily standups. The Google Analytics MCP isn't the right call here. The 4 tools focus on account enumeration and audience listing, not the real-time event queries or funnel analysis a CS team needs to score user health. You can list audiences and confirm which properties exist, but you can't query session duration, conversion events, or user paths—the metrics that actually predict churn. If your workflow depends on querying raw GA4 event data or building dynamic segments, you need the GA4 Reporting API or a dedicated BI tool. This MCP is for account management and audience inspection, not operational analytics.
When this MCP speeds up multi-account setup
A 10-person digital agency onboards 2-3 new clients per month, each with multiple GA4 properties. The Google Analytics MCP fits this workflow: the team uses Switchy to list all accessible accounts, confirm property structure, enumerate existing audiences, and create expanded data sets for standardized reporting—all without opening the GA4 UI for each client. OAuth2 means one auth flow per team member, and the 4 tools map cleanly to the onboarding checklist (verify access, audit audiences, provision custom datasets). The boundary: if a client's GA4 setup is messy (50+ properties, inconsistent naming), the list tools return everything and you'll still need manual triage. Use this MCP when your agency has a repeatable onboarding process and clients grant you admin-level GA4 access upfront.
Frequently asked
What does the Google Analytics MCP do in Switchy?
It lets your AI agents read account structures, list audiences, and create expanded data sets in GA4 properties. You can enumerate all accounts your OAuth token can access, pull audience definitions, and build custom dimension-metric combinations without leaving the chat. It doesn't run queries or export report data—use the GA4 API directly for that.
What OAuth scopes does the Google Analytics MCP request?
It requires read-write access to your Google Analytics account via OAuth2. You'll authenticate through Google's consent screen, which shows the exact scopes—typically analytics.readonly for listing and analytics.edit for creating data sets. Only connect accounts where you have at least Editor role on the properties you want agents to touch.
Can the MCP pull GA4 report data or run queries?
No. It handles account metadata and configuration—listing accounts, fetching audiences, creating expanded data sets—but it doesn't execute Data API queries or return traffic metrics. If you need actual report rows (sessions, conversions, page views), call the GA4 Reporting API separately or use a different integration.
How is this different from using the GA4 API directly?
The MCP wraps four specific Admin API endpoints so agents can discover accounts and configure properties in natural language. You skip writing API client code, but you lose access to the full Admin API surface and the entire Reporting API. Use this for setup tasks; use the raw API for analytics workflows.
Who on the team should connect the Google Analytics MCP?
Whoever has Editor or Administrator access to the GA4 properties your agents will touch. Viewer-only users can list accounts and audiences but can't create expanded data sets. If multiple people need it, each connects their own Google account—Switchy doesn't share OAuth tokens across team members.