PHPackages                             actengage/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. actengage/metrics

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

actengage/metrics
=================

A abstraction for generating metrics in Laravel.

v2.0.1(1y ago)02.1kMITPHPPHP ^8.1

Since Jul 14Pushed 1y ago1 watchersCompare

[ Source](https://github.com/ActiveEngagement/metrics)[ Packagist](https://packagist.org/packages/actengage/metrics)[ RSS](/packages/actengage-metrics/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (5)Versions (9)Used By (0)

Metrics
=======

[](#metrics)

This package provides a standalone metrics API similar to Laravel Nova.

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

[](#requirements)

- Laravel 9.x+
- PHP 8.1+

Getting Started
---------------

[](#getting-started)

*Install via Composer*

```
composer require actengage/metrics

```

Value Metric
------------

[](#value-metric)

```
use Actengage\Metrics\Contracts\Result;
use Actengage\Metrics\Value;
use App\Models\User;
use Illuminate\Http\Request;

$metric = new class extends Value {
    public function ranges(): array {
        return [
            '5' => '5 Days',
            '10' => '10 Days',
            '15' => '15 Days',
            'P21D' => '21 Days',
            'today' => 'Today',
            'yesterday' => 'Yesterday',
            'MTD' => 'Month To Date',
            'QTD' => 'Quarter To Date',
            'YTD' => 'Year To Date',
            'ALL' => 'All Time'
        ];
    }
    public function calculate(Request $request): Result {
        return $this
            ->title('Total Users')
            ->description('The total number of users.')
            ->timezone('EST')
            ->range('P21D')
            ->count(User::class)
            ->prefix('#')
            ->suffix('users');
    }
};

$result = $metric->resolve(request()->merge([
    'range' => 'MTD'
]));
```

Trend Metric
------------

[](#trend-metric)

```
use Actengage\Metrics\Contracts\Result;
use Actengage\Metrics\Trend;
use App\Models\User;
use Illuminate\Http\Request;

$metric = new class extends Trend {
    public function calculate(Request $request): Result {
        return $this
            ->title('User Registrations')
            ->description('User registrations trending by day.')
            ->twelveHourTime()
            ->range($request->range)
            ->count(User::class, Trend::BY_DAYS)
            ->prefix('#')
            ->suffix('users');
    }
};

$result = $metric->resolve(request()->merge([
    'range' => 30
]));
```

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 71.4% 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 ~103 days

Recently: every ~113 days

Total

8

Last Release

711d ago

Major Versions

v0.9.2 → v1.0.02023-04-14

v1.0.2 → v2.0.02024-07-11

PHP version history (2 changes)v0.9.0PHP ^8.0

v1.0.0PHP ^8.1

### Community

Maintainers

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

---

Top Contributors

[![actengage](https://avatars.githubusercontent.com/u/33735047?v=4)](https://github.com/actengage "actengage (5 commits)")[![mitchellsolomon](https://avatars.githubusercontent.com/u/39250034?v=4)](https://github.com/mitchellsolomon "mitchellsolomon (2 commits)")

---

Tags

laravelMetricsstatistics

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

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

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

###  Alternatives

[markwalet/nova-modal-response

A Laravel Nova asset for Modal responses on an action.

17818.7k](/packages/markwalet-nova-modal-response)[firefly-iii/data-importer

Firefly III Data Import Tool.

7965.8k](/packages/firefly-iii-data-importer)[nickurt/laravel-akismet

Akismet for Laravel 11.x/12.x/13.x

98145.2k3](/packages/nickurt-laravel-akismet)[creasi/laravel-nusa

A Laravel package that aim to provide Indonesia' Administrative Data

997.7k2](/packages/creasi-laravel-nusa)[team-nifty-gmbh/tall-datatables

Server-side rendered datatables for Laravel and Livewire

1319.7k3](/packages/team-nifty-gmbh-tall-datatables)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

119.2k](/packages/tomshaw-electricgrid)

PHPackages © 2026

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