PHPackages                             ads/statistics - 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. ads/statistics

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

ads/statistics
==============

Tracks basic user information to generate statistical data on page usage. Also provides additional information to debug 500 errors

3.0.20(3mo ago)36.4k2GPL-3.0-or-laterPHPPHP ^7.3|^8.0|^8.1|^8.2|^8.3|^8.4|^8.5

Since Jun 30Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/scs-ben/ads-statistics)[ Packagist](https://packagist.org/packages/ads/statistics)[ RSS](/packages/ads-statistics/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (10)Dependencies (2)Versions (48)Used By (0)

ads-statistics
==============

[](#ads-statistics)

### Audit/Error Logging Module for Laravel

[](#auditerror-logging-module-for-laravel)

The module will track the page view history for all users of the associated website. The module will log 500 error statistics to help with debugging code. Additionaly, the posted data for form submission will be saved in the database. The settings file has an array option that allows you to remove sensitive files from being saved in the tracking table.

Once configired, this plugin will automatically save page viewing history to the database.

*(Make sure to run "php artisan migrate" if updating)*

Step 1:

Set up composer, add the package to your require tag:

```
composer require ads/statistics

```

Step 2:

Publish and run migrations:

```
php artisan vendor:publish --provider=Ads\\Statistics\\StatisticsServiceProvider
php artisan migrate

```

Step 3:

Add Statistic logging to 'web' middleware in `app\Http\Kernel.php`:

```
    protected $middlewareGroups = [
        'web' => [
            ...
            \Ads\Statistics\Statistic::class,
        ],

```

Step 4:

In order to log 500 errors, you'll need to add some code to the app/Exceptions/Handler.php Add this interceptor to the register function Add to or create the *report* function before the return:

```
public function register()
{
	$this->reportable(function (Throwable $e) {
	    //
	});

	$this->reportable(function (\Exception $e) {
	    \Statistic::error($e);
	});
}

```

*\* Step 5 is only necessary if you have user authentication*

Step 5:

Edit the ***config/statistics.php*** file.

Please enter the column names from your user database table.

For example:

```
  'user_id' => 'email',
  'first_name' => 'first_name',
  'last_name' => 'last_name',
  'protected_fields' => ['password'],

```

###  Health Score

58

—

FairBetter than 98% of packages

Maintenance79

Regular maintenance activity

Popularity28

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity93

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 97.6% 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 ~86 days

Recently: every ~135 days

Total

47

Last Release

111d ago

Major Versions

1.0.2 → 2.1.62018-06-25

2.1.8 → 3.0.02019-09-09

2.1.9 → 3.0.32019-11-14

2.1.10 → 3.0.42020-02-26

2.1.11 → 3.0.92022-02-08

PHP version history (8 changes)1.0.1PHP &gt;=5.4.0

3.0.0PHP ^7.2

3.0.5PHP ^7.2.5

3.0.7PHP ^7.3|^8.0

3.0.14PHP ^7.3|^8.0|^8.1|^8.2

3.0.15PHP ^7.3|^8.0|^8.1|^8.2|^8.3

3.0.17PHP ^7.3|^8.0|^8.1|^8.2|^8.3|^8.4

3.0.18PHP ^7.3|^8.0|^8.1|^8.2|^8.3|^8.4|^8.5

### Community

Maintainers

![](https://www.gravatar.com/avatar/cab305a840c7a7b864ec07b39d88f1e8975c29fbd2865dcb398cad0b21b3a0ef?d=identicon)[scs-ben](/maintainers/scs-ben)

---

Top Contributors

[![scs-ben](https://avatars.githubusercontent.com/u/2318300?v=4)](https://github.com/scs-ben "scs-ben (40 commits)")[![Dylan-DPC](https://avatars.githubusercontent.com/u/99973273?v=4)](https://github.com/Dylan-DPC "Dylan-DPC (1 commits)")

---

Tags

audit-loglaravellaravel6laravel7laravel8phpphp8laraveladministrative site usage statisticsadditional error debugging

### Embed Badge

![Health badge](/badges/ads-statistics/health.svg)

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

###  Alternatives

[sentry/sentry-laravel

Laravel SDK for Sentry (https://sentry.io)

1.4k131.9M235](/packages/sentry-sentry-laravel)[spatie/laravel-health

Monitor the health of a Laravel application

88212.7M188](/packages/spatie-laravel-health)[psalm/plugin-laravel

Psalm plugin for Laravel

3345.4M354](/packages/psalm-plugin-laravel)[keepsuit/laravel-opentelemetry

OpenTelemetry integration for laravel

173666.7k1](/packages/keepsuit-laravel-opentelemetry)[spatie/laravel-flare

Send Laravel errors to Flare

131.6M8](/packages/spatie-laravel-flare)[api-platform/laravel

API Platform support for Laravel

58190.1k21](/packages/api-platform-laravel)

PHPackages © 2026

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