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 Pixel Laravel Package

jeffersongoncalves/filament-pixel

A Filament plugin by Jefferson Gonçalves that integrates Meta Pixel tracking into Laravel admin panels. Designed for developers, it lets you configure pixel IDs, inject tracking code, and capture conversion events from Filament pages, forms, and custom components with minimal setup and flexible even...

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit

  • The package is a standard Filament panel plugin. Adoption is a single Panel::plugin() registration in a PanelProvider, which is the same extension seam Filament itself uses for first-party plugins. It does not introduce a parallel bootstrapping path, a custom service container binding, or a bespoke asset pipeline, so it composes cleanly with an existing panel provider stack.
  • It is intentionally thin. Three moving parts:
    1. PixelPlugin (implements Filament\Contracts\Plugin) — registers a render hook and a settings page.
    2. PixelServiceProvider — registers PanelsRenderHook::HEAD_START with a pixel::script view.
    3. ManagePixelSettings — a Filament settings page backed by spatie/laravel-settings, persisting the Pixel ID.
  • The Pixel ID lives in the settings store rather than in .env or a per-panel config array. That is a deliberate product decision: it makes the Pixel ID operator-editable from the admin UI without a deploy. The trade-off is that a runtime-editable value now controls a third-party script injected into every admin page, which shifts change control from release management to whoever holds that page's authorization.
  • The dependency chain is the real architectural coupling: the plugin is a UI/tracking wrapper over jeffersongoncalves/laravel-pixel ^2.0 plus filament/spatie-laravel-settings-plugin ^5.0. Two transitively-versioned third-party packages, both from the same single-maintainer ecosystem, sit between us and working behavior.
  • It requires Filament 5.0, Laravel 11.0+, PHP 8.2+. This is the dominant architectural fact. Filament 5 is a recent major; most production panels in an established estate are on Filament 3.x. This package is effectively not adoptable until the panel itself is on Filament 5, which makes this a sequenced dependency rather than a standalone add-on.

Integration feasibility

  • Mechanically trivial: composer require, publish settings migrations (--tag=pixel-settings-migrations), php artisan migrate, register the plugin. Realistically a half-day including review.
  • Two hard gates before any code is written:
    1. Filament 5 on the target panel. If the panel is on Filament 3 or 4, this package is out of scope entirely and the effort estimate is the panel upgrade, not this plugin.
    2. A settings migrations run. spatie/laravel-settings requires a settings table (and per-settings-class migrations). This is a schema change to the host application, not a zero-migration install. It needs to go through normal DBA/release review and will collide with any existing settings migrations if the estate already uses this pattern — table-level conflicts are unlikely, but migration ordering and migrate:fresh seeding behavior need checking.
  • Configuration surface is minimal and idiomatic: PixelPlugin::make()->settingsPage(false) for script-only injection, and the newer navigationGroup(string|Closure) to place the settings page inside an existing panel navigation group.
  • Feasibility is therefore high in isolation, low in the current estate unless the Filament 5 upgrade is already on the roadmap.

Technical risk

