PHPackages                             jeffersongoncalves/laravel-fathom - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. jeffersongoncalves/laravel-fathom

ActiveLibrary[Templating &amp; Views](/categories/templating)

jeffersongoncalves/laravel-fathom
=================================

This Laravel package seamlessly integrates Fathom analytics into your Blade templates. Easily track website visits and user engagement directly within your Laravel application, providing valuable insights into your website's performance. This package simplifies the integration process, saving you time and effort. With minimal configuration, you can leverage Fathom's powerful analytics features to gain a clearer understanding of your audience and website usage.

3.0.3(1mo ago)21.1k↑207.7%1MITPHPPHP ^8.2|^8.3CI passing

Since May 2Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/jeffersongoncalves/laravel-fathom)[ Packagist](https://packagist.org/packages/jeffersongoncalves/laravel-fathom)[ Docs](https://github.com/jeffersongoncalves/laravel-fathom)[ GitHub Sponsors](https://github.com/jeffersongoncalves)[ RSS](/packages/jeffersongoncalves-laravel-fathom/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (6)Dependencies (24)Versions (8)Used By (1)

[![Laravel Fathom](https://raw.githubusercontent.com/jeffersongoncalves/laravel-fathom/master/art/jeffersongoncalves-laravel-fathom.png)](https://raw.githubusercontent.com/jeffersongoncalves/laravel-fathom/master/art/jeffersongoncalves-laravel-fathom.png)

Laravel Fathom
==============

[](#laravel-fathom)

[![Latest Version on Packagist](https://camo.githubusercontent.com/e9adb8e83456292c9647974ad9948a0393fd1eac8a67a0956777bcd64b84f794/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a6566666572736f6e676f6e63616c7665732f6c61726176656c2d666174686f6d2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jeffersongoncalves/laravel-fathom)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/6439f352b4d957c1f2d8c9acca57aff2177c11df6e17720a13d3ba1d12050123/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6a6566666572736f6e676f6e63616c7665732f6c61726176656c2d666174686f6d2f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d6173746572266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/jeffersongoncalves/laravel-fathom/actions?query=workflow%3A%22Fix+PHP+code+styling%22+branch%3Amaster)[![Total Downloads](https://camo.githubusercontent.com/aa7d426b1eccce9075fc7f4d8053e9275f408b7775e68f00ab18a73ebf80748f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a6566666572736f6e676f6e63616c7665732f6c61726176656c2d666174686f6d2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jeffersongoncalves/laravel-fathom)

This Laravel package seamlessly integrates Fathom analytics into your Blade templates. Easily track website visits and user engagement directly within your Laravel application, providing valuable insights into your website's performance. This package simplifies the integration process, saving you time and effort. With minimal configuration, you can leverage Fathom's powerful analytics features to gain a clearer understanding of your audience and website usage.

Settings are stored in the database using [spatie/laravel-settings](https://github.com/spatie/laravel-settings), allowing you to manage them dynamically (e.g., via an admin panel) without relying on `.env` files.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require jeffersongoncalves/laravel-fathom
```

Publish and run the settings migration:

```
php artisan vendor:publish --tag=fathom-settings-migrations
php artisan migrate
```

Configuration
-------------

[](#configuration)

All settings are managed exclusively from the database after running the migration. You can update them programmatically:

```
use JeffersonGoncalves\Fathom\Settings\FathomSettings;

$settings = app(FathomSettings::class);
$settings->website_id = 'NEW_SITE_ID';
$settings->spa = 'history';
$settings->save();
```

Or use the helper function:

```
$settings = fathom_settings();
$settings->website_id = 'NEW_SITE_ID';
$settings->save();
```

Or use the Facade. The facade resolves the underlying `FathomSettings` instance, so read or write properties through `getFacadeRoot()`:

```
use JeffersonGoncalves\Fathom\Facades\Fathom;

// Read a value
$websiteId = Fathom::getFacadeRoot()->website_id;

// Update and persist
$settings = Fathom::getFacadeRoot();
$settings->website_id = 'NEW_SITE_ID';
$settings->save();
```

### Available settings

[](#available-settings)

SettingTypeDefaultDescription`website_id``?string``null`Your Fathom site ID. The script only renders when this is set.`canonical``bool``true`When `false`, sends `data-canonical="false"` to ignore canonical URLs.`auto``bool``true`Controls `data-auto-track` (automatic pageview tracking).`spa``?string``null`SPA tracking mode (e.g. `history`, `hash`, `auto`).`honor_dnt``?bool``null`When truthy, sends `data-honor-dnt="true"` to respect Do Not Track.Usage
-----

[](#usage)

Add the Fathom script to your Blade layout (typically in ``):

```
@include('fathom::script')
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Jefferson Goncalves](https://github.com/jeffersongoncalves)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

49

—

FairBetter than 94% of packages

Maintenance91

Actively maintained with recent releases

Popularity22

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 69.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~77 days

Recently: every ~23 days

Total

6

Last Release

42d ago

Major Versions

1.0.0 → 2.0.02026-02-21

2.0.0 → 3.0.02026-02-21

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/411493?v=4)[Jefferson Gonçalves](/maintainers/jeffersongoncalves)[@jeffersongoncalves](https://github.com/jeffersongoncalves)

---

Top Contributors

[![jeffersongoncalves](https://avatars.githubusercontent.com/u/411493?v=4)](https://github.com/jeffersongoncalves "jeffersongoncalves (30 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (9 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (3 commits)")[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (1 commits)")

---

Tags

analyticsbladecomposerfathomfathom-analyticsjeffersongoncalveslaravellaravel-fathomlaravel-packagephpprivacyspatie-laravel-settingstrackinglaraveljeffersongoncalveslaravel-fathom

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/jeffersongoncalves-laravel-fathom/health.svg)

```
[![Health](https://phpackages.com/badges/jeffersongoncalves-laravel-fathom/health.svg)](https://phpackages.com/packages/jeffersongoncalves-laravel-fathom)
```

###  Alternatives

[finity-labs/fin-mail

A powerful email template manager and composer for Filament with dynamic token replacement, template versioning, and inline email sending.

284.5k1](/packages/finity-labs-fin-mail)[slimani/filament-media-manager

A media manager plugin for Filament.

126.9k](/packages/slimani-filament-media-manager)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
