PHPackages                             thirtybittech/mini-metrics - 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. [Admin Panels](/categories/admin)
4. /
5. thirtybittech/mini-metrics

ActiveLibrary[Admin Panels](/categories/admin)

thirtybittech/mini-metrics
==========================

Privacy-first, self-hosted analytics for Statamic 6, built right into the Control Panel.

v1.0.0(1mo ago)022↓75%[2 issues](https://github.com/thirtyBitTech/mini_metrics/issues)MITPHPPHP ^8.3

Since Jul 12Pushed 1mo agoCompare

[ Source](https://github.com/thirtyBitTech/mini_metrics)[ Packagist](https://packagist.org/packages/thirtybittech/mini-metrics)[ RSS](/packages/thirtybittech-mini-metrics/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

Mini Metrics
============

[](#mini-metrics)

**Privacy-first, self-hosted analytics for Statamic 6 — beautifully built into your Control Panel.**

Mini Metrics gives you the numbers that actually matter — visitors, page views, top pages, referrers, browsers and countries — without shipping a single byte of your visitors' data to Google, Plausible, or anyone else. No third-party scripts. No cookie banners. No monthly SaaS bill. Just clean, fast analytics that live in *your* database and look right at home in the Statamic CP.

[![Mini Metrics dashboard](screenshot/screenshot_1.png)](screenshot/screenshot_1.png)

*Visitors, page views and traffic trends — right inside the Statamic Control Panel.*

---

Why Mini Metrics?
-----------------

[](#why-mini-metrics)

- 🔒 **Privacy by default** — Data never leaves your server. No external trackers, no cookies, GDPR-friendly out of the box.
- 🎨 **Native Control Panel UI** — Built entirely with Statamic 6's own components, so it feels first-party and looks perfect in both **light and dark** mode.
- ⚡ **Zero configuration** — Install, migrate, done. Page views are recorded automatically for every front-end request.
- 📅 **Flexible date ranges** — Jump between Today, 7 / 30 days, 6 / 12 months, or pick an exact **custom range** from a calendar.
- 🪶 **Lightweight by design** — A focused, no-bloat feature set. It's called *Mini* for a reason.
- 🗄️ **Scales with you** — Point the high-volume analytics data at a **separate database connection** so it never bloats your main app database.

---

Features
--------

[](#features)

- **Visitors &amp; page views** at a glance
- **Visitor timeseries** — a clean area chart that adapts its buckets (hourly → daily → weekly → monthly) to the range you pick
- **Top Pages** — your most-visited URLs
- **Top Referrers** — where your traffic comes from
- **By Browser** and **By Country** breakdowns
- **Show more / less** on every list, so long tables stay tidy
- **Custom date ranges** via a native calendar picker

[![Referrers, browsers and countries](screenshot/screenshot_2.png)](screenshot/screenshot_2.png)

*Top referrers, browsers and countries — with "Show more" to expand longer lists.*

[![Range selector with custom range](screenshot/screenshot_3.png)](screenshot/screenshot_3.png)

*Preset windows or an exact custom date range, in light or dark mode.*

---

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

[](#requirements)

- Statamic **6**, Laravel **12**, PHP **8.3+**
- The `intl` PHP extension (used to resolve country names)

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

[](#installation)

```
composer require thirtybittech/mini-metrics
php artisan migrate
```

That's it — page views are recorded automatically from here on.

Usage
-----

[](#usage)

The dashboard lives in the Control Panel under **Utilities → Mini Metrics**(`/cp/utilities/mini-metrics`). Browse your site to generate some traffic, then open it to see your stats. Use the **Range** selector at the top right to switch between Today, 7 / 30 days, 6 / 12 months, or a **custom date range** from the calendar.

> Mini Metrics is a utility, so it's available to any CP user with access to Utilities.

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

[](#configuration)

Publish the config file to customise the addon:

```
php artisan vendor:publish --tag=mini-metrics-config
```

### Keep analytics off your main database

[](#keep-analytics-off-your-main-database)

Mini Metrics writes a row for every front-end request, so on busy sites you may want to keep this data in its own database. Add the credentials to your `.env` — the addon registers the connection for you, no `config/database.php` edits required:

```
MINI_METRICS_DB_CONNECTION=mini_metrics
MINI_METRICS_DB_HOST=127.0.0.1
MINI_METRICS_DB_PORT=3306
MINI_METRICS_DB_DATABASE=mini_metrics
MINI_METRICS_DB_USERNAME=root
MINI_METRICS_DB_PASSWORD=secret
```

Create the database, then run `php artisan migrate` to build the `page_views` table on that connection. Leave `MINI_METRICS_DB_CONNECTION` unset to use your app's default connection. Already have a connection defined in `config/database.php`? Just set `MINI_METRICS_DB_CONNECTION` to its name.

> Set the connection **before** the first migration. If you change it afterwards, re-run the migration against the new connection.

### Exclude paths

[](#exclude-paths)

Requests matching any pattern in the `exclude` array are ignored (wildcards supported):

```
'exclude' => [
    'assets/*',
    'cart/*',
],
```

How it works
------------

[](#how-it-works)

A lightweight middleware records a page view — URI, referrer, browser, country and device — to a `page_views` table via Eloquent. The Control Panel dashboard reads it back with simple aggregate queries. No queues, no external calls, no magic.

License
-------

[](#license)

Mini Metrics is open-source software released under the [MIT License](LICENSE).

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance90

Actively maintained with recent releases

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

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

Unknown

Total

1

Last Release

49d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/176063521?v=4)[ThirtyBitTech](/maintainers/ThirtyBitTech)[@thirtyBitTech](https://github.com/thirtyBitTech)

---

Top Contributors

[![iSaadSalman](https://avatars.githubusercontent.com/u/736170?v=4)](https://github.com/iSaadSalman "iSaadSalman (1 commits)")

---

Tags

MetricsdashboardanalyticsstatamicprivacyStatamic addon

### Embed Badge

![Health badge](/badges/thirtybittech-mini-metrics/health.svg)

```
[![Health](https://phpackages.com/badges/thirtybittech-mini-metrics/health.svg)](https://phpackages.com/packages/thirtybittech-mini-metrics)
```

###  Alternatives

[statamic/statamic

Statamic

830185.7k](/packages/statamic-statamic)[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

138249.0k8](/packages/statamic-rad-pack-runway)[statamic/seo-pro

73578.9k](/packages/statamic-seo-pro)[duncanmcclean/statamic-cargo

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

3622.8k](/packages/duncanmcclean-statamic-cargo)[aerni/advanced-seo

Comprehensive SEO addon for Statamic with flexibility in mind

1819.9k](/packages/aerni-advanced-seo)[daun/statamic-mux

Seamless video encoding and streaming using Mux on Statamic sites

133.9k](/packages/daun-statamic-mux)

PHPackages © 2026

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