PHPackages                             yezzmedia/laravel-analytics - 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. yezzmedia/laravel-analytics

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

yezzmedia/laravel-analytics
===========================

First-party analytics and cookie consent management for Laravel and Filament.

v0.1.13(3mo ago)09[3 PRs](https://github.com/yezzmedia/laravel-analytics/pulls)MITPHPPHP ^8.3CI passing

Since Mar 19Pushed 3mo agoCompare

[ Source](https://github.com/yezzmedia/laravel-analytics)[ Packagist](https://packagist.org/packages/yezzmedia/laravel-analytics)[ RSS](/packages/yezzmedia-laravel-analytics/feed)WikiDiscussions main Synced 2mo ago

READMEChangelog (10)Dependencies (17)Versions (27)Used By (0)

Laravel Analytics
=================

[](#laravel-analytics)

[![PHP](https://camo.githubusercontent.com/dade50b75279c7dd4ecb8953093584592f67c2f8ec1284de559607b17989ee8e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e33253230253743253230382e34253230253743253230382e352d3737376262342e737667)](#requirements)[![Laravel](https://camo.githubusercontent.com/ef62b36085c22fed47bba5fa9d2dbad391f8e989fc4bcfe91fdf364979f9c29c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d31322e7825323025374325323031332e782d6666326432302e737667)](#requirements)[![Filament](https://camo.githubusercontent.com/cee68bd52874d50a97a9fbbadb13a44bd47f79dfb4d30d6582a22d0887cd35c2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f46696c616d656e742d352e782d6635396530622e737667)](#requirements)

First-party analytics package for page tracking, consent-aware telemetry, and Filament analytics dashboards.

`yezzmedia/laravel-analytics` can run in standalone mode or integrate into operations flows. It depends on `yezzmedia/laravel-ops` as the shared operations foundation.

---

Table of Contents
-----------------

[](#table-of-contents)

- [Highlights](#highlights)
- [Architecture](#architecture)
- [Requirements](#requirements)
- [Installation](#installation)
- [Filament Modes](#filament-modes)
- [Tracking Pipeline](#tracking-pipeline)
- [Widgets and Charts](#widgets-and-charts)
- [Configuration](#configuration)
- [Testing](#testing)
- [Dependency Policy](#dependency-policy)

---

Highlights
----------

[](#highlights)

- Middleware-driven page tracking with consent support.
- Runtime settings and cookie banner controls.
- Rich analytics dashboards with trend and distribution charts.
- Optional operations-panel integration.
- Analytics settings page for runtime behavior control.
- Pruning command for data lifecycle management.

---

Architecture
------------

[](#architecture)

 ```
flowchart LR
    Request[HTTP Request] --> Tracking[TrackPageViews Middleware]
    Tracking --> PageViews[(analytics_page_views)]
    Runtime[(analytics_runtime_settings)] --> Banner[InjectCookieBanner Middleware]
    PageViews --> Insights[AnalyticsInsights]
    Insights --> Dashboard[Filament Analytics Dashboard]
    Analytics --> Ops[yezzmedia/laravel-ops]
```

      Loading ---

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

[](#requirements)

- PHP `^8.3` (CI validated on 8.3, 8.4, and 8.5)
- Laravel `^12.0|^13.0`
- Filament `^5.0`
- `yezzmedia/laravel-ops` `^0.1.4`

---

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

[](#installation)

```
composer require yezzmedia/laravel-analytics
```

The package service provider is auto-discovered.

Run migrations in the host app to provision analytics tables.

---

Filament Modes
--------------

[](#filament-modes)

Analytics supports panel integration modes via config:

- `operations` mode: register analytics pages in operations context.
- `auto` mode: auto-detect and choose integration strategy.

Primary pages:

- `AnalyticsDashboardPage`
- `AnalyticsSettingsPage`

---

Tracking Pipeline
-----------------

[](#tracking-pipeline)

1. `InjectCookieBanner` can render runtime-controlled consent UI.
2. `TrackPageViews` captures request metadata.
3. Data is persisted in `analytics_page_views`.
4. `AnalyticsInsights` aggregates and shapes chart datasets.
5. Filament widgets render trends, breakdowns, and top lists.

---

Widgets and Charts
------------------

[](#widgets-and-charts)

The package includes multiple analytics widgets, including:

- traffic trends
- top routes/pages/referrers
- country and audience breakdowns
- method and status-code distributions
- latency buckets
- hourly and weekday traffic

This gives both high-level and operationally useful slices from the same event stream.

---

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

[](#configuration)

Primary config file:

- `config/analytics.php`

Key areas:

- feature toggles and runtime defaults
- middleware behavior and cookie banner integration
- filament integration mode
- operations navigation injection toggles

---

Testing
-------

[](#testing)

Run full tests:

```
vendor/bin/pest
```

Run formatting:

```
vendor/bin/pint --format=agent
```

---

Dependency Policy
-----------------

[](#dependency-policy)

- `laravel-analytics` depends on `laravel-ops`.
- `laravel-analytics` must not depend on `laravel-user-center`.
- Analytics domain logic remains in this package; shared operations concerns remain in `laravel-ops`.

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance81

Actively maintained with recent releases

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity49

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 ~0 days

Total

14

Last Release

101d ago

PHP version history (2 changes)v0.1.0PHP ^8.2

v0.1.12PHP ^8.3

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/107888802?v=4)[Yezz-Media](/maintainers/yezzmedia)[@yezzmedia](https://github.com/yezzmedia)

---

Top Contributors

[![yezzmedia](https://avatars.githubusercontent.com/u/107888802?v=4)](https://github.com/yezzmedia "yezzmedia (14 commits)")

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/yezzmedia-laravel-analytics/health.svg)

```
[![Health](https://phpackages.com/badges/yezzmedia-laravel-analytics/health.svg)](https://phpackages.com/packages/yezzmedia-laravel-analytics)
```

###  Alternatives

[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)[stephenjude/filament-jetstream

A Laravel starter kit built with Filament inspired by Jetstream.

17760.2k3](/packages/stephenjude-filament-jetstream)[stephenjude/filament-debugger

About

104162.2k2](/packages/stephenjude-filament-debugger)[codewithdennis/filament-select-tree

The multi-level select field enables you to make single selections from a predefined list of options that are organized into multiple levels or depths.

329530.5k29](/packages/codewithdennis-filament-select-tree)[stephenjude/filament-feature-flags

Filament implementation of feature flags and segmentation with Laravel Pennant.

122177.8k1](/packages/stephenjude-filament-feature-flags)[finity-labs/fin-mail

A powerful email template manager and composer for Filament with dynamic token replacement, template versioning, and inline email sending.

284.5k1](/packages/finity-labs-fin-mail)

PHPackages © 2026

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