Overall: medium-to-high for a package of this footprint, driven almost entirely by non-code factors rather than implementation quality.

  • Compliance risk (highest). Meta Pixel is an advertising/tracking script. Injecting it into an authenticated admin panel means every staff page view — URLs, referrers, session characteristics, and depending on configuration possibly identifiers — is transmitted to Meta. This is a data protection question, not an engineering one, and in an EU/UK context it likely requires a DPIA, a lawful basis assessment, and cookie/consent consideration for internal users. The package injects the base snippet unconditionally via a render hook with no built-in consent gate, no regional disable, and no documented DNT handling. This must be cleared by Legal/Privacy before pilot, and it is the single most likely reason this initiative dies.
  • Content Security Policy risk. Most admin panels in regulated environments run a restrictive CSP. A HEAD_START-injected inline <script> from connect.facebook.net will be blocked unless script-src is extended and connect-src permits Meta endpoints. Symptom is silent: no error to the user, just no data. Budget for a CSP change request, which is often a slower approval path than the code change.
  • Adoption risk. 5 stars, 0 dependents, single maintainer, no evidence of production usage anywhere. There is no community blast radius, which means we will be among the first to hit edge cases, and there is no Stack Overflow corpus to lean on. Bus factor is effectively 1.
  • Documentation integrity risk. The 3.5.0 release note describes navigationGroup() as requiring filament-analytics-core 3.1 — a dependency that does not appear anywhere in the documented requirement set (laravel-pixel ^2.0, filament/spatie-laravel-settings-plugin ^5.0). The release note also uses Vendor\Package\Plugin placeholders while the skill documentation uses PixelPlugin. Either the release note was generated from a template, or the package has a third dependency that is undocumented. This is unresolvable from the supplied material and must be closed before approval — if a transitive constraint exists, it interacts with the Filament 5 gate and could produce a resolution deadlock.
  • Version-pinning risk. No composer.json visible. Without a pinned ^ constraint set we cannot reason about upgrade safety. Require an explicit lockfile review.
  • Functional risk. Tracking is PageView-only per the description. If the stakeholder expectation is funnel or conversion analytics for the admin panel, the package under-delivers and scope will expand into custom event work that the package does not support.

Key questions

  1. Is the target panel on Filament 5? If not, is a Filament 5 upgrade already approved and scheduled? (If no to both, stop here.)
  2. Has Legal/Privacy approved sending admin-panel telemetry to Meta? Is a DPIA required? Is the purpose internal-usage measurement (defensible) or ad-attribution (much harder to justify for staff)?
  3. Does the target panel run a CSP? Who owns the script-src/connect-src allowlist change, and what is the lead time?
  4. What is the actual composer.json constraint set — specifically, does filament-analytics-core appear as a dependency, and at what version? Is laravel-pixel pinned to ^2.0 or looser?
  5. Is the Pixel ID global or per-panel? The settings-page model suggests one value per application; if we run admin + tenant panels with different pixels, confirm the behavior.
  6. Where is the Pixel ID cached, and what is the invalidation path when an operator changes it? Is a cache clear required for the change to take effect?
  7. What happens when the Pixel ID is empty or the settings page is disabled — does the render hook still emit a partial snippet?
  8. Can the base snippet be disabled per environment (local/staging), or will staging traffic pollute the production pixel data?
  9. Is navigationGroup() terminal per plugin instance, and what is the closure's evaluation context (panel, tenant, user)? Is it safe for multi-tenant conditional grouping?
  10. Is there a documented support/security disclosure process, and what is the maintainer's release cadence?

Integration Approach

Stack fit

  • Fits the Laravel 11 / PHP 8.2 / Filament 5 target stack idiomatically. Registration, settings, and navigation follow framework conventions; there is no proprietary abstraction for the team to learn.
  • Does not fit a Filament 3.x or 4.x estate. This is a binary gate, not a gradient.
  • Requires spatie/laravel-settings machinery in the host app. If the estate already uses that pattern, fit improves and marginal cost drops; if it does not, we are introducing a persistence convention for a single settings page, which is disproportionate and will invite pushback on the architecture review.
  • The plugin assumes one pixel configuration per application instance. Multi-panel estates with distinct brands/tenants should assume one deployment per pixel or verify per-panel support before designing around it.

Migration path

  • No application data migration. Two mechanical steps: publish the settings migrations, run them.
  • Practical path:
    1. composer require jeffersongoncalves/filament-pixel in a branch.
    2. php artisan vendor:publish --tag=pixel-settings-migrations → review the generated migration before running it (do not blind-run vendor migrations in a regulated schema).
    3. php artisan migrate in the target environment; verify rollback works.
    4. Register PixelPlugin::make() in the panel provider.
    5. Set the Pixel ID via the settings page, verify the snippet appears in <head> in a browser, verify the network call to Meta succeeds under the production CSP.
  • Rollback is clean: remove the plugin registration and the hook stops firing immediately. The settings table rows can be left in place inertly. This is a strong point — the blast radius of a failed pilot is one commit.

