PHPackages                             stounhandj/laravel-traffic-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. stounhandj/laravel-traffic-metrics

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

stounhandj/laravel-traffic-metrics
==================================

v0.1(3y ago)04MITPHPPHP ^8.0

Since May 30Pushed 3y ago1 watchersCompare

[ Source](https://github.com/StounhandJ/laravel-traffic-metrics)[ Packagist](https://packagist.org/packages/stounhandj/laravel-traffic-metrics)[ RSS](/packages/stounhandj-laravel-traffic-metrics/feed)WikiDiscussions master Synced 1mo ago

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

HtmlDom-Laravel
===============

[](#htmldom-laravel)

[![Total Downloads](https://camo.githubusercontent.com/3e8af44fa17902e24397ec3ec749143276c77c5e7e8f03089094c07749706576/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73746f756e68616e646a2f6c61726176656c2d747261666669632d6d657472696373)](https://packagist.org/packages/stounhandj/laravel-traffic-metrics)[![Latest Stable Version](https://camo.githubusercontent.com/a8c543516ec6e16d4e34a0390d9be642e9fc2c5deef7083ff0684cf86475bc69/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73746f756e68616e646a2f6c61726176656c2d747261666669632d6d657472696373)](https://packagist.org/packages/stounhandj/laravel-traffic-metrics)[![License](https://camo.githubusercontent.com/b3e337c8379950dfe88ec7fc6c4878e6f9018ffd5ec66e60b212e76bce0d6116/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f73746f756e68616e646a2f6c61726176656c2d747261666669632d6d657472696373)](https://packagist.org/packages/stounhandj/laravel-traffic-metrics)

### A package for Laravel 6, 7, 8 to metrics unique page views using kafka

[](#a-package-for-laravel-6-7-8-to-metrics-unique-page-views-using-kafka)

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

[](#installation)

```
$ composer require stounhandj/laravel-traffic-metrics

```

Or

```
{
    "require": {
        "stounhandj/laravel-traffic-metrics": "^0.1.0"
    }
}
```

Setup
-----

[](#setup)

1. Use following:

```
php artisan vendor:publish --tag=traffic-metrics
php artisan vendor:publish --tag=laravel-kafka-config
```

According to the standard, a unique visit is considered to be a user's visit to the page once every 1 minute. This can be changed in the configuration. 2. Run migrations

```
php artisan migrate
```

3. Set up a connection to kafka: In config/kafka.php setup brokers. More information [here](https://junges.dev/documentation/laravel-kafka/v1.7/3-installation-and-setup)
4. Add provider in config/app.php:

```
StounhandJ\LaravelTrafficMetrics\TrafficMetricsProvider::class,
```

4. Add Middleware in Kernel.php:

```
'metrics' => \StounhandJ\LaravelTrafficMetrics\Middleware\MetricsMiddleware::class,
```

Usage
-----

[](#usage)

1. Use Middleware:

```
Route::get('/p/{product:id}', [ProductController::class, "index"])
    ->middleware("metrics")
    ->name("product.details");
```

2. Put the handler on permanent execution:

```
php artisan metrics:check
```

3. Getting metrics

```
Metrics::findByUri("/welcome")->getViews()
```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity42

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

1444d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8a56d387ac565d0b8c58a250620cd5282b6a88035a1eedfb0001ced526dcd49d?d=identicon)[StounhandJ](/maintainers/StounhandJ)

---

Top Contributors

[![StounhandJ](https://avatars.githubusercontent.com/u/58305548?v=4)](https://github.com/StounhandJ "StounhandJ (10 commits)")

### Embed Badge

![Health badge](/badges/stounhandj-laravel-traffic-metrics/health.svg)

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

###  Alternatives

[wireui/wireui

TallStack components

1.8k1.3M16](/packages/wireui-wireui)[livewire/volt

An elegantly crafted functional API for Laravel Livewire.

4195.3M84](/packages/livewire-volt)[ramonrietdijk/livewire-tables

Dynamic tables for models with Laravel Livewire

21147.4k](/packages/ramonrietdijk-livewire-tables)

PHPackages © 2026

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