# How to connect Google Analytics to OpenClaw (no API keys)

> Connect Google Analytics to OpenClaw with no Google Cloud project, no OAuth client, and no service account JSON. Hosted OAuth, 67 GA4 tools, and fixes for the GA4 errors agents actually hit.

Web version: https://claw-link.dev/openclaw/google-analytics

The usual route to Google Analytics access for OpenClaw is an MCP server you configure and keep running, plus your own OAuth app or API keys. ClawLink gives OpenClaw a more practical Google Analytics setup: install one ClawHub skill, connect Google Analytics in the browser, and OpenClaw can call real Google Analytics actions from any chat surface with no auth, token refresh, or tool wiring to build yourself.

**Start here:** install the ClawLink plugin (`openclaw plugins install clawhub:clawlink-plugin`), pair it in the browser, then connect the app in the ClawLink dashboard. The interactive install prompt is on the web version of this page: https://claw-link.dev/openclaw/google-analytics

## Setup

It takes three steps to connect OpenClaw to Google Analytics.

1. **Install ClawLink** — add the plugin to OpenClaw once.
2. **Connect Google Analytics** — one-click OAuth in the ClawLink dashboard.
3. **Use it from chat** — ask OpenClaw in plain English.

**Alternative for any agent (no plugin needed):** if the OpenClaw plugin route isn't available or doesn't work, any AI agent with shell access can use the ClawLink CLI instead:

```bash
npx -y @useclawlink/cli login          # sign in via browser — no API key to paste
npx -y @useclawlink/cli connect google-analytics  # connect Google Analytics (browser OAuth)
npx -y @useclawlink/cli actions google-analytics  # list available actions
npx -y @useclawlink/cli run google-analytics <action> --input '<json>'  # execute (add --confirm for writes)
```

The install, start to finish. Run these once, then connect Google Analytics in the dashboard:

```bash
openclaw plugins install clawhub:clawlink-plugin
openclaw skills install @hith3sh/google-analytics-reporting
```

There is a separate community `google-analytics` skill on ClawHub that is not ours and expects a Google Cloud service account. The skill above is the one that uses your ClawLink connection. Start a fresh chat after installing so OpenClaw reloads its tool catalog.

### Using a different agent?

The OpenClaw plugin is one client of ClawLink's MCP server. Claude Code, Cursor, Codex, or any agent that can run a shell command pairs with the same ClawLink account through the CLI:

```bash
npx -y @useclawlink/cli login
```

