Download the PHP package klickmanufaktur/statamic-umami-analytics without Composer
On this page you can find all versions of the php package klickmanufaktur/statamic-umami-analytics. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download klickmanufaktur/statamic-umami-analytics
More information about klickmanufaktur/statamic-umami-analytics
Files in klickmanufaktur/statamic-umami-analytics
Package statamic-umami-analytics
Short Description Reusable Statamic control panel analytics integration for Umami.
License proprietary
Homepage https://github.com/klickmanufaktur/statamic-umami-analytics
Informations about the package statamic-umami-analytics
Statamic Umami Analytics
Reusable Statamic addon for showing Umami analytics inside the control panel.
Features
- CP navigation item with an analytics overview.
- Read-only analytics tab on configured entry collections.
- Server-side Umami API client with timeouts and short cache TTL.
- Supports Umami Cloud API keys, self-hosted bearer tokens, and self-hosted username/password login.
{{ umami }}Antlers tag that renders the front-end tracking script.
Installation
Install as a Composer path repository while developing locally:
Then run:
Configuration
Publish the config or set environment variables directly.
Umami Cloud
Self-hosted with bearer token
Self-hosted with login
Dashboard Widget
The addon ships a compact CP dashboard widget (handle umami_analytics) showing
the key metrics (page views, visitors, visits, bounce rate) plus an optional
mini chart. Enable it in your app's config/statamic/cp.php under widgets:
The widget links through to the full Umami dashboard and respects the same configuration (API credentials, periods, dashboard URL) as the rest of the addon.
Tracking Script
Add the {{ umami }} tag to your layout (e.g. right before </head>) to render
the front-end tracking script:
This outputs:
The script URL is derived from dashboard_url (or api_url) by default. Set
UMAMI_SCRIPT_URL to override it, e.g. when the tracking script is served from
a different host than the API/dashboard.
Tracker attributes
Configure the data-* behaviour flags under tracking (see
tracker configuration):
[!IMPORTANT] Auto-derivation reads that environment's own
app.url, so a staging deployment would allow-list its own staging host and track itself. If staging/preview environments exist, setUMAMI_TRACKING_DOMAINSexplicitly to the production domain in every environment's.env(not just production) so only hits from the real domain are ever recorded.
Entry Tab
By default, the addon injects a Zugriffe tab into the pages collection.