klickmanufaktur/statamic-umami-analytics

Reusable Statamic control panel analytics integration for Umami.

Maintainers

Package info

github.com/klickmanufaktur/statamic-umami-analytics

Type:statamic-addon

pkg:composer/klickmanufaktur/statamic-umami-analytics

Statistics

Installs: 2

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.0 2026-06-20 18:09 UTC

This package is auto-updated.

Last update: 2026-06-20 18:13:01 UTC


README

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.

Installation

Install as a Composer path repository while developing locally:

{
    "repositories": [
        {
            "type": "path",
            "url": "../_packages/statamic-umami-analytics",
            "options": {
                "symlink": true
            }
        }
    ],
    "require": {
        "klickmanufaktur/statamic-umami-analytics": "*"
    }
}

Then run:

composer update klickmanufaktur/statamic-umami-analytics --with-dependencies
php artisan vendor:publish --tag=statamic-umami-analytics --force

Configuration

Publish the config or set environment variables directly.

Umami Cloud

UMAMI_API_URL=https://api.umami.is/v1
UMAMI_WEBSITE_ID=00000000-0000-0000-0000-000000000000
UMAMI_AUTH=api_key
UMAMI_API_KEY=...

Self-hosted with bearer token

UMAMI_API_URL=https://umami.example.com/api
UMAMI_WEBSITE_ID=00000000-0000-0000-0000-000000000000
UMAMI_AUTH=token
UMAMI_TOKEN=...

Self-hosted with login

UMAMI_API_URL=https://umami.example.com/api
UMAMI_WEBSITE_ID=00000000-0000-0000-0000-000000000000
UMAMI_AUTH=login
UMAMI_USERNAME=...
UMAMI_PASSWORD=...

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:

'widgets' => [
    [
        'type' => 'umami_analytics',
        'width' => 'md',   // sm | md | lg | full
        'days' => 30,      // must be one of the configured `periods`
        'chart' => true,   // show the mini chart
        'title' => 'Analytics',
    ],
],

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.

Entry Tab

By default, the addon injects a Zugriffe tab into the pages collection.

'entry_tab' => [
    'enabled' => true,
    'collections' => ['pages', 'news'],
    'tab' => 'analytics',
    'display' => 'Zugriffe',
    'field' => 'umami_analytics',
],