← 返回
数据分析 Key 中文

Umami Stats

Query Umami Cloud (v2) analytics data via API using an environment-provided API key. Use when agents need website traffic, pages, events, sessions, realtime, reports, or attribution data for analysis, planning, experiments, or monitoring. Includes read-only API querying patterns, endpoint selection guidance, and reusable scripts for flexible endpoint + time-range requests.
使用环境提供的API密钥查询Umami Cloud (v2)分析数据。适用于需要获取网站流量、页面、事件、会话、实时数据、报告或归因数据以进行分析、规划、实验或监控的场景。包含只读查询模式、端点选择指南及支持灵活端点与时间范围的可重用脚本。
hfichter
数据分析 clawhub v1.0.0 1 版本 99859.2 Key: 需要
★ 0
Stars
📥 1,418
下载
💾 19
安装
1
版本
#latest

概述

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:///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

# 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

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-28 23:08 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

data-analysis

Excel / XLSX

ivangdavila
创建、检查和编辑 Microsoft Excel 工作簿及 XLSX 文件,支持可靠的公式、日期、类型、格式、重算及模板保留功能。
★ 368 📥 140,551
data-analysis

Data Analysis

ivangdavila
{"answer":"数据分析与可视化。查询数据库、生成报告、自动化电子表格,将原始数据转化为清晰可行的见解。适用于:(1) 您……"}
★ 198 📥 65,154
data-analysis

Stock Analysis

udiedrichsen
{"answer":"基于雅虎财经数据,分析股票与加密货币。支持投资组合管理、自选股预警、股息分析、8维评分、热门趋势扫描及传闻/早期信号探测。适用于股票分析、持仓追踪、财报异动、加密监控、热门股追踪或提前发掘非主流传闻。"}
★ 270 📥 56,990