Community研究与数据分析github.com

Google Ads 自动化 (通过 Rube MCP)

通过 Rube MCP (Composio) 自动化 Google Ads 分析任务:列出 Google Ads 链接、运行 GA4 报告、检查兼容性、列出媒体资源和账号。始终先搜索工具以获取当前架构。

Google Ads 自动化 (通过 Rube MCP) 是什么?

该技能通过 Rube MCP 集成 Google Analytics,实现对 Google Ads 数据的自动化访问。它提供了一组核心工作流,包括列出 GA4 媒体资源的 Google Ads 链接、运行自定义 GA4 报告、验证维度和指标组合的兼容性、枚举可访问的 GA4 账号和媒体资源,以及获取可用的维度和指标元数据。这对于需要定期拉取广告活动性能指标(例如会话、活跃用户、总收入)的开发者或营销分析师尤其有用。主要优势在于避免了手动浏览 Google Analytics UI 的繁琐操作,并且通过 Rube MCP 消除了 API 密钥管理的复杂性——只需添加 MCP 端点即可使用。该技能支持 Cursor、Claude Code 等任何兼容 MCP 协议的 AI 助手平台。使用前需确保 Rube MCP 已连接并激活了 google_analytics 工具集连接,并且始终在操作前调用 RUBE_SEARCH_TOOLS 获取最新的工具架构。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/ComposioHQ/awesome-codex-skills/tree/main/composio-skills/googleads-automation

Installed? Explore more 研究与数据分析 skills: affaan-m/uspto-database, affaan-m/scholar-evaluation, affaan-m/literature-review · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

通过 Rube MCP 实现 Google Ads 自动化

通过 Google Analytics 集成访问 Google Ads 数据,运行性能报告,列出关联的 Ads 账号,并使用 Rube MCP(Composio)分析广告活动指标。

工具包文档:composio.dev/toolkits/googleads

前提条件

  • 必须已连接 Rube MCP(RUBE_SEARCH_TOOLS 可用)
  • 通过 RUBE_MANAGE_CONNECTIONS 与 google_analytics 工具集建立有效连接
  • 始终先调用 RUBE_SEARCH_TOOLS 以获取当前工具架构

设置

获取 Rube MCP:在客户端配置中将 https://rube.app/mcp 添加为 MCP 服务器。无需 API 密钥——只需添加端点即可正常工作。

  1. 确认 RUBE_SEARCH_TOOLS 有响应,验证 Rube MCP 可用
  2. 使用 google_analytics 工具集调用 RUBE_MANAGE_CONNECTIONS
  3. 如果连接状态不是 ACTIVE,按照返回的认证链接完成设置
  4. 在运行任何工作流之前,确认连接状态显示为 ACTIVE

注意:Google Ads 数据通过 Google Analytics 工具集集成访问。以下工具使用关联了 Google Ads 账号的 GA4 媒体资源。

核心工作流

1. 列出媒体资源的 Google Ads 链接

使用 GOOGLE_ANALYTICS_ANALYTICS_ADMIN_PROPERTIES_GOOGLE_ADS 检索为 GA4 媒体资源配置的所有 Google Ads 账号链接。

工具:GOOGLE_ANALYTICS_ANALYTICS_ADMIN_PROPERTIES_GOOGLE_ADS
参数:
  - parent(必填):媒体资源资源名称,格式为“properties/{propertyId}”
  - pageSize:最大结果数(1-200,默认值 50)
  - pageToken:分页令牌

2. 运行 GA4 性能报告

使用 GOOGLE_ANALYTICS_RUN_REPORT 运行包含维度、指标、日期范围和过滤器的自定义报告。

工具:GOOGLE_ANALYTICS_RUN_REPORT
参数:
  - property(必填):媒体资源名称,格式为“properties/{property_id}”
  - dimensions:维度对象数组(例如:[{"name": "sessionCampaignName"}, {"name": "date"}])
  - metrics:指标对象数组(例如:[{"name": "sessions"}, {"name": "totalRevenue"}])
  - dateRanges:包含 startDate 和 endDate 的数组(例如:[{"startDate": "2025-01-01", "endDate": "2025-01-31"}])
  - dimensionFilter:按维度值过滤
  - metricFilter:按指标值过滤(聚合后应用)
  - orderBys:排序结果
  - limit:返回的最大行数(1-250000)

3. 检查维度/指标兼容性

使用 GOOGLE_ANALYTICS_CHECK_COMPATIBILITY 在运行报告之前验证维度和指标组合。

工具:GOOGLE_ANALYTICS_CHECK_COMPATIBILITY
描述:在运行报告之前验证所选维度或指标的兼容性。
注意:调用 RUBE_SEARCH_TOOLS 获取该工具的完整架构。

4. 列出 GA4 账号

使用 GOOGLE_ANALYTICS_LIST_ACCOUNTS 枚举所有可访问的 Google Analytics 账号。

