Pular para o conteúdo
← Voltar para projetos

Filament Amplitude

Filament plugin for Amplitude analytics — Browser SDK injection and a Settings Page, powered by Spatie Laravel Settings, to manage your Amplitude configuration directly from your Filament panel.

Filament Amplitude

#Filament Amplitude

Buy Me A Coffee

Latest Version on Packagist GitHub Code Style Action Status Total Downloads License

Filament plugin for Amplitude analytics with a settings page powered by Spatie Laravel Settings. Manage your Amplitude Browser SDK configuration directly from the Filament admin panel, and the SDK is injected into every page of your panels.

Built on top of jeffersongoncalves/laravel-amplitude.

#Compatibility

Branch Filament Package version
1.x 3.x ^1.0
2.x 4.x ^2.0
3.x 5.x ^3.0

#Installation

You can install the package via composer:

composer require jeffersongoncalves/filament-amplitude:"^3.0"

Publish the settings migrations and run them:

php artisan vendor:publish --tag=amplitude-settings-migrations
php artisan migrate

#Usage

#Register the Plugin

Add the plugin to your Filament panel provider:

use JeffersonGoncalves\Filament\Amplitude\AmplitudePlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugins([
            AmplitudePlugin::make(),
        ]);
}

The plugin will:

  • Register a Settings Page to manage the API key, server zone, autocapture, identity storage, cookies, session timeout and batching options
  • Automatically inject the Amplitude Browser SDK into the <head> of your Filament panels (only when an API key is set)

#Disable the Settings Page

If you only want the automatic script injection without the settings page:

AmplitudePlugin::make()
    ->settingsPage(false),

#Requirements

  • PHP 8.2 or higher
  • Filament 5.x

#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.

Nova versão disponível.