Search by

jeffersongoncalves / filament-clarity

jeffersongoncalves

Filament plugin for Microsoft Clarity: injects the Clarity tracking tag into your panels and adds a settings page, powered by Spatie Laravel Settings, to manage the project ID.

3.1.0 2026-10-09 11:34 UTC

README

Filament Clarity

Filament Clarity

Buy Me A Coffee

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

Filament plugin for Microsoft Clarity with a settings page powered by Spatie Laravel Settings. Manage your Clarity project ID directly from the Filament admin panel, and the tracking code is injected into every page of your panels.

Built on top of jeffersongoncalves/laravel-clarity.

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-clarity:"^3.0"

Publish the settings migrations and run them:

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

Usage

Register the Plugin

Add the plugin to your Filament panel provider:

use JeffersonGoncalves\Filament\Clarity\ClarityPlugin;

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

The plugin will:

  • Register a Settings Page where you can manage the Clarity project ID
  • Automatically inject the Clarity tracking code into the <head> of your Filament panels (only when a project ID is set)

Disable the Settings Page

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

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

Navigation group

Put the settings page in one of your panel's own navigation groups (a string or a closure):

ClarityPlugin::make()
    ->navigationGroup(fn (): string => __('admin.navigation.settings')),

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.