PHPackages                             jeffersongoncalves/laravel-plausible - 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. jeffersongoncalves/laravel-plausible

ActiveLibrary[API Development](/categories/api)

jeffersongoncalves/laravel-plausible
====================================

A lightweight Laravel package that seamlessly integrates Plausible Analytics into your Blade views. Plausible.io is a privacy-friendly, open-source alternative to Google Analytics.

v2.0.1(2mo ago)2271MITBladePHP ^8.2|^8.3CI passing

Since Mar 5Pushed 1mo ago1 watchersCompare

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

READMEChangelog (5)Dependencies (7)Versions (7)Used By (1)

[![Laravel Plausible](https://raw.githubusercontent.com/jeffersongoncalves/laravel-plausible/master/art/jeffersongoncalves-laravel-plausible.png)](https://raw.githubusercontent.com/jeffersongoncalves/laravel-plausible/master/art/jeffersongoncalves-laravel-plausible.png)

Laravel Plausible
=================

[](#laravel-plausible)

[![Latest Version on Packagist](https://camo.githubusercontent.com/0d1692737aac18cd54532f9d5cf570eb54810e8d6aae5470453913911d92a5c5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a6566666572736f6e676f6e63616c7665732f6c61726176656c2d706c61757369626c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jeffersongoncalves/laravel-plausible)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/2b45453eb0ccb05d27a7bad72bdc4c79ab53d48f05bb977dd2b8e0165477c2d6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6a6566666572736f6e676f6e63616c7665732f6c61726176656c2d706c61757369626c652f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d6173746572266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/jeffersongoncalves/laravel-plausible/actions?query=workflow%3A%22Fix+PHP+code+styling%22+branch%3Amaster)[![Total Downloads](https://camo.githubusercontent.com/ecd02db9d5f88af35a418550ed91d43b633d01971d467d2189da803bf741c29a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a6566666572736f6e676f6e63616c7665732f6c61726176656c2d706c61757369626c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jeffersongoncalves/laravel-plausible)

A lightweight Laravel package that seamlessly integrates Plausible Analytics into your Blade views. Plausible.io is a privacy-friendly, open-source alternative to Google Analytics.

Settings are stored in the database using [spatie/laravel-settings](https://github.com/spatie/laravel-settings), making it easy to manage from an admin panel or programmatically.

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

[](#installation)

Install the package via Composer:

```
composer require jeffersongoncalves/laravel-plausible
```

Publish and run the settings table migration from `spatie/laravel-settings` (if not already done):

```
php artisan vendor:publish --provider="Spatie\LaravelSettings\LaravelSettingsServiceProvider" --tag="migrations"
php artisan migrate
```

Publish and run the Plausible settings migration:

```
php artisan vendor:publish --tag=plausible-settings-migrations
php artisan migrate
```

Usage
-----

[](#usage)

### Include the script in your layout

[](#include-the-script-in-your-layout)

Add the following to your Blade layout (inside ``):

```
@include('plausible::script')
```

The script tag will only be rendered when the `domains` setting is configured.

### Configure settings

[](#configure-settings)

You can update the settings programmatically:

```
use JeffersonGoncalves\Plausible\Settings\PlausibleSettings;

$settings = app(PlausibleSettings::class);
$settings->domains = 'example.com';
$settings->save();
```

#### Available settings

[](#available-settings)

SettingTypeDefaultDescription`domains``?string``null`Domain(s) to track. Supports rollup reporting with comma-separated domains.`host_analytics``string``https://plausible.io`Plausible host URL. Change this if you are self-hosting Plausible.### Self-hosted Plausible

[](#self-hosted-plausible)

If you are self-hosting Plausible, update the `host_analytics` setting:

```
$settings = app(PlausibleSettings::class);
$settings->host_analytics = 'https://analytics.example.com';
$settings->save();
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

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

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

[](#contributing)

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

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

[](#security-vulnerabilities)

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

Credits
-------

[](#credits)

- [Jefferson Goncalves](https://github.com/jeffersongoncalves)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

45

—

FairBetter than 92% of packages

Maintenance87

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 69.2% 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 ~89 days

Total

5

Last Release

78d ago

Major Versions

v1.0.2 → v2.0.02026-02-22

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/411493?v=4)[Jefferson Gonçalves](/maintainers/jeffersongoncalves)[@jeffersongoncalves](https://github.com/jeffersongoncalves)

---

Top Contributors

[![jeffersongoncalves](https://avatars.githubusercontent.com/u/411493?v=4)](https://github.com/jeffersongoncalves "jeffersongoncalves (27 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (8 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (3 commits)")[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (1 commits)")

---

Tags

analyticscomposerlaravellaravel-packagephpplausibleplausible-analyticsprivacyspatie-laravel-settingslaraveljeffersongoncalveslaravel-plausible

###  Code Quality

TestsPest

Static AnalysisPHPStan

### Embed Badge

![Health badge](/badges/jeffersongoncalves-laravel-plausible/health.svg)

```
[![Health](https://phpackages.com/badges/jeffersongoncalves-laravel-plausible/health.svg)](https://phpackages.com/packages/jeffersongoncalves-laravel-plausible)
```

###  Alternatives

[rupadana/filament-api-service

A simple api service for supporting filamentphp

204103.8k7](/packages/rupadana-filament-api-service)[scalar/laravel

Render your OpenAPI-based API reference

6183.9k2](/packages/scalar-laravel)

PHPackages © 2026

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