jeffersongoncalves / filament-plausible
Filament plugin to integrate Plausible Analytics with a settings page to manage your tracking configuration. Privacy-friendly alternative to Google Analytics.
Installs: 4
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 1
Forks: 0
pkg:composer/jeffersongoncalves/filament-plausible
Requires
- php: ^8.2
- filament/filament: ^5.0
- filament/spatie-laravel-settings-plugin: ^5.0
- jeffersongoncalves/laravel-plausible: ^2.0
- spatie/laravel-package-tools: ^1.14.0
Requires (Dev)
- larastan/larastan: ^3.0
- orchestra/testbench: ^10.0|^11.0
README
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
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.
