jeffersongoncalves/laravel-fathom
A Laravel package for integrating Fathom Analytics into your application. Configure your Fathom site ID, inject the privacy-friendly tracking script, and start collecting lightweight, cookie-free analytics with minimal setup. Ideal for developers who want simple, privacy-focused website stats withou...
<script> tag plus a config value) with a Composer dependency. The honest framing is not "buy vs. build" but "vendor vs. inline." Decide whether one line of Blade in your layout is worth an external package boundary at all.<script> tags now inherit Laravel's Vite CSP nonce when the app sets one, so nonce-based script-src policies work without 'unsafe-inline'. This converts a previously real objection ("our CSP forbids inline scripts") into a non-issue for the package path — but it does not change the underlying decision, since a hand-inlined snippet can equally call the same nonce helper. Treat it as removing a blocker, not creating a reason to adopt.@production directive away.Reasonable to adopt when:
laravel-security-headers or equivalent) and want the nonce handled for you rather than re-implemented in every layout. As of 4.1.0 this is no longer a reason to exclude the package — though it is also not a reason to prefer it over a one-line inline tag that calls the same nonce helper.config/, not in templates" convention and the snippet would otherwise be hardcoded.Look elsewhere (or skip entirely) when:
To executives (30 seconds): Fathom is our privacy-friendly, cookieless analytics option — no consent banner overhead, GDPR-simpler than GA4. This package is a small convenience wrapper that drops Fathom's tracking tag into Laravel templates via configuration rather than hardcoded snippets. The latest release (4.1.0) makes it compatible with our strict Content-Security-Policy, which is a nice hygiene win but doesn't change the shape of the decision. It is not a strategic dependency: it saves maybe an hour of setup and enforces consistency across our sites. Cost is the same as Fathom's subscription; the package itself is MIT and free. Recommendation: use Fathom if analytics vendor selection is the decision; treat this wrapper as optional plumbing we can replace in an afternoon if it goes stale.
To engineering: It's a Blade directive / config-backed include for the Fathom script. Release 4.1.0 adds CSP nonce support — rendered <script> tags pick up Laravel's Vite nonce, so nonce-based script-src works without 'unsafe-inline'. That's a legitimate reason the package cleared a bar it previously failed; credit it, but weigh it against the fact that the same one-line inline tag can call the nonce helper directly. Honest assessment otherwise unchanged: low community signal (2 stars, 0 dependents, single maintainer), though the 4.1.0 release is a mildly positive maintenance signal. Practical guidance: adopt only if we're multi-site or want a single instrumentation point; otherwise inline the snippet in our layout, nonce included, and skip the dependency. If we do adopt, pin the version, keep usage isolated to one layout partial, and be ready to fork — it's small enough that a fork is a non-event. Note limitations up front: page views only, no SPA route handling, no consent-manager integration, no event tracking, no nonce propagation into JS-injected scripts. Those remain our own work either way.
One-line decision ask: "Approve Fathom as the analytics vendor. Approve this package only as optional convenience — now CSP-compatible, still not a dependency we build a roadmap on."
How can I help you explore Laravel packages today?