工具:GOOGLE_ANALYTICS_LIST_ACCOUNTS
参数:
  - pageSize:返回的最大账号数
  - pageToken:分页令牌
  - showDeleted:是否包含软删除的账号

5. 列出账号下的 GA4 媒体资源

使用 GOOGLE_ANALYTICS_LIST_PROPERTIES 列出特定 GA4 账号的媒体资源。

工具:GOOGLE_ANALYTICS_LIST_PROPERTIES
参数:
  - account(必填):账号资源名称,格式为“accounts/{account_id}”
  - pageSize:最大媒体资源数(1-200)
  - pageToken:分页令牌
  - showDeleted:是否包含已删除的媒体资源

6. 获取可用的维度和指标

使用 GOOGLE_ANALYTICS_GET_METADATA 发现所有可用于构建报告的字段。

工具:GOOGLE_ANALYTICS_GET_METADATA
描述:获取 GA4 媒体资源的维度、指标和比较元数据。
注意:调用 RUBE_SEARCH_TOOLS 获取该工具的完整架构。

常见模式

  • 发现后报告:先使用 GOOGLE_ANALYTICS_LIST_ACCOUNTS 查找账号 ID,然后使用 GOOGLE_ANALYTICS_LIST_PROPERTIES 查找媒体资源 ID,最后使用 GOOGLE_ANALYTICS_RUN_REPORT 提取数据。
  • 查询前验证:使用 GOOGLE_ANALYTICS_CHECK_COMPATIBILITY 验证维度/指标组合,以避免运行报告时出现 400 错误。
  • 广告活动性能:使用 sessionCampaignName、sessionSource、sessionMedium 等维度和 sessions、activeUsers、totalRevenue 等指标运行报告。
  • 广告链接发现:使用 GOOGLE_ANALYTICS_ANALYTICS_ADMIN_PROPERTIES_GOOGLE_ADS 查找哪些 Google Ads 账号链接到了每个 GA4 媒体资源。
  • 字段发现:在构建复杂报告之前,使用 GOOGLE_ANALYTICS_GET_METADATA 列出所有可用的维度和指标。

已知陷阱

  • 维度/指标兼容性:GA4 API 有严格的兼容性规则。并非所有维度都能与所有指标组合。人口统计维度(例如 userAgeBracket、userGender)通常与会话级维度/过滤器(例如 sessionCampaignName、sessionSource)不兼容。
  • dateRange 不是维度:不要在维度数组中包含 dateRange。请使用 date、dateHour、year、month 或 week。
  • exits 无效:exits 无论是作为维度还是指标,在 GA4 中均无效。
  • 媒体资源 ID 格式:必须为 properties/{numeric_id}(例如 properties/123456789)。请勿使用 Google 账号 ID(长 OAuth ID)。
  • 账号 ID 格式:必须为 accounts/{numeric_id},其中数字 ID 为 6-10 位。
  • 过滤器分离:仅对维度字段使用 dimensionFilter,仅对指标字段使用 metricFilter。混合使用会导致错误。
  • 每个报告请求最多 9 个维度和 10 个指标

快速参考

操作工具关键参数
列出 Ads 链接GOOGLE_ANALYTICS_ANALYTICS_ADMIN_PROPERTIES_GOOGLE_ADSparent
运行报告GOOGLE_ANALYTICS_RUN_REPORTproperty、dimensions、metrics、dateRanges
检查兼容性GOOGLE_ANALYTICS_CHECK_COMPATIBILITY(请通过 RUBE_SEARCH_TOOLS 查看完整架构)
列出账号GOOGLE_ANALYTICS_LIST_ACCOUNTSpageSize
列出媒体资源GOOGLE_ANALYTICS_LIST_PROPERTIESaccount、pageSize
获取元数据GOOGLE_ANALYTICS_GET_METADATA(请通过 RUBE_SEARCH_TOOLS 查看完整架构)

由 Composio 提供支持

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

ComposioHQ/-21risk-automation

Automate 21risk tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/-2chat-automation

Automate 2chat tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/ably-automation

Automate Ably tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/abstract-automation

Automate Abstract tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/abuselpdb-automation

Automate Abuselpdb tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/abyssale-automation

Automate Abyssale tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/accelo-automation

Automate Accelo tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/accredible-certificates-automation

Automate Accredible Certificates tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/acculynx-automation

Automate Acculynx tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/active-campaign-automation

Automate ActiveCampaign tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/addresszen-automation

Automate Addresszen tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/adobe-automation

Automate Adobe tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/adrapid-automation

Automate Adrapid tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/adyntel-automation

Automate Adyntel tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/aeroleads-automation

Automate Aeroleads tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/aero-workflow-automation

Automate Aero Workflow tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/affinda-automation

Automate Affinda tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/affinity-automation

Automate Affinity tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/agencyzoom-automation

Automate Agencyzoom tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/agent-deep-links

Build, validate, and troubleshoot deep links for Codex, Cursor, VS Code, Visual Studio, and similar tools. Use when users ask for clickable links (especially in Slack) that open threads, files, folders, or app settings.

相关技能