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.
| Step 1: Install | Step 2: Pair Account | Step 3: Connect Google Analytics |
|---|---|---|
| :---: | :---: | :---: |
| !Install | !Pair | App-specific connection GIF coming soon |
| Run the install command in OpenClaw | Sign in and approve the device | Open the dashboard and connect Google Analytics |
┌─────────────────┐ ┌──────────────┐ ┌──────────────────┐
│ 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 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."
# 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"}]}'
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.
clawlink_begin_pairing if it is not configured yet.clawlink_list_integrations to verify the connection is active.clawlink_list_integrations
Response: Returns all connected integrations. Look for google-analytics in the list.
clawlink_list_tools --integration google-analytics
Response: Returns the live tool catalog for Google Analytics.
If Google Analytics tools are missing or the connection shows an error:
clawlink_list_integrations to verifyclawlink_list_tools --integration google-analytics| Tool | Description | Mode |
|---|---|---|
| ------ | ------------- | ------ |
google_analytics_list_account_summaries | List all accessible accounts and properties | Read |
google_analytics_list_accounts_v1_beta | List all Google Analytics accounts | Read |
google_analytics_list_properties_filtered | List GA4 properties with filtering | Read |
google_analytics_get_property | Get GA4 property details | Read |
google_analytics_get_account | Get account details | Read |
| Tool | Description | Mode |
|---|---|---|
| ------ | ------------- | ------ |
google_analytics_run_report | Run a customized GA4 data report | Read |
google_analytics_run_realtime_report | Run a realtime report (last 30-60 min) | Read |
google_analytics_run_pivot_report | Run a pivot table report | Read |
google_analytics_run_funnel_report | Run a funnel analysis report | Read |
google_analytics_batch_run_reports | Run multiple reports in one batch | Read |
google_analytics_check_compatibility | Check dimension/metric compatibility | Read |
| Tool | Description | Mode |
|---|---|---|
| ------ | ------------- | ------ |
google_analytics_get_metadata | Get available dimensions, metrics, comparisons | Read |
google_analytics_get_property_quotas_snapshot | Get API quota usage for a property | Read |
google_analytics_get_data_retention_settings | Get data retention configuration | Read |
google_analytics_get_attribution_settings | Get attribution model settings | Read |
google_analytics_get_google_signals_settings | Get Google Signals configuration | Read |
| Tool | Description | Mode |
|---|---|---|
| ------ | ------------- | ------ |
google_analytics_list_audiences | List configured audiences | Read |
google_analytics_get_audience | Get audience configuration details | Read |
google_analytics_list_data_streams | List data streams for a property | Read |
google_analytics_list_key_events | List key events (conversions) | Read |
google_analytics_get_key_event | Get key event details | Read |
| Tool | Description | Mode |
|---|---|---|
| ------ | ------------- | ------ |
google_analytics_create_audience_list | Create an audience list snapshot | Write |
google_analytics_create_recurring_audience_list | Create a recurring audience list | Write |
google_analytics_list_audience_lists | List all audience lists | Read |
google_analytics_query_audience_list | Query audience list results | Read |
| Tool | Description | Mode |
|---|---|---|
| ------ | ------------- | ------ |
google_analytics_list_custom_dimensions | List custom dimensions | Read |
google_analytics_create_custom_dimension | Create a custom dimension | Write |
google_analytics_list_custom_metrics | List custom metrics | Read |
google_analytics_create_custom_metric | Create a custom metric | Write |
| Tool | Description | Mode |
|---|---|---|
| ------ | ------------- | ------ |
google_analytics_update_property | Update property settings | Write |
google_analytics_create_rollup_property | Create a roll-up property | Write |
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"}]
}'
clawlink_call_tool --tool "google_analytics_run_realtime_report" \
--params '{
"property": "properties/123456789",
"dimensions": [{"name": "country"}, {"name": "city"}],
"metrics": [{"name": "activeUsers"}]
}'
clawlink_call_tool --tool "google_analytics_list_key_events" \
--params '{
"property": "properties/123456789"
}'
clawlink_call_tool --tool "google_analytics_check_compatibility" \
--params '{
"property": "properties/123456789",
"dimensions": [{"name": "userAgeBracket"}, {"name": "sessionCampaignName"}],
"metrics": [{"name": "sessions"}]
}'
clawlink_list_integrations to confirm Google Analytics is connected.clawlink_list_tools --integration google-analytics to see the live catalog.clawlink_search_tools with a short query and integration google-analytics.┌─────────────────────────────────────────────────────────────┐
│ 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 │
└─────────────────────────────────────────────────────────────┘
clawlink_describe_tool first.whenToUse, askBefore, safeDefaults, examples, and followups to shape the call.clawlink_preview_tool first, then confirm with the user.clawlink_call_tool. Pass confirmation only after the preview matches the user's intent.properties/123456789 in API calls.date, sessionCampaignName, totalUsers).check_compatibility to validate before running complex reports.| Status / Error | Meaning |
|---|---|
| ---------------- | --------- |
| Tool not found | The tool name does not exist in the current catalog. Verify with clawlink_list_tools --integration google-analytics. |
| Missing connection | Google Analytics is not connected. Direct the user to https://claw-link.dev/dashboard?add=google-analytics. |
400 INVALID_ARGUMENT | Incompatible dimension/metric combination. Use check_compatibility to validate. |
403 Forbidden | Insufficient OAuth scopes or permissions. |
| Write rejected | User did not confirm a write action. Always confirm before executing writes. |
```bash
openclaw plugins list
```
/new as a standalone message to reload the catalog.```bash
openclaw config set tools.alsoAllow '["clawlink-plugin"]' --strict-json
openclaw gateway restart
```
/new again and retry.google-analytics.clawlink_describe_tool to verify parameter names and types before calling.clawlink_preview_tool first.Powered by ClawLink — an integration hub for OpenClaw
共 2 个版本