Pular para o conteúdo
← Voltar para projetos

Filament Page Visits

Filament admin resource for jeffersongoncalves/laravel-page-visits — browse and inspect tracked page visits from a Filament panel.

Versão: v3 v4 v5 · branch: 3.x

Filament Page Visits

#Filament Page Visits

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

A read-only Filament admin resource for jeffersongoncalves/laravel-page-visits — the headless core package that tracks page-view visits on your app's public routes (device, browser, geo, locale, referer, UTM). This package owns no models, migrations or tracking logic of its own: it is purely the presentation layer (a Resource, Pages, widgets) built on top of the core's PageVisit model.

#Compatibility

filament-page-visits laravel-page-visits Filament
1.x ^1.0 v3
2.x ^1.0 v4
3.x ^1.0 v5

laravel-page-visits requires Laravel 12 or 13 (illuminate/contracts: ^12.0|^13.0) on every branch — see the note below if a given Filament major doesn't hold up against that floor in practice.

#Screenshots

Screenshot Light Dark
Page visit list page-visit-list page-visit-list
Page visit view page-visit-view page-visit-view
Metrics page metrics-page metrics-page

#What's included

  • PageVisitResource — a browsable, filterable list of tracked visits (date/time, path, method, status code, device, browser, OS, country, referer type, bot flag), with a detail view grouped into Request, Device, Location, Referer & UTM, Bot/Risk flags and Fingerprint sections. The resource is intentionally read-only (no create, edit or delete) — visits are an append-only audit log written by the core package.
  • A dedicated Metrics page with 14 toggleable widgets:
    • StatsOverview — total visits, visits today, bot %, top country.
    • SecurityOverview — VPN / Proxy / Tor / Datacenter %.
    • HourlyChart — visits per hour (last 24h).
    • TrafficTrendChart — visits per day (last 14 days).
    • LongTermTrendChart — visits per day (last 90 days), read from laravel-page-visits 1.1.0+'s page_visit_daily_stats aggregate table so it stays accurate even after raw page_visits rows are pruned by page-visits:aggregate-and-prune. Auto-hides itself on older laravel-page-visits installs that don't have that table yet.
    • DevicesChart, BrowsersChart, OperatingSystemsChart — device / browser / OS breakdown.
    • StatusCodesChart — 2xx/3xx/4xx/5xx breakdown.
    • RefererTypesChart — direct / search / social / unknown breakdown.
    • TopPages, TopReferrers, TopCountries, TopAsn — top-10 tables (ASN/ISP included).
  • pt_BR and en translations.

Publish config/filament-page-visits.php to change the metrics page slug or turn individual widgets off — useful on installs with a huge page_visits table where a given widget's query is too costly to run on every load:

php artisan vendor:publish --tag="filament-page-visits-config"
return [
    'metrics_page' => [
        'slug' => 'page-visits-metrics',
        'widgets' => [
            'stats_overview' => true,
            // ...
            'top_asn' => false, // turn off any widget you don't need
        ],
    ],
];

Table name, tracked fields, excluded paths and retention are configured separately, on laravel-page-visits' own config/page-visits.php (see that package's README).

#Installation

You can install the package via composer:

composer require jeffersongoncalves/filament-page-visits:"^3.0"

This pulls in jeffersongoncalves/laravel-page-visits (^1.0) as a dependency. Publish and run its migration per that package's own installation instructions, then register the plugin in your PanelProvider:

use JeffersonGoncalves\Filament\PageVisits\FilamentPageVisitsPlugin;

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

#Testing

composer test        # Pest
composer analyse      # PHPStan (Larastan)
composer format        # Pint

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