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
Laravel Fathom

Laravel Fathom Laravel Package

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...

View on GitHub
Deep Wiki
Context7

Laravel Fathom is a lightweight package for integrating Fathom Analytics into Laravel applications. It provides a simple, configurable way to embed the privacy-focused tracking script without hardcoding snippets, keeping your analytics setup clean and maintainable.

  • Blade directive/component for quick script inclusion
  • Configurable site ID via environment-friendly config
  • Publishable configuration for per-project setup
  • Lightweight integration with no extra runtime dependencies
Frequently asked questions about Laravel Fathom
How do I install jeffersongoncalves/laravel-fathom in a Laravel app?
Install it with Composer using composer require jeffersongoncalves/laravel-fathom, then publish any package config or settings migrations if the documentation requires it. Configure your Fathom site ID through the package's database-driven settings rather than a .env file, and add the provided Blade directive or component to your root layout. Confirm the exact directive name and publish tags by reading the package source before wiring it into production.
Does this package support Laravel 11 and Laravel 12?
Laravel 11 and 12 rely on package auto-discovery because the config/app.php provider array was removed, so this package must register its provider automatically. The supported PHP and Laravel ranges are not confirmed in the overview and should be checked in composer.json before installing. If the constraints do not explicitly include your Laravel version, do not assume compatibility.
How do I configure the Fathom site ID without using .env?
This package is designed around spatie/laravel-settings, so the site ID is stored in database-driven settings instead of environment files. You will typically publish and run the package's settings migration, then set the site ID through the settings class or an admin interface. Verify the exact settings property name, migration path, and caching behavior in the source before relying on it.
Can I exclude local, staging, or admin pages from Fathom tracking?
The package's config plumbing and environment gating may help, but a dedicated path allowlist is not confirmed. Check the published config for enabled or environment flags, and wrap the Blade directive in your own condition for paths such as /admin or /telescope. Always verify that staging does not send data to your production Fathom site.
Does it support a custom Fathom tracker domain or CNAME?
Custom tracker domain support is critical for Fathom because it helps avoid ad-blockers, but the overview does not confirm whether this package exposes it. Read the config and Blade source to see whether the CDN host is configurable or hardcoded to cdn.usefathom.com. If it is hardcoded, vendor the Fathom snippet yourself instead of using the wrapper.
Does the Fathom script load asynchronously and support a CSP nonce?
Fathom's standard embed usually loads asynchronously, but this package's exact output must be confirmed in the Blade source. CSP nonce support is not mentioned, so verify whether the emitted script tag accepts a nonce attribute. If it does not, adjust your script-src policy or vendor a small component that adds the nonce.
Can I track goal conversions or SPA route changes with this package?
The package is described primarily as injecting the tracking script and pageview configuration, so goal events and SPA hooks are not confirmed. You can usually call fathom.trackGoal from your own JavaScript when needed. For Inertia, Livewire, or other SPA-style navigation, verify whether the package handles route-change pageviews or whether you must trigger them manually.
Is this package safe and maintained enough for production?
The package has a very low adoption profile, a single author, and an unusual release timestamp, so abandonment risk is high. It executes at framework boot with full application privileges, so audit the provider and Blade files before use. Pin an exact version with a lockfile, and be prepared to vendor the directive and remove the dependency if maintenance stalls.
What are alternatives to using this Laravel Fathom package?
The simplest alternative is to paste Fathom's official snippet directly into your root Blade layout and manage the site ID through your own config or settings. You can also wrap that snippet in a small anonymous Blade component under your own namespace. Other analytics packages exist, but they may target different services or add more infrastructure than a cookieless Fathom pageview needs.
How can I test that Fathom tracking is actually working?
Analytics snippets often fail silently, so do not rely on Laravel logs. Open browser developer tools and confirm a request to your Fathom tracker host after page load, then check the Fathom dashboard for realtime pageviews. Also test with your production CSP, consent settings, and configured site ID in a staging environment before deploying.
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.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource