Plausible Analytics
name: plausible-analytics
by chloepark85 · published 2026-03-22
$ claw add gh:chloepark85/chloepark85-plausible-analytics---
name: plausible-analytics
description: Query and analyze website analytics from Plausible Analytics. Use when you need to check real-time visitors, get page views and visitor statistics for a time period, analyze traffic sources or top pages, examine geographic distribution, or generate analytics reports and insights for websites tracked with Plausible Analytics.
metadata:
openclaw:
requires:
env:
- PLAUSIBLE_API_KEY
bins:
- node
primaryEnv: PLAUSIBLE_API_KEY
---
# Plausible Analytics
Overview
Retrieve and analyze website analytics data from Plausible Analytics API. Supports real-time visitor tracking, historical statistics, traffic source analysis, and detailed breakdowns by page, source, or country.
Quick Start
All scripts require `PLAUSIBLE_API_KEY` environment variable. Site ID can be provided via `PLAUSIBLE_SITE_ID` environment variable or as a script argument.
# Set API key
export PLAUSIBLE_API_KEY="your-api-key"
# Quick example: Get today's stats
node scripts/stats.mjs example.com --period dayReal-Time Visitors
Check how many people are currently viewing your site:
node scripts/realtime.mjs <site-id>Example output:
{
"visitors": 42
}Statistics
Get page views, visitors, bounce rate, and visit duration for a time period:
node scripts/stats.mjs <site-id> [--period day|7d|30d|month|6mo|12mo] [--date YYYY-MM-DD]Parameters:
Example:
# Get today's stats
node scripts/stats.mjs example.com
# Get last 7 days
node scripts/stats.mjs example.com --period 7d
# Get stats for a specific month
node scripts/stats.mjs example.com --period month --date 2026-02-01Example output:
{
"results": {
"visitors": {
"value": 1234
},
"pageviews": {
"value": 5678
},
"bounce_rate": {
"value": 45
},
"visit_duration": {
"value": 180
}
}
}Detailed Breakdown
Analyze traffic by specific dimensions (pages, sources, countries, etc.):
node scripts/breakdown.mjs <site-id> <property> [--period day|7d|30d] [--limit N]Properties:
Example:
# Top 10 pages in the last 7 days
node scripts/breakdown.mjs example.com event:page --period 7d --limit 10
# Traffic sources today
node scripts/breakdown.mjs example.com visit:source
# Countries in the last 30 days
node scripts/breakdown.mjs example.com visit:country --period 30dExample output:
{
"results": [
{
"page": "/",
"visitors": 542,
"pageviews": 1024
},
{
"page": "/about",
"visitors": 123,
"pageviews": 145
}
]
}Environment Variables
Resources
scripts/
More tools from the same signal band
Order food/drinks (点餐) on an Android device paired as an OpenClaw node. Uses in-app menu and cart; add goods, view cart, submit order (demo, no real payment).
Sign plugins, rotate agent credentials without losing identity, and publicly attest to plugin behavior with verifiable claims and authenticated transfers.
The philosophical layer for AI agents. Maps behavior to Spinoza's 48 affects, calculates persistence scores, and generates geometric self-reports. Give your...