Google analytics automation

From aAAaqwq/AGI-Super-Team · View interactive version

Google analytics automation is an AI agent skill from the GitHub repository aAAaqwq/AGI-Super-Team. Automate Google Analytics tasks via Rube MCP (Composio): run reports, list accounts/properties, funnels, pivots, key events. Always search tools first for current schemas.

How to use this skill

Skill file

Google Analytics Automation via Rube MCP

Automate Google Analytics 4 (GA4) reporting and property management through Composio's Google Analytics toolkit via Rube MCP.

Prerequisites

Setup

Get 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.

  1. Verify Rube MCP is available by confirming RUBE_SEARCH_TOOLS responds
  2. Call RUBE_MANAGE_CONNECTIONS with toolkit google_analytics
  3. If connection is not ACTIVE, follow the returned auth link to complete Google OAuth
  4. Confirm connection status shows ACTIVE before running any workflows

Core Workflows

1. List Accounts and Properties

When to use: User wants to discover available GA4 accounts and properties

Tool sequence:

  1. GOOGLE_ANALYTICS_LIST_ACCOUNTS - List all accessible GA4 accounts [Required]
  2. GOOGLE_ANALYTICS_LIST_PROPERTIES - List properties under an account [Required]

Key parameters:

Pitfalls:

2. Run Standard Reports

When to use: User wants to query metrics and dimensions from GA4 data

Tool sequence:

  1. GOOGLE_ANALYTICS_LIST_PROPERTIES - Get property ID [Prerequisite]
  2. GOOGLE_ANALYTICS_GET_METADATA - Discover available dimensions and metrics [Optional]
  3. GOOGLE_ANALYTICS_CHECK_COMPATIBILITY - Verify dimension/metric compatibility [Optional]
  4. GOOGLE_ANALYTICS_RUN_REPORT - Execute the report query [Required]

Key parameters:

Pitfalls:

3. Run Batch Reports

When to use: User needs multiple different reports from the same property in one call

Tool sequence:

  1. GOOGLE_ANALYTICS_LIST_PROPERTIES - Get property ID [Prerequisite]
  2. GOOGLE_ANALYTICS_BATCH_RUN_REPORTS - Execute multiple reports at once [Required]

Key parameters:

Pitfalls:

4. Run Pivot Reports

When to use: User wants cross-tabulated data (rows vs columns) like pivot tables

Tool sequence:

  1. GOOGLE_ANALYTICS_LIST_PROPERTIES - Get property ID [Prerequisite]
  2. GOOGLE_ANALYTICS_RUN_PIVOT_REPORT - Execute pivot report [Required]

Key parameters:

Pitfalls:

5. Run Funnel Reports

When to use: User wants to analyze conversion funnels and drop-off rates

Tool sequence:

  1. GOOGLE_ANALYTICS_LIST_PROPERTIES - Get property ID [Prerequisite]
  2. GOOGLE_ANALYTICS_RUN_FUNNEL_REPORT - Execute funnel analysis [Required]

Key parameters:

Pitfalls:

6. Manage Key Events

When to use: User wants to view or manage conversion events (key events) in GA4

Tool sequence:

  1. GOOGLE_ANALYTICS_LIST_PROPERTIES - Get property ID [Prerequisite]
  2. GOOGLE_ANALYTICS_LIST_KEY_EVENTS - List all key events for the property [Required]

Key parameters:

Pitfalls:

Common Patterns

ID Resolution

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')

Dimension/Metric Discovery

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

Pagination

Common Dimensions and Metrics

Dimensions: date, city, country, deviceCategory, sessionSource, sessionMedium, pagePath, pageTitle, eventName

Metrics: activeUsers, sessions, screenPageViews, eventCount, conversions, totalRevenue, bounceRate, averageSessionDuration

Known Pitfalls

Property IDs:

Date Ranges:

Compatibility:

Response Parsing:

Quick Reference

| 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 |

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.