New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

schmeits/filament-pan-analytics-widget

A Filament widget that shows the product analytics collected by panphp/pan
2,249 23
Install
composer require schmeits/filament-pan-analytics-widget
Latest Version:5.0.0
PHP:^8.3
Laravel:11 · 12 · 13
License:MIT
Last Updated:Nov 2, 2026
Links: GitHub  ·  Packagist
Maintainer: schmeits

Filament Pan Analytics Widget

Latest Version on Packagist GitHub Tests Action Status Total Downloads

A Filament dashboard widget for panphp/pan, the lightweight and privacy-focused product analytics library. It shows the impressions, hovers and clicks that pan collected, with the share of hovers and clicks per impression.

example-screenshot.png

Compatibility

Package version Filament Laravel PHP
5.x 4.x and 5.x 12 and 13 8.3+
4.x 3.x 11 and 12 8.3+

Version 4.x is for Filament 3, despite the number. It lives on the 4.x branch and still gets fixes.

Installation

This widget reads the pan_analytics table of pan, so install and migrate pan first:

composer require panphp/pan
php artisan install:pan

Then install the widget:

composer require schmeits/filament-pan-analytics-widget

Numbers and percentages are formatted in the app locale with the PHP intl extension. Without intl the widget shows plain numbers.

Optionally, publish the translations (English and Dutch are included):

php artisan vendor:publish --tag="filament-pan-analytics-widget-translations"

Usage

Add the plugin and the widget to your panel:

use Schmeits\FilamentPanAnalyticsWidget\FilamentPanAnalyticsWidgetPlugin;
use Schmeits\FilamentPanAnalyticsWidget\Widgets\PanAnalyticsTableWidget;

public function panel(Panel $panel): Panel
{
    return $panel
        // ...
        ->plugin(FilamentPanAnalyticsWidgetPlugin::make())
        ->widgets([
            PanAnalyticsTableWidget::class,
        ]);
}

Options

FilamentPanAnalyticsWidgetPlugin::make()
    // Show a search field for the name column.
    ->searchable()
    // Decide who may see the widget. Everyone with access to the panel sees it by default.
    ->authorize(fn (): bool => auth()->user()?->can('viewAnalytics') ?? false)

Both options also accept a closure, which is evaluated when the widget renders.

Without the plugin on the panel the widget still works: it is visible, without search.

Upgrading from 4.x to 5.x

  • Requires Filament 4 or 5 (Laravel 12 or 13). Stay on 4.x for Filament 3.
  • FilamentPanAnalyticsWidgetPlugin::getSearchable() is now isSearchable().
  • The page size options are 5, 10, 25 and 50. The "all" option is gone.
  • The unused facade, FilamentPanAnalyticsWidget class, testing mixin, stubs and the filament-pan-analytics-widget:: view namespace are removed.
  • The headers.id translation key is removed. New keys: not_available and empty.heading / empty.description. Re-publish the translations if you published them before.

Testing

composer test

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.

Need help with Filament?

I'm Tally Schmeits, the maintainer of this package. I build and maintain Filament and Laravel applications for clients: new admin panels and business applications, upgrades to Filament 4 and 5, and taking over existing Filament apps. More at schmeits.com/filament-specialist.

Credits

License

The MIT License (MIT). Please see License File for more information.

Related Packages

schmeits/filament-character-counter

A character counter for the TextInput, Textarea and RichEditor fields of Filamen...

314,348 34
jeffersongoncalves/filament-page-visits

Filament admin resource for jeffersongoncalves/laravel-page-visits — browse and...

1,905 4
jeffersongoncalves/filament-widget-configuration

Configure global defaults for Filament widget polling interval and lazy loading,...

1,693 1
notwonderful/filament-cloudflare

Cloudflare management plugin for Filament PHP - Manage Cloudflare settings, fire...

23 4

Version History

Version Released PHP License
5.0.0 ^8.3 MIT
4.1.0 ^8.3 MIT
v4.0.0 ^8.3 MIT
0.4 ^8.3 MIT
0.3 ^8.3 MIT