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...
Architecture fit
<script> tag. No models, migrations, routes, queues, or container bindings.Vite::useCspNonce()) and stamps it onto every script it renders.Integration feasibility
composer require, publish config, set FATHOM_SITE_ID, add the directive to the base layout. 15–30 minutes including verification.script-src no longer requires 'unsafe-inline' or a hand-rolled snippet wrapper — this is the single most common reason teams abandon analytics packages in a strict-CSP environment.Vite::useCspNonce() being called during the request. Applications that generate nonces through middleware and inject them into Blade manually (common with laravel-security-headers or bespoke middleware that does not route through Vite) may not be covered. Confirm whether the package reads Vite::cspNonce() directly, checks app('csp-nonce'), or supports an explicit config override.cdn.usefathom.com). Fathom's main operational differentiator against ad-blockers. If the package hardcodes the default CDN host, it forfeits the primary reason to pay for Fathom — and 4.1.0 does nothing here.async/defer emission, environment/path allowlists, directive vs. anonymous component, and whether the snippet matches Fathom's current v3 data-site format.Technical risk
Vite facade / container), which is a slightly wider surface than pure templating. A full read of the codebase remains mandatory and should still take under 20 minutes.nonce="", which some browsers treat as a mismatch and block. Verify the exact attribute output in a CSP-enabled staging environment rather than assuming it degrades gracefully.Key questions
/admin, /telescope)?async/defer?fathom.trackGoal) and SPA route-change hooks exposed, or only the pageview snippet?Stack fit
Migration path
resources/views/components under your own namespace if the package stalls. Still the correct default posture at this adoption level.Compatibility
4.1.0) in the lockfile; do not float given the maintainer profile.nonce attribute matches the header value in a real response, and confirm the script appears in script-src (or script-src-elem). Test with Content-Security-Policy-Report-Only first so a mismatch surfaces as a report rather than a blocked script.Sequencing
script-src violations, and a CSP report-only endpoint. Regression-test the no-nonce path (local/dev, where Vite may not be running).Maintenance
Support
Scaling
async is used.Failure modes
nonce="" → script blocked despite correct configuration intent; verify explicitly rather than assuming.Ramp-up
How can I help you explore Laravel packages today?