Privacy-first analytics for NimbusCMS — an official plugin, and the one that grew the plugin system from a single capability into a real application platform.
It does two independent things; use either or both:
Every public page view is recorded server-side into a table this plugin owns — no cookies, no third-party requests, no personal data. Just a path, the referring host, and a timestamp. An Analytics page appears in the admin with:
- total pageviews over the last 30 days,
- a per-day chart (server-rendered SVG — no JavaScript),
- your top pages and top referrers.
Bots and your own internal navigation are filtered out. Nothing here slows a page down for visitors: recording happens after the response is sent, and can never break it.
Prefer a hosted analytics service? Set two environment variables and this plugin
injects its snippet into every public page's <head>:
ANALYTICS_PROVIDER=plausible ANALYTICS_DOMAIN=example.com # cookieless
ANALYTICS_PROVIDER=fathom ANALYTICS_SITE_ID=ABCDEF # cookieless
ANALYTICS_PROVIDER=ga ANALYTICS_MEASUREMENT_ID=G-XXXXXXX # Google Analyticscomposer require nimbuscms/analytics
php bin/nimbus migrate # creates the analytics tableDiscovery is automatic. Disable it without uninstalling in config/plugins.php:
return ['nimbuscms.analytics' => false];This plugin exercises six NimbusCMS plugin capabilities at once — migrations, storage, events, admin pages, and (for the agent) head contributions — using only the public plugin contract. It is the reference for building an "observe → store → show an admin view" plugin.
- PHP 8.2+, ext-json
- NimbusCMS (the events, migrations, storage and admin-page capabilities)
MIT.