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(1mo ago)09[3 PRs](https://github.com/yezzmedia/laravel-analytics/pulls)MITPHPPHP ^8.3CI passing

Since Mar 19Pushed 1mo 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 1mo 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

40

—

FairBetter than 88% of packages

Maintenance89

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

55d ago

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

v0.1.12PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/be55b2e232d6a0aca2c807d7e6c7c7b73eb0c9fee353ae570c2167713c404e1c?d=identicon)[yezzmedia](/maintainers/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

[guava/calendar

Adds support for vkurko/calendar to Filament PHP.

298241.0k3](/packages/guava-calendar)[creagia/filament-code-field

A Filamentphp input field to edit or view code data.

58289.3k3](/packages/creagia-filament-code-field)[swisnl/filament-backgrounds

Beautiful backgrounds for Filament auth pages

54149.2k6](/packages/swisnl-filament-backgrounds)[hydrat/filament-table-layout-toggle

Filament plugin adding a toggle button to tables, allowing user to switch between Grid and Table layouts.

6292.3k1](/packages/hydrat-filament-table-layout-toggle)[tapp/filament-google-autocomplete-field

Filament plugin that provides a Google Autocomplete field

3098.1k](/packages/tapp-filament-google-autocomplete-field)[lara-zeus/popover

Zeus Popover is filamentphp component to show a Popover with custom content in tables and infolist

2968.2k3](/packages/lara-zeus-popover)

PHPackages © 2026

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