PHPackages                             simplestats-io/laravel-client - 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. [API Development](/categories/api)
4. /
5. simplestats-io/laravel-client

ActiveLibrary[API Development](/categories/api)

simplestats-io/laravel-client
=============================

Client for SimpleStats!

v3.5.1(2mo ago)4515.5k↓30.7%4MITPHPPHP ^8.0 || ^7.4CI passing

Since Mar 26Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/simplestats-io/laravel-client)[ Packagist](https://packagist.org/packages/simplestats-io/laravel-client)[ Docs](https://github.com/simplestats-io/laravel-client)[ RSS](/packages/simplestats-io-laravel-client/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (30)Versions (33)Used By (0)

Laravel Client for SimpleStats.io
=================================

[](#laravel-client-for-simplestatsio)

[![Latest Version on Packagist](https://camo.githubusercontent.com/7a72541f80823cac44374eb9465600b2d801011e6b816d74f0b8be7874f5812a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73696d706c6573746174732d696f2f6c61726176656c2d636c69656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/simplestats-io/laravel-client)[![Tests](https://github.com/simplestats-io/laravel-client/actions/workflows/run-tests.yml/badge.svg?branch=main)](https://github.com/simplestats-io/laravel-client/actions/workflows/run-tests.yml)[![Check & fix styling](https://github.com/simplestats-io/laravel-client/actions/workflows/fix-php-code-style-issues.yml/badge.svg?branch=main)](https://github.com/simplestats-io/laravel-client/actions/workflows/fix-php-code-style-issues.yml)[![License](https://camo.githubusercontent.com/4d287146a8ce2421de7353f54eba7b398215c66e1cfb390e2dd25dd6969657bc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f73696d706c6573746174732d696f2f6c61726176656c2d636c69656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/simplestats-io/laravel-client)

This is the official Laravel client to send tracking data to

Introduction
------------

[](#introduction)

***SimpleStats*** is a streamlined analytics tool tailored for **Laravel** applications, transcending mere counts of views and visits. It offers **precise insights** into user origins and behaviors. With default tracking and filtering via [UTM](https://en.wikipedia.org/wiki/UTM_parameters) codes, you gain detailed analysis of **marketing** campaigns, identifying which efforts drive **revenue**. Effortlessly evaluate campaign **ROI**, discover cost-effective user acquisition channels, and pinpoint the most effective performance channels. *SimpleStats* ensures full **GDPR compliance** and a minimalistic and straightforward installation process.

[![screenshot](https://camo.githubusercontent.com/6ceccc3ebb9862cafd664150e82380869bc27ae07fd11cb69c61e53e98d18603/68747470733a2f2f73696d706c6573746174732e696f2f696d616765732f73637265656e73686f742e706e67)](https://camo.githubusercontent.com/6ceccc3ebb9862cafd664150e82380869bc27ae07fd11cb69c61e53e98d18603/68747470733a2f2f73696d706c6573746174732e696f2f696d616765732f73637265656e73686f742e706e67)

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

[](#installation)

You can install the client package via composer:

```
composer require simplestats-io/laravel-client
```

You should publish the config file with:

```
php artisan vendor:publish --tag="simplestats-client-config"
```

This is the default content of the config file, tweak it to your needs:

```
use App\Models\User;
use Illuminate\Auth\Events\Login;

return [

    /*
     |--------------------------------------------------------------------------
     | SimpleStats Settings
     |--------------------------------------------------------------------------
     |
     | SimpleStats is enabled by default. Disabling it will stop tracking your stats.
     |
     | You can provide an array of URI's that must be ignored (eg. 'api/*')
     */

    'enabled' => env('SIMPLESTATS_ENABLED', true),

    'except' => [
        'telescope*',
        'horizon*',
        'admin*',
        'api*',
    ],

    /*
     |--------------------------------------------------------------------------
     | SimpleStats Blocked IPs
     |--------------------------------------------------------------------------
     |
     | Define IP addresses or CIDR ranges that should be excluded from tracking.
     | Supports single IPs (e.g. '192.168.1.1') and CIDR notation (e.g. '10.0.0.0/8').
     |
     */

    'blocked_ips' => [
        // '192.168.1.1',
        // '10.0.0.0/8',
        // '172.16.0.0/12',
    ],

    /*
     |--------------------------------------------------------------------------
     | SimpleStats API Credentials
     |--------------------------------------------------------------------------
     |
     | Define your API credentials here. If you are not told to change the API URL,
     | just keep the default. It's important to set an API token! You'll receive
     | one, after creating your team and project on https://simplestats.io
     |
     */

    'api_url' => env('SIMPLESTATS_API_URL', 'https://simplestats.io/api/v1/'),

    'api_token' => env('SIMPLESTATS_API_TOKEN'),

    /*
     |--------------------------------------------------------------------------
     | SimpleStats Queue
     |--------------------------------------------------------------------------
     |
     | To avoid the tracking API calls block the whole request and for fault tolerance,
     | we highly recommend using Laravel's built-in queue-system. Here you can define
     | to which queue the tracking API calls should be dispatched and handled by.
     |
     */

    'queue' => env('SIMPLESTATS_QUEUE', 'default'),

    /*
     |--------------------------------------------------------------------------
     | SimpleStats Tracking Codes
     |--------------------------------------------------------------------------
     |
     | Below you can set your tracking code URL param names. We already set some
     | classical defaults for you, but you're free to change them as you like.
     | Note that only the params which are listed here are getting tracked!
     |
     */

    'tracking_codes' => [
        'source' => ['utm_source', 'ref', 'referer', 'referrer'],
        'medium' => ['utm_medium', 'adGroup', 'adGroupId'],
        'campaign' => ['utm_campaign'],
        'term' => ['utm_term'],
        'content' => ['utm_content'],
    ],

    /*
     |--------------------------------------------------------------------------
     | SimpleStats Tracking Types
     |--------------------------------------------------------------------------
     |
     | Here you can set three different tracking types. The first is the login
     | event. If this event gets dispatched, we track a login. The second is
     | the user model. If such a model is created, we track a registration.
     |
     | As the payment model is named very individually, we did not set any default here.
     | Give it the name of the model which holds your payments or transactions data.
     |
     | See: https://simplestats.io/docs
     |
     */

    'tracking_types' => [
        'login' => [
            'event' => Login::class,
        ],

        // Make sure this model implements the TrackablePerson or
        // the TrackablePersonWithCondition Contract
        'user' => [
            'model' => User::class,
        ],

        // Make sure this model implements the TrackablePayment or
        // the TrackablePaymentWithCondition contract
        'payment' => [
            'model' => null,
        ],
    ],
];
```

Documentation
-------------

[](#documentation)

Check out the full documentation here: [Official SimpleStats.io Documentation](https://simplestats.io/docs)

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

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

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Zacharias Creutznacher](https://github.com/sairahcaz)
- [All Contributors](../../contributors)

License
-------

[](#license)

GNU General Public License v3.0 or later. Please see [License File](LICENSE) for more information.

###  Health Score

53

—

FairBetter than 97% of packages

Maintenance88

Actively maintained with recent releases

Popularity39

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 83.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 ~24 days

Recently: every ~1 days

Total

31

Last Release

61d ago

Major Versions

v1.0.3 → v2.0.02024-07-15

v2.0.14 → v3.0.02024-11-25

PHP version history (2 changes)v1.0.0PHP ^8.1

v1.0.2PHP ^8.0 || ^7.4

### Community

Maintainers

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

---

Top Contributors

[![Sairahcaz](https://avatars.githubusercontent.com/u/7384870?v=4)](https://github.com/Sairahcaz "Sairahcaz (204 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (21 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (11 commits)")[![jhhazelaar](https://avatars.githubusercontent.com/u/215711?v=4)](https://github.com/jhhazelaar "jhhazelaar (7 commits)")[![tomas-doudera](https://avatars.githubusercontent.com/u/32466344?v=4)](https://github.com/tomas-doudera "tomas-doudera (1 commits)")

---

Tags

analyticsapilaravelphpstatisticslaravelsimplestats-iosimplestats-client

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/simplestats-io-laravel-client/health.svg)

```
[![Health](https://phpackages.com/badges/simplestats-io-laravel-client/health.svg)](https://phpackages.com/packages/simplestats-io-laravel-client)
```

###  Alternatives

[spatie/laravel-health

Monitor the health of a Laravel application

86910.0M83](/packages/spatie-laravel-health)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[laravel/cashier-paddle

Cashier Paddle provides an expressive, fluent interface to Paddle's subscription billing services.

264778.4k3](/packages/laravel-cashier-paddle)[ryangjchandler/bearer

Minimalistic token-based authentication for Laravel API endpoints.

8129.8k](/packages/ryangjchandler-bearer)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[stechstudio/laravel-hubspot

A Laravel SDK for the HubSpot CRM Api

2971.0k](/packages/stechstudio-laravel-hubspot)

PHPackages © 2026

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