Website Analytics (fleets) for Openclaw

A read-only command-line and MCP interface for Google Analytics (GA4) designed for developers and AI agents.

yoanndefay
v1.0.0
Jul 4, 2026
0
344
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install website-analytics

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install website-analytics using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Website Analytics (fleets)?

Website Analytics (fleets) provides instant access to Google Analytics (GA4) data without the overhead of navigating heavy dashboards. It serves as an essential bridge in the Openclaw Skills ecosystem, enabling developers and autonomous AI agents to parse raw performance metrics on demand using a CLI or an MCP server.

By prioritizing agent-friendly output formats (such as JSON) and natural language queries, this tool helps engineering teams monitor traffic stats, sources, campaigns, conversion funnels, and landing page performance programmatically. With strict read-only security, it provides safe analytical insights across all your managed properties.

Website Analytics (fleets) Use Cases

  • Running instant, read-only analytics checks directly from your terminal or command line
  • Arming AI coding agents with real-time website performance data for automated reporting
  • Evaluating marketing campaign success dynamically using UTM parameters and tracking sources
  • Building and analyzing conversion funnels (e.g., pricing to checkout to thanks) from CLI outputs
  • Integrating GA4 data queries into automated developer workflows or continuous monitoring pipelines

How Website Analytics (fleets) Works

  1. Authentication: Sign in using a secure browser device flow or set a standard API token environment variable.
  2. Site Discovery: Auto-detect and link GA4 properties and Google Search Console domains to generate simple website slugs.
  3. Command Execution: Query analytics using slug-first syntax for views, sources, events, landing pages, and custom funnels.
  4. Structured Delivery: Receive response data in clean, readable tables or agent-friendly JSON formats.
  5. MCP Integration: Optionally run an MCP (Model Context Protocol) server to expose analytical capabilities directly to LLM agents as standard tools.

Website Analytics (fleets) Setup

First, authenticate and add your domains using the fleets CLI:

# Log in via device flow which opens a browser tab with an 8-character code
npx -y fleets login --browser

# Create your site and automatically link GA4 + Google Search Console
fleets add <domain> --detect

# Verify your sites and view quick performance sparklines
fleets list

Alternatively, you can authenticate non-interactively via tokens:

fleets login --token fl_xxx
# Or set as an environment variable
export FLEETS_TOKEN=fl_xxx

To expose this tool directly to your AI agents via Model Context Protocol, configure your MCP host:

{
  "mcpServers": {
    "fleets": {
      "command": "npx",
      "args": ["-y", "fleets-mcp"]
    }
  }
}

Website Analytics (fleets) Data Schema & Taxonomy

Query Parameter Options

Parameter Description Allowed Values
--range Time range filter 24h, 7d, 30d, 90d
--json Return raw structured JSON output Boolean
--limit Restrict number of returned records Integer (e.g., N)

Available Command Mapping

  • Summary Statistics: fleets <slug> (Retrieves GA4 visitors, pageviews, trends)
  • Traffic Sources: fleets <slug> sources (Lists traffic acquisition sources)
  • Campaign Analysis: fleets <slug> campaigns (UTM campaign metrics)
  • Referral Paths: fleets <slug> referrals (Details top referring hosts)
  • Conversion Funnels: fleets <slug> funnel <step1> <step2> ... (Calculates step-by-step conversion rates)

Website Analytics (fleets) Advanced Features

  • Natural Language Query Engine: Ask complex questions directly using the query command, e.g., fleets myblog query "which campaign drove the most signups last week?".
  • JSON-First Output: Force every tool or command to produce structured JSON data to seamlessly pipe metrics into other APIs, databases, or dashboards.
  • Full MCP Server Integration: Exposes tools like list_sites, stats, sources, campaigns, funnel, and ask directly to LLMs through standard input/output protocols.
  • Exportable Records: Dump structured daily metrics easily into raw CSV or JSON files via the native export utility.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*