← 返回
未分类 中文

Google Analytics

Run GA4 reports, inspect properties, list audiences and data streams, and analyze traffic and conversion data via the Google Analytics Data API. Use this ski...
通过 Google Analytics Data API 运行 GA4 报告、检查属性、列出受众和数据流、分析流量和转化数据。使用此技能...
hith3sh hith3sh 来源
未分类 clawhub v1.0.5 2 版本 99804.7 Key: 无需
★ 6
Stars
📥 1,413
下载
💾 1
安装
2
版本
#latest

概述

Google Analytics

!Google Analytics

Access Google Analytics via the GA4 Data API with OAuth authentication. Run GA4 reports, inspect properties, list audiences and data streams, and analyze traffic and conversion data.

This skill uses ClawLink for hosted connection flows and credentials so you do not need to configure Google Analytics API access yourself.

Setup in 3 Steps

Step 1: InstallStep 2: Pair AccountStep 3: Connect Google Analytics
:---::---::---:
!Install!PairApp-specific connection GIF coming soon
Run the install command in OpenClawSign in and approve the deviceOpen the dashboard and connect Google Analytics

How It Works

┌─────────────────┐     ┌──────────────┐     ┌──────────────────┐
│   OpenClaw      │────▶│   ClawLink   │────▶│  GA4 Data API    │
│   (User Chat)   │     │   (OAuth)    │     │   (REST)         │
└─────────────────┘     └──────────────┘     └──────────────────┘
         │                       │                       │
         │  1. Install Plugin    │                       │
         │  2. Pair Device       │                       │
         │  3. Connect Google Analytics                   │
         │                       │  4. Secure Token      │
         │                       │  5. Proxy Requests    │
         │                       │                       │
         ▼                       ▼                       ▼
   ┌──────────┐           ┌──────────┐           ┌──────────┐
   │  SKILL   │           │ Dashboard│           │ GA4      │
   │  File    │           │ Auth     │           │ Reports  │
   └──────────┘           └──────────┘           └──────────┘

Install

Install the verified ClawLink plugin from ClawHub. After the user confirms, complete the full setup so ClawLink tools are visible in the next OpenClaw chat.

openclaw plugins install clawhub:clawlink-plugin
openclaw config set tools.alsoAllow '["clawlink-plugin"]' --strict-json
openclaw gateway restart

Then tell the user: "OpenClaw has been restarted. Send /new as a standalone message to start a fresh chat, then ask for Google Analytics again."

Quick Start

# List accessible accounts and properties
clawlink_call_tool --tool "google_analytics_list_account_summaries" --params '{}'

# Run a basic GA4 report
clawlink_call_tool --tool "google_analytics_run_report" --params '{"property": "properties/123456789", "dimensions": [{"name": "country"}, {"name": "deviceCategory"}], "metrics": [{"name": "sessions"}, {"name": "totalRevenue"}]}'

# Run a realtime report
clawlink_call_tool --tool "google_analytics_run_realtime_report" --params '{"property": "properties/123456789", "dimensions": [{"name": "country"}], "metrics": [{"name": "activeUsers"}]}'

Authentication

All Google Analytics tool calls are authenticated automatically by ClawLink using the user's connected Google account.

No API key is required in chat. ClawLink stores the OAuth token securely and injects it into every GA4 API request on the user's behalf.

Getting Connected

  1. Install the ClawLink plugin (see Install above).
  2. Pair the plugin with clawlink_begin_pairing if it is not configured yet.
  3. Open https://claw-link.dev/dashboard?add=google-analytics and connect Google Analytics.
  4. Call clawlink_list_integrations to verify the connection is active.

Connection Management

List Connections

clawlink_list_integrations

Response: Returns all connected integrations. Look for google-analytics in the list.

Verify Connection

clawlink_list_tools --integration google-analytics

Response: Returns the live tool catalog for Google Analytics.

Reconnect

If Google Analytics tools are missing or the connection shows an error:

  1. Direct the user to https://claw-link.dev/dashboard?add=google-analytics
  2. After they confirm, call clawlink_list_integrations to verify
  3. Then call clawlink_list_tools --integration google-analytics

