umami-stats

Web & Frontend Development
v1.0.0
Benign

Query Umami Cloud (v2) analytics data via API using an environment-provided API key.

872 downloads872 installsby @hfichter

Setup & Installation

Install command

clawhub install hfichter/umami-stats

If the CLI is not installed:

Install command

npx clawhub@latest install hfichter/umami-stats

Or install with OpenClaw CLI:

Install command

openclaw skills install hfichter/umami-stats

or paste the repo link into your assistant's chat

Install command

https://github.com/openclaw/skills/tree/main/skills/hfichter/umami-stats

What This Skill Does

Provides read-only access to Umami analytics data via the Umami Cloud v2 API or a self-hosted Umami instance. A Python script handles endpoint selection, authentication, and time-range presets so agents can fetch traffic, page, event, session, and report data without manual API setup.

The included query script abstracts auth differences between cloud and self-hosted Umami and handles path mapping automatically, so agents can fetch data with a single command instead of constructing raw API calls.

When to Use It

  • Checking weekly website traffic trends
  • Finding top-performing pages over the last 30 days
  • Monitoring signup click events over a custom date range
  • Pulling raw analytics data to plan a marketing experiment
  • Comparing current week vs previous week session counts
View original SKILL.md file
# Umami Stats (Read-only API skill)

Use this skill as a **data-access layer**: fetch Umami analytics data, then let the agent decide analysis/strategy.

## Required environment variables

- `UMAMI_API_KEY` (required)
- `UMAMI_BASE_URL` (optional, default: `https://api.umami.is`)
- `UMAMI_WEBSITE_ID` (optional default site)
- `UMAMI_DEPLOYMENT` (optional: `cloud` or `self-hosted`, default: `cloud`)

## API path conventions (explicit)

- **Umami Cloud:** `https://api.umami.is/v1/...`
- **Self-hosted Umami:** `https://<your-host>/api/...`

The script supports both:
- `--deployment cloud` → uses cloud behavior (`/v1` + `x-umami-api-key`)
- `--deployment self-hosted` → uses self-hosted behavior (`/api` + `Authorization: Bearer ...`)

## Read-only workflow

1. Pick endpoint from docs or `references/read-endpoints.md`.
2. Run `scripts/umami_query.py` with endpoint + params.
3. Use presets (`today`, `last7d`, etc.) or custom `startAt`/`endAt`.
4. Analyze returned JSON for the user task.

## Quick commands

```bash
# 1) List websites
python3 scripts/umami_query.py --endpoint /v1/websites

# 2) Website stats for last 7 days (default website from env)
python3 scripts/umami_query.py \
  --endpoint /v1/websites/{websiteId}/stats \
  --preset last7d

# 3) Top pages with explicit website id
python3 scripts/umami_query.py \
  --endpoint /v1/websites/{websiteId}/pageviews \
  --website-id "$UMAMI_WEBSITE_ID" \
  --preset last30d

# 4) Events series with custom window
python3 scripts/umami_query.py \
  --endpoint /v1/websites/{websiteId}/events/series \
  --param startAt=1738368000000 \
  --param endAt=1738972799000

# 5) Legacy path auto-mapping in cloud mode (/api/... -> /v1/...)
python3 scripts/umami_query.py --endpoint /api/websites/{websiteId}/stats --preset last7d

# 6) Self-hosted example (/v1/... auto-maps to /api/...)
python3 scripts/umami_query.py \
  --deployment self-hosted \
  --base-url "https://umami.example.com" \
  --endpoint /v1/websites/{websiteId}/stats \
  --preset last7d
```

## Natural trigger examples

- “How was traffic this week?”
- “Top pages in the last 30 days”
- “Show event trends for signup clicks”
- “Compare current week vs previous week”
- “Give me raw Umami data to build a marketing experiment plan”

## Notes

- Keep requests **read-only** (`GET`).
- Prefer explicit time windows for reproducibility.
- For unknown endpoints, consult `https://v2.umami.is/docs/api` and then query with the script.
- Prefer `/v1/...` endpoints in cloud mode, `/api/...` in self-hosted mode.
- Auth headers are mode-specific: cloud uses `x-umami-api-key`; self-hosted uses `Authorization: Bearer ...`.
- `metrics` endpoints require a `type` query param. The script now auto-defaults to `type=url` if omitted.
- For `/v1/reports/*` endpoints, the script auto-adds `websiteId` from `--website-id` / `UMAMI_WEBSITE_ID` when available.
- On Umami Cloud, `/v1/users/*` endpoints can return 403 for normal user API keys (expected in many accounts).

## Resources

- Endpoint map: `references/read-endpoints.md`
- Query helper: `scripts/umami_query.py`

Example Workflow

Here's how your AI assistant might use this skill in practice.

INPUT

User asks: Checking weekly website traffic trends

AGENT
  1. 1Checking weekly website traffic trends
  2. 2Finding top-performing pages over the last 30 days
  3. 3Monitoring signup click events over a custom date range
  4. 4Pulling raw analytics data to plan a marketing experiment
  5. 5Comparing current week vs previous week session counts
OUTPUT
Query Umami Cloud (v2) analytics data via API using an environment-provided API key.

Share this skill

Security Audits

VirusTotalBenign
OpenClawBenign
View full report

These signals reflect official OpenClaw status values. A Suspicious status means the skill should be used with extra caution.

Details

LanguageMarkdown
Last updatedMar 1, 2026