Community编程与开发github.com

googleads-automation

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

googleads-automation 是什么?

这是一个用于通过 Rube MCP (Composio) 自动化 Google Ads 和 Google Analytics (GA4) 数据分析流程的技能。它允许用户列出与 GA4 媒体资源关联的 Google Ads 帐户链接、运行定制的性能报告(例如按广告系列、来源、媒介拆分会话和收入)、检查维度和指标的兼容性,以及枚举可访问的 GA4 帐户和媒体资源。该技能主要支持通过 Rube MCP(一个无需 API 密钥即可配置的 MCP 服务器)进行调用,并提供多个核心工具,如 `GOOGLE_ANALYTICS_RUN_REPORT`、`GOOGLE_ANALYTICS_LIST_ACCOUNTS` 和 `GOOGLE_ANALYTICS_ANALYTICS_ADMIN_PROPERTIES_GOOGLE_ADS`。用户必须首先连接 Rube MCP 并激活 `google_analytics` 工具包,然后始终调用 `RUBE_SEARCH_TOOLS` 获取最新的工具架构。该技能还记录了常见陷阱(如维度/指标兼容性规则、日期范围格式)和最佳实践(如先发现后报告、查前验证)。

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

Installed? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · 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 无效:在 GA4 中,exits 既不能作为维度也不能作为指标使用。
  • 媒体资源 ID 格式:必须为 properties/{numeric_id}(例如 properties/123456789)。请勿使用 Google 帐户 ID(长 OAuth ID)。
  • 帐户 ID 格式:必须为 accounts/{numeric_id},其中数字 ID 为 6-10 位。
  • 筛选器分离:仅对维度字段使用 dimensionFilter,仅对指标字段使用 metricFilter。混用会导致错误。
  • 每个报告请求最多 9 个维度和 10 个指标。

快速参考

操作工具关键参数
列出广告链接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.

ably-automation

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

abstract-automation

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

abuselpdb-automation

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

abyssale-automation

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

accelo-automation

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

accredible-certificates-automation

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

acculynx-automation

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

active-campaign-automation

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

addresszen-automation

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

adobe-automation

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

adrapid-automation

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

adyntel-automation

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

aeroleads-automation

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

aero-workflow-automation

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

affinda-automation

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

affinity-automation

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

agencyzoom-automation

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

agent-mail-automation

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

agentql-automation

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

agenty-automation

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

相关技能