Automate Google Analytics 4 (GA4) reporting and property management through Composio's Google Analytics toolkit via Rube MCP.
Toolkit docs: composio.dev/toolkits/google_analytics
RUBE_MANAGE_CONNECTIONS with toolkit google_analytics
RUBE_SEARCH_TOOLS first to get current tool schemasGet Rube MCP: Add https://rube.app/mcp as an MCP server in your client configuration. No API keys needed — just add the endpoint and it works.
RUBE_SEARCH_TOOLS respondsRUBE_MANAGE_CONNECTIONS with toolkit google_analytics
When to use: User wants to discover available GA4 accounts and properties
Tool sequence:
GOOGLE_ANALYTICS_LIST_ACCOUNTS - List all accessible GA4 accounts [Required]GOOGLE_ANALYTICS_LIST_PROPERTIES - List properties under an account [Required]Key parameters:
pageSize: Number of results per pagepageToken: Pagination token from previous responsefilter: Filter expression for properties (e.g., parent:accounts/12345)Pitfalls:
When to use: User wants to query metrics and dimensions from GA4 data
Tool sequence:
GOOGLE_ANALYTICS_LIST_PROPERTIES - Get property ID [Prerequisite]GOOGLE_ANALYTICS_GET_METADATA - Discover available dimensions and metrics [Optional]GOOGLE_ANALYTICS_CHECK_COMPATIBILITY - Verify dimension/metric compatibility [Optional]GOOGLE_ANALYTICS_RUN_REPORT - Execute the report query [Required]Key parameters:
property: Property ID (e.g., 'properties/123456')dateRanges: Array of date range objects with startDate and endDate
dimensions: Array of dimension objects with name fieldmetrics: Array of metric objects with name fielddimensionFilter / metricFilter: Filter expressionsorderBys: Sort order configurationlimit: Maximum rows to returnoffset: Row offset for paginationPitfalls:
offset is for result pagination, not date paginationWhen to use: User needs multiple different reports from the same property in one call
Tool sequence:
GOOGLE_ANALYTICS_LIST_PROPERTIES - Get property ID [Prerequisite]GOOGLE_ANALYTICS_BATCH_RUN_REPORTS - Execute multiple reports at once [Required]Key parameters:
property: Property ID (required)requests: Array of individual report request objects (same structure as RUN_REPORT)Pitfalls:
When to use: User wants cross-tabulated data (rows vs columns) like pivot tables
Tool sequence:
GOOGLE_ANALYTICS_LIST_PROPERTIES - Get property ID [Prerequisite]GOOGLE_ANALYTICS_RUN_PIVOT_REPORT - Execute pivot report [Required]Key parameters:
property: Property ID (required)dateRanges: Date range objectsdimensions: All dimensions used in any pivotmetrics: Metrics to aggregatepivots: Array of pivot definitions with fieldNames, limit, and orderBys
Pitfalls:
dimensions
fieldNames reference dimension names from the top-level listlimit and orderBys
When to use: User wants to analyze conversion funnels and drop-off rates
Tool sequence:
GOOGLE_ANALYTICS_LIST_PROPERTIES - Get property ID [Prerequisite]GOOGLE_ANALYTICS_RUN_FUNNEL_REPORT - Execute funnel analysis [Required]Key parameters:
property: Property ID (required)dateRanges: Date range objectsfunnel: Funnel definition with steps arrayfunnelBreakdown: Optional dimension to break down funnel byPitfalls:
When to use: User wants to view or manage conversion events (key events) in GA4
Tool sequence:
GOOGLE_ANALYTICS_LIST_PROPERTIES - Get property ID [Prerequisite]GOOGLE_ANALYTICS_LIST_KEY_EVENTS - List all key events for the property [Required]Key parameters:
parent: Property resource name (e.g., 'properties/123456')pageSize: Number of results per pagepageToken: Pagination tokenPitfalls:
Account name -> Account ID:
1. Call GOOGLE_ANALYTICS_LIST_ACCOUNTS
2. Find account by displayName
3. Extract name field (e.g., 'accounts/12345')
Property name -> Property ID:
1. Call GOOGLE_ANALYTICS_LIST_PROPERTIES with filter
2. Find property by displayName
3. Extract name field (e.g., 'properties/123456')
1. Call GOOGLE_ANALYTICS_GET_METADATA with property ID
2. Browse available dimensions and metrics
3. Call GOOGLE_ANALYTICS_CHECK_COMPATIBILITY to verify combinations
4. Use verified dimensions/metrics in RUN_REPORT
offset and limit for row paginationpageToken from responsepageToken is absent or rowCount reachedDimensions: date, city, country, deviceCategory, sessionSource, sessionMedium, pagePath, pageTitle, eventName
Metrics: activeUsers, sessions, screenPageViews, eventCount, conversions, totalRevenue, bounceRate, averageSessionDuration
Property IDs:
Date Ranges:
Compatibility:
Response Parsing:
rows array with dimensionValues and metricValues
rows key (not an empty array)| Task | Tool Slug | Key Params |
|---|---|---|
| List accounts | GOOGLE_ANALYTICS_LIST_ACCOUNTS | pageSize, pageToken |
| List properties | GOOGLE_ANALYTICS_LIST_PROPERTIES | filter, pageSize |
| Get metadata | GOOGLE_ANALYTICS_GET_METADATA | property |
| Check compatibility | GOOGLE_ANALYTICS_CHECK_COMPATIBILITY | property, dimensions, metrics |
| Run report | GOOGLE_ANALYTICS_RUN_REPORT | property, dateRanges, dimensions, metrics |
| Batch reports | GOOGLE_ANALYTICS_BATCH_RUN_REPORTS | property, requests |
| Pivot report | GOOGLE_ANALYTICS_RUN_PIVOT_REPORT | property, dateRanges, pivots |
| Funnel report | GOOGLE_ANALYTICS_RUN_FUNNEL_REPORT | property, dateRanges, funnel |
| List key events | GOOGLE_ANALYTICS_LIST_KEY_EVENTS | parent, pageSize |
Powered by Composio