PHPackages                             jalismahamud/traffic-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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. jalismahamud/traffic-analytics

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

jalismahamud/traffic-analytics
==============================

A Laravel package for traffic and activity logging with analytics dashboard

v3.2.0(1mo ago)17MITBladePHP ^8.1

Since Apr 8Pushed 1mo agoCompare

[ Source](https://github.com/Jalismahamud/traffic-analytics)[ Packagist](https://packagist.org/packages/jalismahamud/traffic-analytics)[ RSS](/packages/jalismahamud-traffic-analytics/feed)WikiDiscussions main Synced 2w ago

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

 [ ![Latest Version](https://camo.githubusercontent.com/ea0121330b49661bbcfb7b34ddf4f7a5839a3f5c4354366f9c698329b136eb64/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a616c69736d6168616d75642f747261666669632d616e616c79746963733f7374796c653d666c61742d73717561726526636f6c6f723d334334303741) ](https://packagist.org/packages/jalismahamud/traffic-analytics) [ ![Total Downloads](https://camo.githubusercontent.com/f47c7df3ca6fea75b661e8362a0b7dfb36ec9685e1e1b7a62f3d5106d9f51d92/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a616c69736d6168616d75642f747261666669632d616e616c79746963733f7374796c653d666c61742d73717561726526636f6c6f723d323263353565) ](https://packagist.org/packages/jalismahamud/traffic-analytics) [![Laravel](https://camo.githubusercontent.com/19fb68ff22233859831fd62ff3183374c2ba4403811323d90be073a923fde188/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d3130253242253230253743253230313125324225323025374325323031322532422d4646324432303f7374796c653d666c61742d737175617265266c6f676f3d6c61726176656c)](https://camo.githubusercontent.com/19fb68ff22233859831fd62ff3183374c2ba4403811323d90be073a923fde188/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d3130253242253230253743253230313125324225323025374325323031322532422d4646324432303f7374796c653d666c61742d737175617265266c6f676f3d6c61726176656c) [![PHP](https://camo.githubusercontent.com/43a52de372d08e615769aeeed8ba305d51236062c2f310351a08c9805d833f33/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e312532422d3737374242343f7374796c653d666c61742d737175617265266c6f676f3d706870)](https://camo.githubusercontent.com/43a52de372d08e615769aeeed8ba305d51236062c2f310351a08c9805d833f33/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e312532422d3737374242343f7374796c653d666c61742d737175617265266c6f676f3d706870) [![License](https://camo.githubusercontent.com/7d217ebb91a61cb4d98e70dee31eb08e0a5f71bc518ebd4151a73c6fb1191d00/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d626c75653f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/7d217ebb91a61cb4d98e70dee31eb08e0a5f71bc518ebd4151a73c6fb1191d00/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d626c75653f7374796c653d666c61742d737175617265)

Laravel Traffic Analytics
=========================

[](#laravel-traffic-analytics)

 A powerful, plug-and-play Laravel package for tracking, analyzing, and visualizing your application's HTTP traffic — with a beautiful real-time dashboard, dark mode, CSV export, and zero configuration required.

---

Features
--------

[](#features)

- **Automatic HTTP Traffic Logging** via middleware — zero manual code needed
- **Beautiful Analytics Dashboard** with real-time charts (Chart.js)
- **Dark Mode** support with toggle
- **Flexible Date Filtering** — Today, Last 7 Days, Last 30 Days, Custom Range
- **Traffic Over Time** line chart with Avg Response Time overlay
- **Status Code Distribution** doughnut chart (2xx / 3xx / 4xx / 5xx)
- **Top Visited URLs** with popularity bar chart
- **HTTP Method Distribution** pie chart (GET / POST / PUT / DELETE)
- **Top IP Addresses** with hit count
- **Recent Requests** live log table
- **CSV Export** for any date range
- **Auto-refresh** every 15 seconds
- **Response Caching** for high-traffic sites

---

Screenshots
-----------

[](#screenshots)

### Dashboard Overview — Light Mode

[](#dashboard-overview--light-mode)

[![Traffic Analytics Dashboard](screenshots/dashboard-light.jpg)](screenshots/dashboard-light.jpg)

### Dashboard Overview — Dark Mode

[](#dashboard-overview--dark-mode)

[![Dark Mode Dashboard](screenshots/dashboard-dark.jpg)](screenshots/dashboard-dark.jpg)

### Top Visited URLs &amp; HTTP Methods

[](#top-visited-urls--http-methods)

[![Top URLs and HTTP Methods](screenshots/charts.jpg)](screenshots/charts.jpg)

### Top URLs Table

[](#top-urls-table)

[![Top URLs Table](screenshots/top-urls.jpg)](screenshots/top-urls.jpg)

### Recent Requests &amp; Top IPs

[](#recent-requests--top-ips)

[![Recent Requests](screenshots/recent-logs.jpg)](screenshots/recent-logs.jpg)

---

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

[](#installation)

### Step 1 — Install via Composer

[](#step-1--install-via-composer)

```
composer require jalismahamud/traffic-analytics
```

### Step 2 — Publish Config &amp; Run Migration

[](#step-2--publish-config--run-migration)

```
php artisan vendor:publish --tag=traffic-analytics-config
php artisan migrate
```

### Done!

[](#done)

Visit your dashboard at:

```
/admin/traffic

```

> The middleware registers automatically. No extra route or kernel changes needed.

---

Configuration (Optional)
------------------------

[](#configuration-optional)

Publish the config file to customize behavior:

```
php artisan vendor:publish --tag=traffic-analytics-config
```

---

Dashboard Sections
------------------

[](#dashboard-sections)

SectionDescription**Metric Cards**Total requests, unique visitors, avg response time, error rate, today's stats**Traffic Over Time**Line chart showing request volume and avg response time per hour/day**Status Distribution**Doughnut chart — 2xx success, 3xx redirects, 4xx client errors, 5xx server errors**Top Visited URLs**Horizontal bar chart of most-hit endpoints**HTTP Methods**Pie chart breakdown of GET, POST, PUT, PATCH, DELETE**Top URLs Table**Tabular view with hits, avg response time, and popularity bar**Recent Requests**Live scrollable log of latest requests with method, status, IP, timing**Top IP Addresses**Most active IPs with request count and visual bar---

Database Schema
---------------

[](#database-schema)

The package creates a single `traffic_logs` table:

ColumnTypeDescription`id``bigint`Auto-increment primary key`url``text`Full request URL`method``varchar(10)`HTTP method (GET, POST, etc.)`ip_address``varchar(45)`Client IP (supports IPv6)`status_code``smallint`HTTP response status code`response_time``float`Response time in milliseconds`user_id``bigint`Authenticated user ID (nullable)`user_agent``text`Browser user agent string`referrer``text`HTTP referrer header`created_at``timestamp`When the request was logged---

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

[](#requirements)

RequirementVersionPHP`^8.1`Laravel`^10.0 | ^11.0 | ^12.0`DatabaseMySQL / MariaDB (uses `DATE_FORMAT`)---

Uninstalling
------------

[](#uninstalling)

```
php artisan migrate:rollback --path=vendor/jalismahamud/traffic-analytics/database/migrations
composer remove jalismahamud/traffic-analytics
```

---

Contributing
------------

[](#contributing)

Contributions are welcome! Please:

1. Fork the repository
2. Create a feature branch: `git checkout -b feature/my-feature`
3. Commit your changes: `git commit -m 'Add some feature'`
4. Push to the branch: `git push origin feature/my-feature`
5. Open a Pull Request

---

License
-------

[](#license)

This package is open-source software licensed under the [MIT License](LICENSE).

---

 Made with ❤️ for the Laravel community

###  Health Score

39

—

LowBetter than 85% of packages

Maintenance90

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity47

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

Total

6

Last Release

52d ago

Major Versions

v1.0.0 → v2.0.02026-04-08

v2.0.0 → v3.0.02026-04-18

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/124979469?v=4)[J\_a\_l\_i\_s](/maintainers/Jalismahamud)[@Jalismahamud](https://github.com/Jalismahamud)

---

Top Contributors

[![Jalismahamud](https://avatars.githubusercontent.com/u/124979469?v=4)](https://github.com/Jalismahamud "Jalismahamud (16 commits)")

---

Tags

laravellogginganalyticsactivity-logtraffic

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jalismahamud-traffic-analytics/health.svg)

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[larastan/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

6.4k51.0M7.6k](/packages/larastan-larastan)[simplestats-io/laravel-client

Analytics for Laravel. Track visitors, registrations, and payments. Discover which channels actually drive revenue, not just traffic. Server-side, GDPR compliant, ad-blocker proof.

5019.3k](/packages/simplestats-io-laravel-client)[api-platform/laravel

API Platform support for Laravel

59156.3k11](/packages/api-platform-laravel)[calebdw/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

15104.9k4](/packages/calebdw-larastan)

PHPackages © 2026

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