Compatibility

  • Filament major version is the binding constraint. Confirm the panel's exact Filament version against the plugin's constraint before scheduling anything.
  • PHP 8.2+ and Laravel 11+ are broadly satisfiable in a modern estate; verify no legacy service in the panel lags.
  • filament/spatie-laravel-settings-plugin ^5.0 implies a Filament 5-era release line. If the estate has any other plugin pinned to the Filament 4 line of that package, Composer will deadlock. Audit the full plugin set for Filament 5 readiness before committing to a date — this plugin will not be the bottleneck, but it will be the thing blamed when the resolution fails.
  • Confirm the settings migration's table name does not collide with an existing settings table from another package.

Sequencing

  1. Gate 0 — Legal/Privacy. Written determination on whether admin-panel Meta Pixel tracking is permissible. No engineering spend before this. (1–2 weeks elapsed; parallel with step 2.)
  2. Gate 1 — Stack audit. Confirm Filament 5, PHP 8.2+, Laravel 11+, and that every other panel plugin is Filament 5-ready. Resolve the undocumented filament-analytics-core question by reading composer.json directly.
  3. Gate 2 — Security review. CSP script-src/connect-src amendment request, plus a supply-chain check on a 0-dependent, 5-star package (lockfile pin, no dev- constraints, vendor source review — it is a few hundred lines, read it).
  4. Pilot on a non-production or staging panel with a separate test pixel, settingsPage(false) initially to keep the surface minimal, and the snippet verified end-to-end in the browser. Explicitly confirm staging does not fire the production pixel.
  5. Add the settings page and place it with navigationGroup() into an existing "Analytics" or "Settings" group — use the exact display label, and register that group in Panel::navigationGroups() so ordering and collapse behave. Use a closure only where tenant/locale logic genuinely requires it.
  6. Restrict access to the settings page to a named admin role before enabling in production; the Pixel ID is a third-party script selector and should not be editable by every panel user.
  7. Production rollout behind a feature flag or a config-gated registration, so the hook can be switched off without a deploy.
  8. Post-rollout review at 2 weeks: is anyone actually reading the Meta data? If not, remove it. Tracking that nobody consumes is pure compliance liability.

Operational Impact

Maintenance

  • Code-level maintenance is near-zero: one fluent registration per panel, owned by the application team. Upgrades are minor bumps.
  • The real maintenance burden is dependency ownership. We would be adding a two-hop chain (filament-pixel → laravel-pixel → upstream) with a single maintainer at every link, into a panel that must stay on a supported Filament major. When Filament 6 lands, this package's upgrade timeline is entirely outside our control, and a stall blocks our own framework upgrades. For a tracking feature, that is a poor trade — it converts a nice-to-have into a ceiling on the platform roadmap.
  • Mitigation: treat it as a vendored-and-pinned dependency. If Filament 6 readiness slips, the fallback is a ~20-line Blade partial plus a config value — worth pre-writing as a contingency, because it is genuinely cheap.

Support

  • No SLA, no commercial backing, issue-driven support from one maintainer. Response times are unpredictable and cannot be planned around.
  • First-line triage can be handled in-house because the failure surface is small and diagnosable:
    • Snippet absent from <head> → plugin not registered on that panel, or render hook suppressed by another plugin.
    • Snippet present, no data in Meta → CSP block, ad blocker, or wrong/empty Pixel ID. Check the browser network tab first; this resolves most tickets in minutes.
    • Settings page missing → settingsPage(false) set, navigation permission, or migration not run.
    • Settings page errors → settings table or per-settings-class migration missing.
  • Document these four checks in the runbook. That converts an opaque third-party dependency into a self-serviceable one for tier-1 support.

