返回顶部
p

plausible-analytics

Track pageviews and custom events via the Plausible Events API, and query stats (top pages, top sources, countries, realtime visitors). Use when you need to send analytics events or fetch analytics data from a self-hosted or plausible.io site.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
105
下载量
0
收藏
概述
安装方式
版本历史

plausible-analytics

# Plausible Analytics Track events and query stats from Plausible Analytics (self-hosted or plausible.io). ## Configuration Set these environment variables before use: ```bash # Your site domain (e.g. example.com) export PLAUSIBLE_SITE_DOMAIN="example.com" # Your Plausible API key (for stats endpoints) export PLAUSIBLE_API_KEY="your-api-key" # Plausible base URL (default: https://plausible.io for hosted) # For self-hosted, set to your instance URL export PLAUSIBLE_BASE_URL="https://plausible.io" ``` ## Track Pageview ```bash bash skills/plausible-analytics/scripts/track.sh \ --domain "$PLAUSIBLE_SITE_DOMAIN" \ --url "https://example.com/blog/post-1" \ --referrer "https://google.com" ``` Options: - `--domain` — Site domain (default: $PLAUSIBLE_SITE_DOMAIN) - `--url` — Page URL being viewed (required) - `--referrer` — Referring URL (optional) - `--base-url` — Plausible base URL (default: $PLAUSIBLE_BASE_URL) ## Track Custom Event ```bash bash skills/plausible-analytics/scripts/track.sh \ --domain "$PLAUSIBLE_SITE_DOMAIN" \ --event "Signup" \ --props "{\"plan\":\"pro\",\"source\":\"newsletter\"}" ``` Options: - `--domain` — Site domain - `--event` — Custom event name (e.g. "Signup", "Button Click") - `--props` — JSON object with event properties (optional) - `--base-url` — Plausible base URL ## Get Stats Summary ```bash bash skills/plausible-analytics/scripts/stats.sh \ --domain "$PLAUSIBLE_SITE_DOMAIN" \ --period "30d" \ --compare "previous_period" ``` Options: - `--domain` — Site domain - `--period` — Time period: `6mo`, `12mo`, `day`, `7d`, `30d`, `month` (default: 30d) - `--compare` — Compare to previous period: `previous_period` (optional) - `--base-url` — Plausible base URL (default: $PLAUSIBLE_BASE_URL) Returns: pageviews, unique visitors, bounce rate, visit duration, total pageviews ## Get Top Pages ```bash bash skills/plausible-analytics/scripts/top-pages.sh \ --domain "$PLAUSIBLE_SITE_DOMAIN" \ --period "30d" \ --limit 10 ``` Options: - `--domain` — Site domain - `--period` — Time period (default: 30d) - `--limit` — Number of pages to return (default: 10) - `--base-url` — Plausible base URL ## Get Realtime Visitors ```bash bash skills/plausible-analytics/scripts/realtime.sh \ --domain "$PLAUSIBLE_SITE_DOMAIN" ``` Options: - `--domain` — Site domain - `--base-url` — Plausible base URL Returns: current visitors on site, pageviews in last 30 min, top pages currently viewed ## Notes - The Events API (`/api/event`) is used without authentication for tracking - The Stats API (`/api/v1/stats`) requires `PLAUSIBLE_API_KEY` set in the request header - For self-hosted Plausible, set `PLAUSIBLE_BASE_URL` to your instance - All scripts output JSON or plain text depending on the endpoint

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 plausible-analytics-agent-1776022359 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 plausible-analytics-agent-1776022359 技能

通过命令行安装

skillhub install plausible-analytics-agent-1776022359

下载 Zip 包

⬇ 下载 plausible-analytics v1.0.0

文件大小: 5.86 KB | 发布时间: 2026-4-13 11:29

v1.0.0 最新 2026-4-13 11:29
- Initial release: Track pageviews and custom events, and fetch analytics stats from Plausible Analytics.
- Supports both self-hosted and plausible.io setups.
- Includes scripts to:
- Track pageviews and custom events via the Events API.
- Fetch stats summary, top pages, and realtime visitors.
- Requires setting environment variables for site domain and API key.
- Outputs data in JSON or plain text format.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部