PHPackages                             bsharp/laralytics - 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. bsharp/laralytics

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

bsharp/laralytics
=================

A simple analytics tool for Laravel

v1.0.0-beta.24(10y ago)8304MITPHPPHP &gt;=5.4.0

Since Aug 12Pushed 10y ago1 watchersCompare

[ Source](https://github.com/bsharp/Laralytics)[ Packagist](https://packagist.org/packages/bsharp/laralytics)[ Docs](https://github.com/bsharp/laralytics)[ RSS](/packages/bsharp-laralytics/feed)WikiDiscussions master Synced 1mo ago

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

Laralytics
==========

[](#laralytics)

[![Build Status](https://camo.githubusercontent.com/668046ba80caa29ae8d7ddf355c15301c3d482e14ab26b815743bca7f3b544ed/68747470733a2f2f7472617669732d63692e6f72672f6273686172702f4c6172616c79746963732e737667)](https://travis-ci.org/bsharp/Laralytics)[![Latest Stable Version](https://camo.githubusercontent.com/4f9e684b9b6ee4cd4d978cfb79f8b12f71433080eda91b1d6795bc424f8768c6/68747470733a2f2f706f7365722e707567782e6f72672f6273686172702f6c6172616c79746963732f762f737461626c65)](https://packagist.org/packages/bsharp/laralytics)[![Total Downloads](https://camo.githubusercontent.com/0fafdb882dc086d8e6214eafdcc757514edefb924abd48656587ea26fc18eba2/68747470733a2f2f706f7365722e707567782e6f72672f6273686172702f6c6172616c79746963732f646f776e6c6f616473)](https://packagist.org/packages/bsharp/laralytics)[![License](https://camo.githubusercontent.com/e4635467cc44e6c978538fac9a3abb8cbac64de7f08357cfda52ab4069467e44/68747470733a2f2f706f7365722e707567782e6f72672f6273686172702f6c6172616c79746963732f6c6963656e7365)](https://packagist.org/packages/bsharp/laralytics)

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

[](#installation)

#### Composer

[](#composer)

To install Laralytics as a Composer package to be used with Laravel 5.\*, simply add this to your composer.json:

```
  "Bsharp/laralytics": "dev-master"

```

#### Add the service provider

[](#add-the-service-provider)

Add this line to your `config/app.php` file in the service providers array:

```
Bsharp\Laralytics\LaralyticsServiceProvider::class,

```

### Publish

[](#publish)

To add all laralytics resources to your app you need to publish them using the `vendor:publish` artisan command

```
  php artisan vendor:publish

```

You can specify which resource to publish one by one using:

```
  php artisan vendor:publish --tag=config      # Laralytics configuration
  php artisan vendor:publish --tag=migrations  # Laralytics migrations
  php artisan vendor:publish --tag=middleware  # (optional) Generic middleware to log your app action
  php artisan vendor:publish --tag=eloquent    # For eloquent driver only
  php artisan vendor:publish --tag=js          # For laralytics js file

```

Add laralytics route for js event

```
  Route::post('laralytics', '\Bsharp\Laralytics\LaralyticsController@payload');

```

### Configuration

[](#configuration)

Open the `config/laralytics.php` file, here you can specify:

- which driver to use with Laralytics
- the path to eloquent models if you use the Eloquent driver
- the method to retrieve an authentified user id's

### Laralytics js

[](#laralytics-js)

Use the `vendor:publish` artisan command to add Laralytics js to your public directory

To start using Laralytics add the file to your view

```

```

And finally add this line in your view with this

```

    laralytics.init();

```

Or add it in a js extern file

```
  laralytics.init();

```

If you want to config you can specify those parameters

```
  laralytics.init({
    API : your route where you want to collect your data,
    Version : If you want to know with A/B testing on which page you are,
    Limit : To set a limit when you want to send your data if set to 0 the data will be send when the user close his tab/browser or refresh the page
  });

```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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

Total

24

Last Release

3682d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/dd6a8bce5710fca6128b791a5b7d38370da4ded37342ccee6a4c61cc3b330718?d=identicon)[Bsharp](/maintainers/Bsharp)

---

Top Contributors

[![poudro](https://avatars.githubusercontent.com/u/999699?v=4)](https://github.com/poudro "poudro (9 commits)")[![VyrRuss](https://avatars.githubusercontent.com/u/225430905?v=4)](https://github.com/VyrRuss "VyrRuss (7 commits)")[![gaetanboedec](https://avatars.githubusercontent.com/u/8026576?v=4)](https://github.com/gaetanboedec "gaetanboedec (3 commits)")

---

Tags

laravellaravel5analytics

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bsharp-laralytics/health.svg)

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

###  Alternatives

[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.1k84.2M225](/packages/laravel-horizon)[laravel/nightwatch

The official Laravel Nightwatch package.

3526.1M13](/packages/laravel-nightwatch)[bezhansalleh/filament-google-analytics

Google Analytics integration for FilamentPHP

205144.8k5](/packages/bezhansalleh-filament-google-analytics)[misterphilip/maintenance-mode

An enhanced drop-in replacement for Laravel's maintenance mode

120176.7k](/packages/misterphilip-maintenance-mode)[brexis/laravel-workflow

Integerate Symfony Workflow component into Laravel.

283125.6k](/packages/brexis-laravel-workflow)[flarum/core

Delightfully simple forum software.

211.3M1.9k](/packages/flarum-core)

PHPackages © 2026

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