Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Filament Analytics Core

Filament Analytics Core Laravel Package

jeffersongoncalves/filament-analytics-core

Lightweight core analytics for Filament: collect and visualize page views, visitors, and popular content with database-backed tracking and ready-to-use dashboard widgets, so you can monitor traffic and trends right inside your Laravel admin panel.

View on GitHub
Deep Wiki
Context7

Shared base classes for jeffersongoncalves Filament analytics-injector plugins (script render-hook injection + optional Spatie settings page).

Frequently asked questions about Filament Analytics Core
What is jeffersongoncalves/filament-analytics-core used for?
It is the shared foundation package behind the jeffersongoncalves Filament analytics-injector plugins. It supplies the base classes those plugins extend, handling script injection through Filament render hooks plus an optional Spatie settings page for storing analytics identifiers. In most projects you install it indirectly as a dependency rather than working with it directly.
How do I install filament-analytics-core with Composer?
Run composer require jeffersongoncalves/filament-analytics-core, though in practice Composer pulls it in automatically when you require one of the analytics-injector plugins that depends on it. After install, check the specific plugin's README for any service provider registration or publish steps. Because it is a base library, it usually ships without its own install command.
Which Laravel and Filament versions are supported?
The package targets Laravel applications running Filament, and the exact constraint ranges are declared in its composer.json. Check the package page on Packagist before upgrading Laravel or Filament to confirm compatibility. Filament major versions occasionally change render hook APIs, so match the core version to your panel version.
Do I need to publish config files or run migrations?
Most configuration lives in the individual injector plugins rather than in this core package. If you enable the optional Spatie settings integration, you may need to publish a settings migration or settings class depending on the plugin. Follow the install instructions of the plugin you are using for the correct publish tags.
Does it require Spatie Laravel Settings?
No, Spatie settings support is optional. The description lists an optional Spatie settings page alongside the render-hook script injection, so the injection side works from configuration alone. Install spatie/laravel-settings only if you want analytics IDs editable from the admin panel.
How does the render hook script injection work?
The base classes register a Filament render hook and render the analytics script markup into your panel's HTML output at that hook location. Individual injector plugins then only need to supply the provider-specific snippet, such as a Google Analytics or Tag Manager tag. This keeps injection logic consistent across all the analytics providers built on the core.
Can I use filament-analytics-core on its own without an injector plugin?
It is designed as a shared base library, so on its own it does not register a provider-specific analytics snippet. You normally pair it with one of the injector plugins that extends its base classes. Using it directly makes sense mainly if you are building your own Filament analytics plugin.
How do I test that analytics scripts are injected correctly?
Render a Filament panel page in a feature test and assert that the expected script markup appears in the response. Because injection happens through render hooks, an authenticated request to a panel route is usually enough to cover it. Check your plugin's docs for any config switch that disables injection in the testing environment.
Is it safe to use in production and does it slow down the admin panel?
The package adds only a small render-hook callback and a settings lookup, so server-side overhead on admin requests is negligible. The analytics scripts it outputs load in the browser and do not affect your application's PHP performance. Make sure analytics IDs are configured for production and that tracking is disabled in local and test environments.
What are the alternatives to using this core package?
You can hard-code analytics snippets in your panel's Blade layout, use a generic script-injection package, or install provider-specific injector plugins directly. The intended path for configurable, admin-editable analytics across multiple Filament panels is this core plus one of its injector plugins. Choose a simpler option if you only need a single static snippet in one panel.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle
glavweb/extra-bundle
glavweb/api-bundle
glavweb/admin-bundle
adachsoft/api-version-bundle
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
shitoudev/permissionmanager