Awesome-claude-skills-cn googleads-automation
通过 Rube MCP(Composio)自动化 Google Ads 分析任务:列出 Google Ads 链接、运行 GA4 报告、检查兼容性、列出媒体资源和账户。始终先搜索工具以获取当前架构。
install
source · Clone the upstream repo
git clone https://github.com/Athe1st3154/awesome-claude-skills-cn
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/Athe1st3154/awesome-claude-skills-cn "$T" && mkdir -p ~/.claude/skills && cp -r "$T/composio-skills/googleads-automation" ~/.claude/skills/athe1st3154-awesome-claude-skills-cn-googleads-automation && rm -rf "$T"
manifest:
composio-skills/googleads-automation/SKILL.mdsource content
Google Ads Automation via Rube MCP
Access Google Ads data through Google Analytics integration, run performance reports, list linked Ads accounts, and analyze campaign metrics using Rube MCP (Composio).
工具包文档: composio.dev/toolkits/googleads
前提条件
- Rube MCP 必须已连接(RUBE_SEARCH_TOOLS 可用)
- Active connection via
使用工具包RUBE_MANAGE_CONNECTIONSgoogle_analytics - 始终首先调用
获取当前工具架构RUBE_SEARCH_TOOLS
设置
获取 Rube MCP: 在客户端配置中添加
https://rube.app/mcp 作为 MCP 服务器。 无需 API 密钥 — 只需添加端点即可使用。
- 通过确认
响应来验证 Rube MCP 可用RUBE_SEARCH_TOOLS - 使用工具包
调用google_analyticsRUBE_MANAGE_CONNECTIONS - 如果连接不是 ACTIVE 状态,按照返回的授权链接完成设置
- 在运行任何工作流程前确认连接状态显示为 ACTIVE
Note: Google Ads data is accessed through the Google Analytics toolkit integration. The tools below use GA4 properties linked to Google Ads accounts.
Core Workflows
1. List Google Ads Links for a Property
Use
GOOGLE_ANALYTICS_ANALYTICS_ADMIN_PROPERTIES_GOOGLE_ADS to retrieve all Google Ads account links configured for a GA4 property.
Tool: GOOGLE_ANALYTICS_ANALYTICS_ADMIN_PROPERTIES_GOOGLE_ADS Parameters: - parent (required): Property resource name (format: "properties/{propertyId}") - pageSize: Max results (1-200, default 50) - pageToken: Pagination token
2. Run a GA4 Performance Report
Use
GOOGLE_ANALYTICS_RUN_REPORT to run customized reports with dimensions, metrics, date ranges, and filters.
Tool: GOOGLE_ANALYTICS_RUN_REPORT Parameters: - property (required): Property resource (format: "properties/{property_id}") - dimensions: Array of dimension objects (e.g., [{"name": "sessionCampaignName"}, {"name": "date"}]) - metrics: Array of metric objects (e.g., [{"name": "sessions"}, {"name": "totalRevenue"}]) - dateRanges: Array with startDate and endDate (e.g., [{"startDate": "2025-01-01", "endDate": "2025-01-31"}]) - dimensionFilter: Filter by dimension values - metricFilter: Filter by metric values (applied after aggregation) - orderBys: Sort results - limit: Max rows to return (1-250000)
3. Check Dimension/Metric Compatibility
Use
GOOGLE_ANALYTICS_CHECK_COMPATIBILITY to validate dimension and metric combinations before running a report.
Tool: GOOGLE_ANALYTICS_CHECK_COMPATIBILITY Description: Validates compatibility of chosen dimensions or metrics before running a report. Note: Call RUBE_SEARCH_TOOLS to get the full schema for this tool.
4. List GA4 Accounts
Use
GOOGLE_ANALYTICS_LIST_ACCOUNTS to enumerate all accessible Google Analytics accounts.
Tool: GOOGLE_ANALYTICS_LIST_ACCOUNTS Parameters: - pageSize: Max accounts to return - pageToken: Pagination token - showDeleted: Include soft-deleted accounts
5. List GA4 Properties Under an Account
Use
GOOGLE_ANALYTICS_LIST_PROPERTIES to list properties for a specific GA4 account.
Tool: GOOGLE_ANALYTICS_LIST_PROPERTIES Parameters: - account (required): Account resource name (format: "accounts/{account_id}") - pageSize: Max properties (1-200) - pageToken: Pagination token - showDeleted: Include trashed properties
6. Get Available Dimensions and Metrics
Use
GOOGLE_ANALYTICS_GET_METADATA to discover all available fields for building reports.
Tool: GOOGLE_ANALYTICS_GET_METADATA Description: Gets metadata for dimensions, metrics, and comparisons for a GA4 property. Note: Call RUBE_SEARCH_TOOLS to get the full schema for this tool.
Common Patterns
- Discover then report: Use
to find account IDs, thenGOOGLE_ANALYTICS_LIST_ACCOUNTS
to find property IDs, thenGOOGLE_ANALYTICS_LIST_PROPERTIES
to pull data.GOOGLE_ANALYTICS_RUN_REPORT - Validate before querying: Use
to validate dimension/metric combinations before running reports to avoid 400 errors.GOOGLE_ANALYTICS_CHECK_COMPATIBILITY - Campaign performance: Run reports with dimensions like
,sessionCampaignName
,sessionSource
and metrics likesessionMedium
,sessions
,activeUsers
.totalRevenue - Ads link discovery: Use
to find which Google Ads accounts are linked to each GA4 property.GOOGLE_ANALYTICS_ANALYTICS_ADMIN_PROPERTIES_GOOGLE_ADS - Field discovery: Use
to list all available dimensions and metrics before constructing complex reports.GOOGLE_ANALYTICS_GET_METADATA
已知陷阱
- Dimension/metric compatibility: The GA4 API has strict compatibility rules. Not all dimensions can be combined with all metrics. Demographic dimensions (e.g.,
,userAgeBracket
) are often incompatible with session-scoped dimensions/filters (e.g.,userGender
,sessionCampaignName
).sessionSource
is NOT a dimension: Do not includedateRange
in the dimensions array. UsedateRange
,date
,dateHour
,year
, ormonth
instead.week
is NOT valid: Neitherexits
as a dimension nor as a metric is valid in GA4.exits- Property ID format: Must be
(e.g.,properties/{numeric_id}
). Do not use Google Account IDs (long OAuth IDs).properties/123456789 - Account ID format: Must be
where the numeric ID is 6-10 digits.accounts/{numeric_id} - Filter separation: Use
only for dimension fields anddimensionFilter
only for metric fields. Mixing them will cause errors.metricFilter - Max 9 dimensions and 10 metrics per report request.
快速参考
| Action | Tool | Key Parameters |
|---|---|---|
| List Ads links | | |
| Run report | | , , , |
| Check compatibility | | (see full schema via RUBE_SEARCH_TOOLS) |
| List accounts | | |
| List properties | | , |
| Get metadata | | (see full schema via RUBE_SEARCH_TOOLS) |
由 Composio 提供支持