Security & Permissions

  • Access is scoped to GA4 properties accessible to the connected Google account.
  • All write operations require explicit user confirmation. Before executing any key event creation or property update, confirm the intended effect with the user.
  • Reports and analytics queries are read-only and do not modify account data.

Tool Reference

Account & Property Discovery

ToolDescriptionMode
-------------------------
google_analytics_list_account_summariesList all accessible accounts and propertiesRead
google_analytics_list_accounts_v1_betaList all Google Analytics accountsRead
google_analytics_list_properties_filteredList GA4 properties with filteringRead
google_analytics_get_propertyGet GA4 property detailsRead
google_analytics_get_accountGet account detailsRead

Reporting

ToolDescriptionMode
-------------------------
google_analytics_run_reportRun a customized GA4 data reportRead
google_analytics_run_realtime_reportRun a realtime report (last 30-60 min)Read
google_analytics_run_pivot_reportRun a pivot table reportRead
google_analytics_run_funnel_reportRun a funnel analysis reportRead
google_analytics_batch_run_reportsRun multiple reports in one batchRead
google_analytics_check_compatibilityCheck dimension/metric compatibilityRead

Metadata & Configuration

ToolDescriptionMode
-------------------------
google_analytics_get_metadataGet available dimensions, metrics, comparisonsRead
google_analytics_get_property_quotas_snapshotGet API quota usage for a propertyRead
google_analytics_get_data_retention_settingsGet data retention configurationRead
google_analytics_get_attribution_settingsGet attribution model settingsRead
google_analytics_get_google_signals_settingsGet Google Signals configurationRead

Audiences & Data Streams

ToolDescriptionMode
-------------------------
google_analytics_list_audiencesList configured audiencesRead
google_analytics_get_audienceGet audience configuration detailsRead
google_analytics_list_data_streamsList data streams for a propertyRead
google_analytics_list_key_eventsList key events (conversions)Read
google_analytics_get_key_eventGet key event detailsRead

Audience Lists

ToolDescriptionMode
-------------------------
google_analytics_create_audience_listCreate an audience list snapshotWrite
google_analytics_create_recurring_audience_listCreate a recurring audience listWrite
google_analytics_list_audience_listsList all audience listsRead
google_analytics_query_audience_listQuery audience list resultsRead

Custom Definitions

ToolDescriptionMode
-------------------------
google_analytics_list_custom_dimensionsList custom dimensionsRead
google_analytics_create_custom_dimensionCreate a custom dimensionWrite
google_analytics_list_custom_metricsList custom metricsRead
google_analytics_create_custom_metricCreate a custom metricWrite

Property Management

ToolDescriptionMode
-------------------------
google_analytics_update_propertyUpdate property settingsWrite
google_analytics_create_rollup_propertyCreate a roll-up propertyWrite

Code Examples

Run a basic traffic report

clawlink_call_tool --tool "google_analytics_run_report" \
  --params '{
    "property": "properties/123456789",
    "dimensions": [{"name": "date"}, {"name": "country"}, {"name": "deviceCategory"}],
    "metrics": [{"name": "sessions"}, {"name": "totalUsers"}, {"name": "bounceRate"}],
    "dateRanges": [{"startDate": "30daysAgo", "endDate": "today"}]
  }'

Run a realtime report

clawlink_call_tool --tool "google_analytics_run_realtime_report" \
  --params '{
    "property": "properties/123456789",
    "dimensions": [{"name": "country"}, {"name": "city"}],
    "metrics": [{"name": "activeUsers"}]
  }'

List key events

clawlink_call_tool --tool "google_analytics_list_key_events" \
  --params '{
    "property": "properties/123456789"
  }'

Check dimension/metric compatibility

clawlink_call_tool --tool "google_analytics_check_compatibility" \
  --params '{
    "property": "properties/123456789",
    "dimensions": [{"name": "userAgeBracket"}, {"name": "sessionCampaignName"}],
    "metrics": [{"name": "sessions"}]
  }'

Discovery Workflow

  1. Call clawlink_list_integrations to confirm Google Analytics is connected.
  2. Call clawlink_list_tools --integration google-analytics to see the live catalog.
  3. Treat the returned list as the source of truth. Do not guess or assume what tools exist.
  4. If the user describes a capability but the exact tool is unclear, call clawlink_search_tools with a short query and integration google-analytics.
  5. If no Google Analytics tools appear, direct the user to https://claw-link.dev/dashboard?add=google-analytics.

