jeffersongoncalves/filament-metrics-fathom
A Filament plugin that brings Fathom Analytics metrics into your admin dashboard, with ready-to-use widgets for tracking traffic, pageviews, and site performance without leaving Laravel.
Install the plugin via Composer and confirm filament-analytics-core resolves to ^3.1 (the navigationGroup() API was added there). Register the plugin in your Filament panel provider:
->plugins([
\Vendor\Analytics\Plugin::make(),
])
The first use case is simply exposing the analytics settings page in your panel. By default it appears under the package’s translated navigation group. As soon as you want the page to sit alongside your own resources, call navigationGroup():
Plugin::make()->navigationGroup('Reporting')
Look first at your panel provider’s plugins() array and your panel’s navigationGroups() definition — that is where the new grouping behaviour is wired up.
Basic override. Pass a string to place the settings page in an existing or new navigation group:
->plugins([
AnalyticsPlugin::make()->navigationGroup('Insights'),
])
Dynamic grouping via closure. Use a closure when the group depends on tenant, panel, or user context:
AnalyticsPlugin::make()->navigationGroup(
fn () => filament()->getCurrentPanel()?->getId() === 'admin'
? 'Administration'
: 'Reporting'
)
Multi-panel setups. Register the plugin separately per panel and give each a different group, or omit the call on panels where the translated default is fine. This keeps the settings page contextual rather than forcing one global label.
Pairing with panel navigation groups. For predictable ordering, declare the same group in your panel’s navigationGroups() so the analytics page sorts with your other resources rather than appearing as an ad-hoc group at the end.
Progressive adoption. Existing installations need no changes: omitting navigationGroup() preserves the translated group, so you can roll the override out panel by panel.
navigationGroup() requires filament-analytics-core 3.1+. If Composer resolves an older core (e.g. due to a lockfile or another package constraint), the method will not exist. Run composer why filament-analytics-core if the call fails.navigationGroups(); it just may not sort where you expect. Declare the group in the panel to control ordering and icons.php artisan filament:optimize-clear (or optimize:clear) and retest.filament()->getCurrentPanel()), tenant, or feature flags without forking the plugin.How can I help you explore Laravel packages today?