`login` opens the same browser approval and stores a credential locally. Once Google Analytics is connected in the dashboard, that agent calls the same 67 Google Analytics tools over MCP. Full setup for MCP clients and shell agents: [connect apps to any AI agent](https://claw-link.dev/learn/connect-apps-to-any-ai-agent).

## Google Analytics MCP for OpenClaw

Looking for a Google Analytics MCP server for OpenClaw? ClawLink connects Google Analytics to OpenClaw and exposes 67 Google Analytics tools your agent can call over [MCP](https://claw-link.dev/learn/what-is-an-mcp-server), with [hosted auth](https://claw-link.dev/learn/oauth-for-ai-agents) and nothing to run or maintain yourself. Using Hermes instead? The [Hermes Google Analytics integration](https://claw-link.dev/hermes/google-analytics) works the same way.

Every other route to GA4 asks you to become a Google Cloud administrator first: create a project, enable the Analytics Data and Admin APIs, create an OAuth client or a service account, download a JSON key, then add that service account's email as a Viewer inside GA4 itself. ClawLink asks for none of it. ClawLink owns the verified Google OAuth app, so you click Connect, approve on Google's own consent screen, and the tools below work against the properties your Google account can already see.

## What the OpenClaw Google Analytics integration can do

67 Google Analytics tools are ready for OpenClaw once the account is connected. The 30 below are the ones people reach for most; your agent can call all 67.

### 30 of 67 Google Analytics tools for OpenClaw

| Tool | What it does |
|---|---|
| **Batch run reports** `google_analytics_batch_run_reports` | Run multiple GA4 reports in a batch |
| **Check compatibility** `google_analytics_check_compatibility` | Check dimension and metric compatibility |
| **Get metadata** `google_analytics_get_metadata` | Get GA4 metadata (dimensions and metrics) |
| **Get property** `google_analytics_get_property` | Get a GA4 property |
| **List account summaries** `google_analytics_list_account_summaries` | List GA account summaries |
| **List audiences** `google_analytics_list_audiences` | List audiences in a GA4 property |
| **List data streams** `google_analytics_list_data_streams` | List data streams for a GA4 property |
| **List key events** `google_analytics_list_key_events` | List key events in a GA4 property |
| **List properties filtered** `google_analytics_list_properties_filtered` | List GA4 properties |
| **Run funnel report** `google_analytics_run_funnel_report` | Run a funnel exploration report |
| **Run pivot report** `google_analytics_run_pivot_report` | Run a pivot report in GA4 |
| **Run realtime report** `google_analytics_run_realtime_report` | Run a real-time GA4 report |
| **Run report** `google_analytics_run_report` | Run a GA4 report with dimensions and metrics |
| **Update property** `google_analytics_update_property` | Update a GA4 property |
| **Batch run pivot reports** `google_analytics_batch_run_pivot_reports` | Return multiple pivot reports in a batch for a GA4 property |
| **Get account** `google_analytics_get_account` | Retrieve a single Account by its resource name |
| **Get attribution settings** `google_analytics_get_attribution_settings` | Retrieve attribution configuration for a Google Analytics property |
| **Get audience** `google_analytics_get_audience` | Retrieve a single Audience configuration from a Google Analytics property |
| **Get audience export** `google_analytics_get_audience_export` | Get configuration metadata about a specific audience export |
| **Get audience list** `google_analytics_get_audience_list` | Get configuration metadata about a specific audience list |
| **Get custom dimension** `google_analytics_get_custom_dimension` | Retrieve a single CustomDimension by its resource name |
| **Get data retention settings** `google_analytics_get_data_retention_settings` | Retrieve data retention configuration for a Google Analytics property |
| **Get data sharing settings** `google_analytics_get_data_sharing_settings` | Retrieve data sharing configuration for a Google Analytics account |
| **Get google signals settings** `google_analytics_get_google_signals_settings` | Retrieve Google Signals configuration settings for a GA4 property |
| **Get key event** `google_analytics_get_key_event` | Retrieve a Key Event |
| **Get property quotas snapshot** `google_analytics_get_property_quotas_snapshot` | Retrieve all property quotas organized by category (corePropertyQuota, funnelPropertyQuota |
| **Get recurring audience list** `google_analytics_get_recurring_audience_list` | Get configuration metadata about a specific recurring audience list |
| **Get report task** `google_analytics_get_report_task` | Get report metadata about a specific report task |
| **List accounts v1 beta** `google_analytics_list_accounts_v1_beta` | List all Google Analytics accounts accessible by the caller using v1beta API |
| **List adsense links** `google_analytics_list_adsense_links` | List all AdSenseLinks on a property |

## Example prompts

**Traffic report**

> List my Google Analytics account summaries, then run a report on the property for claw-link.dev for the last 28 days with dimensions date and sessionDefaultChannelGroup and metrics sessions and activeUsers. Show it as a table.

**Check fields first**

> Before you build the report, call get_metadata on properties/0/metadata and use it to pick the exact apiNames for the fields I described. Do not guess field names from the GA4 interface labels.

**Realtime**

> Run a realtime Google Analytics report on my main property with the dimension country and the metric activeUsers, and tell me how many people are on the site right now.

**Diagnose a drop**

> Compare the last 7 days to the previous 7 days on my main property, broken down by sessionSource, and call out any source whose sessions fell more than 20 percent. If the API rejects a dimension and metric pair, drop the field it names and retry rather than asking me.

## What the Google Analytics tools actually expect

These are the argument-level rules the GA4 APIs enforce. They are the difference between a report that returns and a 400 your agent cannot explain.

- **The property argument has four different names across the 67 tools, and the reporting tools use the odd one out.** The report tools, including `google_analytics_run_report`, want `property`. The list and create tools want `parent`. The get tools want `name`. `google_analytics_get_audience` alone wants `propertyId`. All four take the same `properties/123456789` shape, so an agent that carries one call's arguments into the next gets `arguments.parent is required` rather than a hint about the rename.
- **`property` is a numeric property id, never a measurement ID.** It must look like `properties/544060035`. A `G-XXXXXXXXXX` measurement ID is a tagging identifier and the Data API does not accept it. ClawLink rejects that shape before the request reaches Google, so you get a clear message instead of a misleading 403.
- **`dimensions` and `metrics` are arrays of objects, not arrays of strings.** `[\{"name": "country"\}]` works; `["country"]` fails with `arguments.dimensions[0] must be an object`. This one catches models that have read Google's own MCP server, which accepts a looser form, so it is worth saying in the prompt.
- **Ask for the field list instead of guessing it.** `get_metadata` accepts `properties/0/metadata`, which returns Google's universal dimension and metric list with both `apiName` and `uiName`, without touching a real property. GA4 interface labels are not API names, and this is what stops your agent inventing `averageEngagementTime` when the field is `engagementRate`.
- **One report takes at most 9 dimensions and 10 metrics.** Exceed either and the Data API returns 400 before running anything. Split the request and join the results on a shared dimension.
- **`dateRanges` is required for a standard report and must be omitted for a cohort report.** Passing both alongside `cohortSpec` fails. Dates accept `YYYY-MM-DD` or relative values like `7daysAgo` and `today`.
- **`dimensionFilter` and `metricFilter` are not interchangeable.** Filtering on `country` or `pagePath` belongs in `dimensionFilter`; filtering on `sessions` or `purchaseRevenue` belongs in `metricFilter`. Putting a dimension in the metric filter is rejected as invalid rather than silently ignored.
- **Realtime reports accept only four metrics:** `activeUsers`, `eventCount`, `keyEvents` and `screenPageViews`, with a fixed 14-dimension list and a default window of the last 30 minutes. The realtime tool's own description points at a `list_properties` tool that does not exist in this toolkit; use `list_account_summaries` to get property ids.
- **`list_account_summaries` returns 50 properties by default and 200 at most.** If you manage more than 50, an agent that does not page will quietly work from a partial list. Ask it to page until the response has no `pageToken`.
- **Quota is measured in tokens, not requests.** Google allows a standard property 200,000 Core tokens per day and 10 concurrent Core requests; most requests cost 10 tokens or fewer, and complex ones cost more. Set `returnPropertyQuota: true` on a report to have the remaining quota come back in the same response.
- **Seven of the 67 tools cannot run on this connection.** `google_analytics_update_property`, `google_analytics_create_custom_dimension`, `google_analytics_create_custom_metric`, `google_analytics_archive_custom_dimension`, `google_analytics_create_expanded_data_set`, `google_analytics_create_rollup_property` and `google_analytics_provision_account_ticket` require Google's `analytics.edit` scope, which ClawLink does not request. They return 403. Everything else, including every report, is available.
- **Two more tools do not use your Google connection at all.** `google_analytics_send_events` and `google_analytics_validate_events` are Measurement Protocol calls. They need a `measurement_id` and an `api_secret` you create yourself under Admin, Data Streams, Measurement Protocol API secrets, plus a `client_id` and an `events` array. Connecting Google Analytics in ClawLink does not supply those, so hand them over explicitly if you want the agent sending events.

## ClawLink vs. building it yourself

The alternative to ClawLink is usually manual OAuth app setup plus your own token handling, permission troubleshooting, and tool plumbing for OpenClaw. That is fine if you want to build and maintain the integration yourself. Most teams just want Google Analytics working from chat.

| | Manual | ClawLink |
|---|---|---|
| **Connection flow** | Register a Google Analytics app, configure redirect URLs, manage consent details, and reconnect users when auth settings drift. | Users connect Google Analytics through the hosted browser flow and ClawLink keeps the token lifecycle out of your app code. |
| **Ongoing maintenance** | You own refresh logic, permission debugging, environment config, and every provider-specific edge case for Google Analytics. | ClawLink handles the repetitive integration plumbing so your team can focus on the workflow instead of the infrastructure. |
| **Agent usability** | You still need to expose the right Google Analytics actions to the runtime in a format your agent can reliably use. | 67 tools for Google Analytics are already exposed through ClawLink, so the agent can read and act from chat immediately. |

## ClawLink vs. Composio

Composio also exposes Google Analytics to AI agents. It is developer infrastructure: Python and TypeScript SDKs, an MCP server, and a catalog past 1,000 apps, aimed at teams shipping agent products. ClawLink is built for OpenClaw users instead. You install the plugin once, connect Google Analytics in the browser, and the 67 tools above work from chat. There is no SDK, no config file, and no API key handling. Choosing between them? Read the full [Composio alternatives](https://claw-link.dev/hub/composio-alternatives) comparison.

### OpenClaw installed the Google Analytics skill but can't call the tools
The ClawHub skill teaches OpenClaw about Google Analytics, but the calls run through the ClawLink plugin and your connected account. Make sure Google Analytics is connected in the dashboard, then start a fresh chat so OpenClaw reloads the tool catalog. If OpenClaw runs as a persistent gateway, restart it so the new tools register.

### Connection succeeds but no tools appear
Reconnect Google Analytics from the dashboard, then start a fresh chat if the runtime still has the old tool catalog loaded.

### "Tool schema not loaded yet" error when calling Google Analytics tools
Google Analytics tool schemas load on demand the first time a tool runs and are cached after that, so this error usually clears on its own: wait a few seconds and retry the same request. If every Google Analytics call keeps failing with it in a fresh chat, reconnect from the dashboard, and contact support if it still persists — that pattern points to a configuration problem on our side, not something you can fix by reconnecting again.

### Google Analytics returns 403 or "permission denied" on one action while others work
Two usual causes. The connected account may not have access to the specific workspace, inbox, store, or project in the request — check that first. If access looks right, the agent may have sent a placeholder value (like "YOUR_ID" or an example id from documentation) instead of a real one: ask it to run a list or search tool first, then retry the action with a real id from those results. Most failures at this stage are one of these two, not ClawLink bugs.

### "The request's dimensions & metrics are incompatible" when running a Google Analytics report
This is the single most common Google Analytics failure in ClawLink, 21 of the 48 real tool errors we logged. GA4 stores some dimension and metric combinations separately and refuses to query them together, so the pairing is rejected rather than returned empty. The useful part is that Google names the exact field to drop: the message reads "Please remove eventCount to make the request compatible for example", or occasionally "Please add sessionCampaignName". Tell your agent to remove the single field the error names and retry, rather than rebuilding the request. If it needs to check before spending a call, `google_analytics_check_compatibility` takes the same dimensions and metrics and returns COMPATIBLE or INCOMPATIBLE per field. Note that it fails outright on an incompatible pair rather than always answering politely, so treat the failure itself as the verdict.

### "Did you mean engagementRate? Field averageEngagementTime is not a valid metric" from Google Analytics
The agent used a GA4 interface label instead of an API name. They differ, and the reporting UI never shows the API name. We have logged this with `averageEngagementTime`, `averageUserEngagementDuration`, `sessionCampaign`, `sessionGoogleAdsKeywordText` and `exits`, all of which look correct in the GA4 interface and none of which exist in the Data API. Google's suggestion in the error is usually right, so retry with the field it names. To stop it recurring, have the agent call `google_analytics_get_metadata` with `properties/0/metadata` first and pick `apiName` values from that response.

### "User does not have sufficient permissions for this property" from Google Analytics
Despite the wording, this is almost never a permissions problem. It is a property id the connected Google account cannot see, usually one the agent invented or carried over from an example. Ask it to call `google_analytics_list_account_summaries` and reuse a `property` value from that response verbatim. Reconnecting will not help and is the wrong first move here.

### "Request had insufficient authentication scopes" (ACCESS_TOKEN_SCOPE_INSUFFICIENT) from Google Analytics
Two distinct causes, and they need opposite responses. First, the tool may need Google's `analytics.edit` scope, which ClawLink does not request. Seven of the 67 tools are in that group, all of them account and property administration rather than reporting, and no amount of reconnecting will change it. Second, if a report or list tool fails this way, the grant itself is incomplete: ClawLink requests three Google scopes, which is the condition under which Google shows the consent screen with a separate checkbox per permission, and unchecking the Analytics box produces exactly this error. Reconnect from the dashboard and leave every box on Google's consent screen ticked.

### "Requests are limited to 10 metrics within a nested request" or "limited to 9 dimensions"
A hard Data API limit, not a ClawLink one, and batch reports count each nested request separately. Split the request into several calls of at most 9 dimensions and 10 metrics each and join the results on a dimension both share, usually `date`. Asking for everything in one report is the usual cause.

### "A dateRange is required for non-cohort reports" from Google Analytics
The report went out with no date range. Standard reports require at least one, for example `dateRanges=[\{"startDate": "30daysAgo", "endDate": "today"\}]`. The exception runs the other way: a cohort report supplies its own window through `cohortSpec` and fails if you also pass `dateRanges`.

### "Connected account is in EXPIRED state" when OpenClaw calls Google Analytics
Google's refresh token for this connection is no longer valid, usually because the grant was revoked in the Google account, the password changed, or the account sat unused long enough for Google to expire it. This is the one case where reconnecting is the right answer: open the ClawLink dashboard, reconnect Google Analytics, and leave every box ticked on Google's consent screen. It is rare, 2 of the 48 real Google Analytics failures we have logged.

### OAuth finished in the browser but the account is still missing
Try reconnecting Google Analytics and complete the consent flow in the same browser session. Partial OAuth approvals or switching accounts mid-flow can leave the connection incomplete.

### Is there a OpenClaw Google Analytics integration?
Yes. ClawLink is the fastest way to connect OpenClaw to Google Analytics: link your Google Analytics account once in the browser and OpenClaw can call the Google Analytics API through 67 ready-made tools — no custom code or token handling.

### How do I add Google Analytics to OpenClaw with ClawLink?
Paste the setup prompt from this page into OpenClaw. It installs the ClawLink Google Analytics skill from ClawHub, then you click Connect in the dashboard to authorize Google Analytics. OpenClaw calls the tools from the next message — no config files or API keys to manage.

### How long does it take to connect Google Analytics to OpenClaw?
About two minutes. Sign in, click Connect next to Google Analytics in the dashboard, authenticate, and OpenClaw can use it from the next chat message.

### Why use ClawLink instead of wiring Google Analytics up myself?
The alternative to ClawLink is usually manual OAuth app setup plus your own token handling, permission troubleshooting, and tool plumbing for OpenClaw. That is fine if you want to build and maintain the integration yourself. Most teams just want Google Analytics working from chat.

### Do I need a Google Cloud project or a service account to connect Google Analytics to OpenClaw?
No. That is the requirement every other route imposes, including Google's own MCP server, which asks you to enable the Analytics Data and Admin APIs in a Cloud project, create an OAuth client or an impersonable service account, run a gcloud login, and point a config file at the credentials JSON on disk. ClawLink owns the verified OAuth app instead. You click Connect, approve on Google's consent screen, and ClawLink holds and refreshes the token. There is no Cloud project, no OAuth client, no JSON key on your machine, and no Property Access Management step to grant a robot account access.

### Which Google Analytics permissions does ClawLink ask for?
Three scopes: `https://www.googleapis.com/auth/analytics.readonly`, `https://www.googleapis.com/auth/analytics` and `https://www.googleapis.com/auth/userinfo.profile`. Because that is more than one non-sign-in scope, Google shows its granular consent screen with a checkbox per permission, and the connection only works if you leave them ticked. ClawLink does not request `analytics.edit`, so it cannot create, rename or archive properties, custom dimensions or custom metrics. You can review or revoke the grant at any time under Third-party apps and services in your Google account.

### Can OpenClaw change my Google Analytics configuration?
Not through ClawLink today. The 67 tools include GA4 Admin API endpoints that would edit a property, but they need the `analytics.edit` scope ClawLink does not request, so they return 403. In practice the integration is reporting and inspection: run standard, pivot, funnel and realtime reports, read property, audience, data stream, key event and link configuration, and check field compatibility. If you need GA4 configuration writes, that is a genuine limit of this integration rather than something a reconnect will fix.

### How is this different from the official Google Analytics MCP server?
Google's server is open source, still labelled experimental, read-only by Google's own description, and runs locally over stdio, which means it cannot be used from a hosted or phone-based agent at all. Getting to a first query needs pipx, Python 3.10 or newer, the gcloud CLI, a Google Cloud project, two manually enabled APIs and an OAuth client you create. It registers nine tools, seven of which its README documents. ClawLink exposes 67 through a hosted connection with no local runtime and nothing to keep running, at the cost of routing calls through our infrastructure rather than your machine. If you want a local, self-owned setup and are comfortable with Google Cloud, the official server is a reasonable choice.

### OpenClaw installed the Google Analytics skill but can't call the tools
The ClawHub skill teaches OpenClaw about Google Analytics, but the calls run through the ClawLink plugin and your connected account. Make sure Google Analytics is connected in the dashboard, then start a fresh chat so OpenClaw reloads the tool catalog. If OpenClaw runs as a persistent gateway, restart it so the new tools register.

## Related

- [Google Super tools](https://claw-link.dev/openclaw/google-super) — Unified access to multiple Google services in one integration
- [Google Drive](https://claw-link.dev/openclaw/google-drive) — Upload, search, and manage files
- [OpenClaw Google Classroom integration](https://claw-link.dev/openclaw/google-classroom) — Manage classes, coursework, and students
