Filament Plausible
Filament plugin to integrate Plausible Analytics with a settings page to manage your tracking configuration. Privacy-friendly alternative to Google Analytics.
#Filament Plausible
A Filament plugin to integrate Plausible Analytics with a settings page to manage your tracking configuration. Privacy-friendly alternative to Google Analytics.
#Version Compatibility
| Filament | Branch | Package |
|---|---|---|
| 5.x | 3.x |
^3.0 |
| 4.x | 2.x |
^2.0 |
| 3.x | 1.x |
^1.0 |
#Requirements
- PHP 8.2 or higher
- Laravel 11.28 or higher
- Filament 5.x
#Installation
You can install the package via composer:
Install the package via Composer:
composer require jeffersongoncalves/filament-plausible:"^3.0"
Publish and run the settings 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
#Setup
Register the plugin in your PanelProvider:
use JeffersonGoncalves\Filament\Plausible\PlausiblePlugin; public function panel(Panel $panel): Panel { return $panel ->plugins([ PlausiblePlugin::make(), ]); }
#Usage
Once registered, the plugin provides:
- Automatic script injection - The Plausible tracking script is automatically injected into the
<head>of your Filament panel. - Settings page - A settings page is added to your panel where you can configure your Plausible domain(s) and host URL directly from the admin UI.
#Disabling the Settings Page
If you only want the automatic script injection without the settings page:
PlausiblePlugin::make() ->settingsPage(false),
#Changelog
Please see CHANGELOG for more information on what has changed recently.
#Contributing
Please see CONTRIBUTING for details.
#Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
#Credits
#License
The MIT License (MIT). Please see License File for more information.