jeffersongoncalves/filament-metrics-plausible
A Filament plugin that brings Plausible Analytics into your admin panel, with dashboard widgets for visitors, pageviews, traffic sources, and other key metrics. Configure your Plausible API key and site ID, then drop the widgets into any Filament panel for at-a-glance, privacy-friendly analytics.
Architecture fit. This is a Filament panel plugin that registers a settings page for the analytics package. Release 3.1.0 adds a single fluent configuration method, Plugin::make()->navigationGroup(string|Closure), which relocates that page into a navigation group already defined by the host panel. Architecturally this is the right shape: the plugin stops hard-coding placement and defers to the panel's own information architecture rather than fighting it. The Closure overload is the more interesting half — it allows group resolution at render time (per-tenant, per-role, per-panel), which fits multi-panel and multi-tenant Filament deployments that a TPM is likely to encounter in B2B products.
Integration feasibility. Low effort, high determinism. It is a one-line addition to an existing panel provider's plugin registration; no migrations, no schema changes, no config publishing, no asset rebuild. The only hard prerequisite is filament-analytics-core 3.1, which means the change is gated on a coordinated dependency bump rather than standing alone. For a TPM this is the single scheduling constraint worth tracking.
Technical risk. Low, with two caveats. First, this is deliberately non-breaking: omitting the call preserves the existing translated group, so the default behaviour of every current install is unchanged and no release note implies a forced migration. Second, coupling risk — the plugin now has a minimum-version floor on the core package. Any environment pinned below core 3.1 will either fail to resolve or silently lack the method, so dependency constraints must be verified before upgrade rather than after. The Closure path carries modest operational risk in that a user-supplied closure executes during navigation render; a throwing or slow closure degrades panel navigation, not just this page. That is a caller-responsibility concern, but it should be documented in the upgrade note rather than left implicit.
Key questions for the maintainer.
navigationGroup() nullable/resettable, and does passing an empty string restore default behaviour?Stack fit. Targets Laravel + Filament panels. The plugin is a thin configuration surface over filament-analytics-core; it owns presentation and placement, not analytics logic. This is a favourable split for a TPM — the navigation concern can be changed without touching data or reporting behaviour.
Migration path. Effectively a no-op migration. Sequence: (1) bump filament-analytics-core to ^3.1 and confirm resolution, (2) bump the plugin, (3) optionally add navigationGroup() in the panel provider, (4) verify the page appears where expected in each panel. Teams that take steps 1–2 and skip step 3 ship with zero behavioural change, which makes this a safe candidate to bundle into a routine dependency refresh rather than a dedicated change window.
Compatibility. Requires core 3.1 as a floor. Existing navigation group naming is preserved by default, so custom translations continue to work untouched. Risk is confined to environments with pinned or lagging core versions — audit composer.lock across all deployed panels before rollout, and treat multi-panel setups as the priority check since they are the primary beneficiary of the Closure form.
Sequencing. Do the core bump first and verify it independently, then adopt the plugin, then apply the navigation configuration. Defer Closure-based dynamic grouping to a follow-up: it is a behavioural change to navigation composition and deserves its own review against the panel's existing group taxonomy, ideally alongside an audit of how many groups the panel already exposes. Consolidating groups is a UX decision, and adding a new one for analytics settings is the cheapest first step.
Maintenance. Minimal and stable. One fluent method, no config files, no published assets, no scheduled jobs. The standing cost is dependency hygiene: the plugin now tracks a minimum core version, so upgrades should be treated as a pair. Worth pinning both in composer.json with explicit constraints rather than floating.
Support. Expected support volume is low and largely cosmetic — "the settings page moved" or "it's in an unexpected group" tickets following a configuration change. These are self-inflicted by the adopting team, not defects. The higher-value support artifact is an internal note stating which group the analytics settings page belongs to in each panel, so future navigation changes do not orphan it.
Scaling. Neutral to slightly positive. It scales with the panel rather than against it: as panels accumulate resources and pages, letting the panel own group definitions prevents the drift that comes from plugins hard-coding their own placement. The Closure form scales functionally across tenants and roles at the cost of executing on every navigation render — negligible for typical closure bodies, but worth a code-review guardrail against anything doing I/O.
Failure modes.
Ramp-up. Trivial for anyone who has registered a Filament plugin — the change is a single chained method on an existing Plugin::make() call. Budget under an hour of engineering, plus review time if the Closure form is adopted. The real ramp-up cost sits with whoever owns panel navigation taxonomy, not with the engineer making the change; involve them before, not after, the group is chosen.
How can I help you explore Laravel packages today?