Scaling

  • Runtime cost per request is negligible: one view render, one inline snippet in the head, one or two third-party requests from the browser. It adds no server-side work beyond a settings read, which spatie/laravel-settings caches.
  • Browser-side cost is the honest concern. Adding connect.facebook.net to an admin panel means every page load now waits on (or at least contends with) an external origin. If Meta is slow or blocked at the network edge, admins on restrictive corporate networks or VPNs may see degraded perceived performance. Load it asynchronously and confirm the snippet does not block first paint.
  • The settings value resolves during navigation rendering. If a navigationGroup() closure is used, keep it pure — a closure that queries the database will multiply across every authenticated page load in the panel. Enforce this in code review.
  • Cost scaling is nil; data-volume scaling is the risk. Admin pageview volume is small in absolute terms but the per-event data leaves our boundary permanently and cannot be recalled. That asymmetry — trivial to send, impossible to unsend — is what should drive the retention and consent decision, not the technical cost.

Failure modes

  • Silent no-tracking (most likely, lowest severity). CSP, ad blocker, or a typo'd Pixel ID means zero data with no error surfaced anywhere. The team believes tracking is on. Mitigation: a documented verification step in the release checklist, not a hope.
  • Compliance incident (lowest likelihood, highest severity). Tracking fires on admin pages without a documented lawful basis, or a regional disable was never implemented. This is a reportable-event category in some jurisdictions. Mitigation: Gate 0 above; do not proceed on an engineering judgment call.
  • Staging pollutes production pixel data. No documented environment gate. Mitigation: separate test pixel for non-production, verified before pilot.
  • Duplicate firing. If the Pixel ID is also hardcoded in a Blade layout or a GTM container from a previous initiative, events double-count and every downstream metric is inflated by an unknown factor. Mitigation: grep the codebase and audit GTM before enabling.
  • Panel boot/navigation failure. A navigationGroup() closure that throws or returns an unexpected type breaks panel navigation rendering — high blast radius (the whole admin panel), which is disproportionate to a cosmetic grouping choice. Mitigation: prefer a static string; use a closure only with null-safe access and no I/O; test the panel boots in CI.
  • Orphaned navigation group heading. A group string that does not exactly match an existing panel group label renders as its own near-duplicate heading. Silent UX degradation, no error. Mitigation: exact display label, registered in Panel::navigationGroups(), reviewed in staging.
  • Composer resolution deadlock. A conflicting constraint (Filament 5 line of spatie-laravel-settings, or the undocumented filament-analytics-core floor) surfaces only at install time, potentially mid-sprint. Mitigation: resolve dependencies in a throwaway branch before committing the sprint.
  • Abandonment. Maintainer goes inactive; the package becomes an upgrade blocker for the panel. Mitigation: pin the version, pre-write the ~20-line fallback.

Ramp-up

  • Engineering ramp-up is genuinely low — under an hour for a developer comfortable with Filament panel providers. The plugin is small enough to read end-to-end, and I would require that reading as part of review given the adoption profile.
  • The ramp-up cost is not in engineering. It is in the two non-engineering gates: Privacy review (1–2 weeks, uncertain outcome) and CSP amendment (security-team dependent, often slower than the code change). Plan the schedule around those, not around the composer install.
  • One convention decision to make once and document: the exact navigation group label per panel, and whether closures are permitted at all. Without it, reviewers will accept ad-hoc per-developer strings and the panel navigation will drift into inconsistent groupings across environments.
  • Recommendation: conditional no-go, revisitable. Against 5 stars, 0 dependents, a single maintainer, an undocumented transitive dependency, and a Filament 5 requirement that likely exceeds the current estate, the opportunity score of 27 is the correct read. The engineering is trivial and reversible; the compliance and platform-coupling exposure is not. The defensible path is to (a) close the Privacy question first, (b) confirm the Filament 5 position, and (c) if both clear, spend one day on a staging pilot with a test pixel — while accepting that a ~20-line Blade partial plus a config value delivers the same PageView tracking with none of the dependency, supply-chain, or framework-coupling exposure. If the objective is only "count admin pageviews," build the partial. Adopt the package only if the operator-editable settings page is a genuine requirement — that is the one thing it provides that the partial does not, and it is worth being explicit about whether it justifies everything above.
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.
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
frankyso/ipaymu
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core