Execution Workflow

┌─────────────────────────────────────────────────────────────┐
│  READ OPERATIONS (Safe)                                     │
│  list → get → run_report → check_compatibility              │
│                                                             │
│  Example: List properties → Run report → Show results       │
└─────────────────────────────────────────────────────────────┘
                              │
                              ▼
┌─────────────────────────────────────────────────────────────┐
│  WRITE OPERATIONS (Require Confirmation)                    │
│  describe → preview → confirm → create/update               │
│                                                             │
│  Example: Preview key event creation → User confirms        │
│           → Execute create                                   │
└─────────────────────────────────────────────────────────────┘
  1. For unfamiliar tools, ambiguous requests, or any write action, call clawlink_describe_tool first.
  2. Use the returned guidance, schema, whenToUse, askBefore, safeDefaults, examples, and followups to shape the call.
  3. Prefer listing accounts, properties, metadata, compatibility, and read-only reports before writes.
  4. For key event creation, property updates, or anything marked as requiring confirmation, call clawlink_preview_tool first, then confirm with the user.
  5. Execute with clawlink_call_tool. Pass confirmation only after the preview matches the user's intent.
  6. If the tool call fails, report the real error. Do not invent results or restate the failure as a missing capability unless the live catalog supports that conclusion.

Notes

  • GA4 property IDs use format properties/123456789 in API calls.
  • Dimension and metric names in GAQL use camelCase (e.g., date, sessionCampaignName, totalUsers).
  • GA4 Data API has strict dimension/metric compatibility rules. Not all combinations are valid. Use check_compatibility to validate before running complex reports.
  • Realtime data covers the last 30-60 minutes and may not be available for all custom dimensions.
  • Key events (conversions) are read-only via API — creation and deletion require the Google Analytics UI.

Error Handling

Status / ErrorMeaning
-------------------------
Tool not foundThe tool name does not exist in the current catalog. Verify with clawlink_list_tools --integration google-analytics.
Missing connectionGoogle Analytics is not connected. Direct the user to https://claw-link.dev/dashboard?add=google-analytics.
400 INVALID_ARGUMENTIncompatible dimension/metric combination. Use check_compatibility to validate.
403 ForbiddenInsufficient OAuth scopes or permissions.
Write rejectedUser did not confirm a write action. Always confirm before executing writes.

Troubleshooting: Tools Not Visible

  1. Check that the ClawLink plugin is installed:

```bash

openclaw plugins list

```

  1. If the plugin is installed but tools are missing, tell the user to send /new as a standalone message to reload the catalog.
  2. If a fresh chat does not help, run:

```bash

openclaw config set tools.alsoAllow '["clawlink-plugin"]' --strict-json

openclaw gateway restart

```

  1. After restart, tell the user to send /new again and retry.

Troubleshooting: Invalid Tool Call

  1. Ensure the integration slug is exactly google-analytics.
  2. Use clawlink_describe_tool to verify parameter names and types before calling.
  3. For write operations, always call clawlink_preview_tool first.

Resources


Powered by ClawLink — an integration hub for OpenClaw

!ClawLink Logo

版本历史

共 2 个版本

  • v1.0.5 当前
    2026-06-09 16:18 安全 安全
  • v0.1.0
    2026-05-08 02:43 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

data-analysis

Tavily 搜索

jacky1n7
通过 Tavily API 进行网页搜索(Brave 替代方案)。当用户要求搜索网页、查找来源或链接,且 Brave 网页搜索不可用时使用。
★ 273 📥 100,241
data-analysis

AdMapix

fly0pants
AdMapix 原始数据层,提供广告创意、应用、排名、下载/收入及市场元数据。返回 AdMapix API 的结构化 JSON;调用方...
★ 296 📥 140,094
office-efficiency

Microsoft Excel

hith3sh
通过托管 OAuth 集成 Microsoft Excel API,实现对 OneDrive 中 Excel 工作簿、工作表、区域、表格和图表的读写。使用此技能...
★ 6 📥 1,927