PHPackages                             mynetx/umami - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. mynetx/umami

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

mynetx/umami
============

Add GDPR-compliant Umami analytics and see stats insights on your dashboard

1.2.0(1w ago)119[1 issues](https://github.com/mynetx/umami/issues)MITPHPPHP ^8.2

Since May 31Pushed 1y agoCompare

[ Source](https://github.com/mynetx/umami)[ Packagist](https://packagist.org/packages/mynetx/umami)[ RSS](/packages/mynetx-umami/feed)WikiDiscussions main Synced today

READMEChangelog (3)Dependencies (6)Versions (4)Used By (0)

[![Latest Version on Packagist](https://camo.githubusercontent.com/a42e7e00715abefe59b2f4db72b08502884932041f976fe04cc708997ff6a08c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d796e6574782f756d616d693f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mynetx/umami)[![GitHub Release](https://camo.githubusercontent.com/4d13303d32bf8957b01469c622cb6a5911692ec755e29882f2a2a67b59fa2421/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f6d796e6574782f756d616d693f7374796c653d666c61742d737175617265)](https://github.com/mynetx/umami/releases)[![License](https://camo.githubusercontent.com/cb70013ecf03cd5909882e829bbb029ad2b1193fbc82dea9ebe03842e281e8c7/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6d796e6574782f756d616d693f7374796c653d666c61742d737175617265)](https://github.com/mynetx/umami/blob/main/LICENSE)

Umami Analytics for Statamic
============================

[](#umami-analytics-for-statamic)

This Statamic addon makes it easy to connect your site to a self-hosted [Umami](https://umami.is) instance.

It provides:

- 🧩 A tag to embed the Umami tracking script on your front-end pages
- 📊 A Control Panel widget to view your Umami stats right inside Statamic

---

Features
--------

[](#features)

✅ Add tracking to your Statamic templates with `{{ umami }}`
✅ Show Umami stats like visitors, page views, bounce rate, and visit duration
✅ Configure via environment variables and the `config/statamic/cp.php` widget array
✅ Multi-language support (English, German)
🚧 Time range selection coming soon

---

Requirements
------------

[](#requirements)

- Statamic 5.x or 6.x
- PHP 8.2 or higher (8.3+ required for Statamic 6)
- A running, self-hosted Umami instance with API access

> This addon currently works with self-hosted Umami only. Umami Cloud with API keys is not supported yet.

---

Installation
------------

[](#installation)

Install via Composer:

```
composer require mynetx/umami
```

---

Configuration
-------------

[](#configuration)

### Environment Variables

[](#environment-variables)

Add these to your `.env` file:

```
UMAMI_HOST=https://analytics.example.com
UMAMI_USERNAME=your-username
UMAMI_PASSWORD=your-password
UMAMI_WEBSITE_ID=your-website-id
UMAMI_TEAM_ID=your-team-id
```

VariableDescriptionExample`UMAMI_HOST`Your Umami base URL`UMAMI_USERNAME`Umami login usernameadmin`UMAMI_PASSWORD`Umami passwordsecure\_password`UMAMI_WEBSITE_ID`Website ID from your Umami siteabc123`UMAMI_TEAM_ID`Team ID (if applicable)abc123Find your website and team IDs in the URL when viewing your Umami dashboard.

---

### Widget Setup

[](#widget-setup)

To display stats in the Control Panel dashboard:

1. Open `config/statamic/cp.php`
2. Locate the `widgets` array
3. Add an entry for the Umami widget:

```
'widgets' => [
    [
        'type' => 'umami_stats',
        'title' => 'My Umami Stats',
        'host' => env('UMAMI_HOST'),
        'username' => env('UMAMI_USERNAME'),
        'password' => env('UMAMI_PASSWORD'),
        'website_id' => env('UMAMI_WEBSITE_ID'),
        'team_id' => env('UMAMI_TEAM_ID'),
        'timeframe' => '7d', // 24h, 7d, 30d, or 90d
    ],
],
```

💡 You can hardcode values or pull them from environment variables.

---

### Tracking Setup

[](#tracking-setup)

To embed the Umami tracking script in your site, add this to your Antlers layout or template:

```
{{ umami }}
```

or explicitly:

```
{{ umami:script }}
```

The script is only included when the current environment matches the `enabled_environments` config setting:

```
'enabled_environments' => ['production'],
```

Set it to `null` to allow output on all environments.

---

How It Works
------------

[](#how-it-works)

This addon connects to your Umami instance via these API endpoints:

- `POST /api/auth/login` — Authenticate and retrieve an access token
- `GET /api/websites/{websiteId}/stats` — Fetch your website’s analytics

Refer to the [Umami API documentation](https://umami.is/docs/api) for more details.

---

License
-------

[](#license)

MIT License

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance50

Moderate activity, may be stable

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~194 days

Total

3

Last Release

9d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6348321?v=4)[Joachim Rütter](/maintainers/mynetx)[@mynetx](https://github.com/mynetx)

---

Top Contributors

[![mynetx](https://avatars.githubusercontent.com/u/6348321?v=4)](https://github.com/mynetx "mynetx (12 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mynetx-umami/health.svg)

```
[![Health](https://phpackages.com/badges/mynetx-umami/health.svg)](https://phpackages.com/packages/mynetx-umami)
```

###  Alternatives

[statamic/seo-pro

68516.6k](/packages/statamic-seo-pro)[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135224.7k7](/packages/statamic-rad-pack-runway)[rias/statamic-redirect

29335.6k](/packages/rias-statamic-redirect)[duncanmcclean/statamic-cargo

Comprehensive e-commerce addon for Statamic. Build bespoke e-commerce sites without the complexity.

3416.9k](/packages/duncanmcclean-statamic-cargo)[jacksleight/statamic-bard-texstyle

18195.4k](/packages/jacksleight-statamic-bard-texstyle)[marcorieser/statamic-livewire

A Laravel Livewire integration for Statamic.

23111.5k14](/packages/marcorieser-statamic-livewire)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
