PHPackages                             devlogx/filament-fathom-dashboard-widget - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. devlogx/filament-fathom-dashboard-widget

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

devlogx/filament-fathom-dashboard-widget
========================================

This is my package filament-fathom-dashboard-widget

1.0.0(2y ago)48.6k↓50%1[1 issues](https://github.com/devlogx/filament-fathom-dashboard-widget/issues)MITPHPPHP ^8.1|^8.2|^8.3

Since May 9Pushed 2y agoCompare

[ Source](https://github.com/devlogx/filament-fathom-dashboard-widget)[ Packagist](https://packagist.org/packages/devlogx/filament-fathom-dashboard-widget)[ Docs](https://github.com/devlogx/filament-fathom-dashboard-widget)[ GitHub Sponsors](https://github.com/devlogx)[ RSS](/packages/devlogx-filament-fathom-dashboard-widget/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (14)Versions (2)Used By (0)

  ![XtendLaravel](https://raw.githubusercontent.com/devlogx/filament-fathom-dashboard-widget/main/art/FilamentFathomWidget.png)Filament Fathom Dashboard Widget
================================

[](#filament-fathom-dashboard-widget)

[![Latest Version on Packagist](https://camo.githubusercontent.com/cfa52c840a99cd68ea2c0bffb19d9ee92c4dcdb0a8eda01fa78767ff2e5cff5e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6465766c6f67782f66696c616d656e742d666174686f6d2d64617368626f6172642d7769646765742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/devlogx/filament-fathom-dashboard-widget)[![GitHub Tests Action Status](https://camo.githubusercontent.com/d485b19633886eb6a48284e8e11397e86e7bf52dbc20c8d43c7cfcc199c711e0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6465766c6f67782f66696c616d656e742d666174686f6d2d64617368626f6172642d7769646765742f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/devlogx/filament-fathom-dashboard-widget/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/b849fe40c68da016166c00d6d187f27c4e6cebbdc9e34e24d0b797b1b5938e21/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6465766c6f67782f66696c616d656e742d666174686f6d2d64617368626f6172642d7769646765742f6669782d7068702d636f64652d7374796c696e672e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/devlogx/filament-fathom-dashboard-widget/actions?query=workflow%3A%22Fix+PHP+code+styling%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/7ad347e2f13cefd14705e00cd79df52d0750462b0e471a1cba0237718d2bbd16/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6465766c6f67782f66696c616d656e742d666174686f6d2d64617368626f6172642d7769646765742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/devlogx/filament-fathom-dashboard-widget)

This package allows you to integrate a simple analytics dashboard widget for panel.

Screenshots
-----------

[](#screenshots)

[![filament_fathom_light.jpg](https://raw.githubusercontent.com/devlogx/filament-fathom-dashboard-widget/main/art/filament_fathom_light.jpg)](https://raw.githubusercontent.com/devlogx/filament-fathom-dashboard-widget/main/art/filament_fathom_light.jpg)[![filament_fathom_dark.jpg](https://raw.githubusercontent.com/devlogx/filament-fathom-dashboard-widget/main/art/filament_fathom_dark.jpg)](https://raw.githubusercontent.com/devlogx/filament-fathom-dashboard-widget/main/art/filament_fathom_dark.jpg)

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

[](#installation)

You can install the package via composer:

```
composer require devlogx/filament-fathom-dashboard-widget
```

Get the Fathom API-Token and add it your `env` file.

1. Visit the [Fathom "API" settings page](https://app.usefathom.com/api).
2. Login and click "Create New".
3. Give your token a name.
4. Select under Permissions "Site-specific key".
5. Select your Site and below "Read".
6. Add the copied API-Token to your `.env` file:

```
# ...
FATHOM_API_TOKEN="xxxxx|xxxxxxxxxxxxxxxxxxx"
FATHOM_SITE_ID="XXXXXXX"
```

You can publish the config file with:

```
php artisan vendor:publish --tag="filament-fathom-dashboard-widget-config"
```

Optionally, you can publish the translations using

```
php artisan vendor:publish --tag="filament-fathom-dashboard-widget-translations"
```

This is the contents of the published config file:

```
return [
    /*
    |--------------------------------------------------------------------------
    | Fathom API-Token & Site id
    |--------------------------------------------------------------------------
    |
    | You can acquire your API-Token from the url below:
    | https://app.usefathom.com/api
    |
    */
    'api_token' => env('FATHOM_API_TOKEN'),
    'site_id' => env('FATHOM_SITE_ID'),

    /*
    |--------------------------------------------------------------------------
    | Fathom Domain
    |--------------------------------------------------------------------------
    |
    | If you're from the EU, I can recommend using the EU CDN:
    | cdn-eu.usefathom.com
    |
    */
    'domain' => env('FATHOM_DOMAIN', 'cdn.usefathom.com'),

    /*
    |--------------------------------------------------------------------------
    | Stats cache ttl
    |--------------------------------------------------------------------------
    |
    | This value is the ttl for the displayed dashboard
    | stats values. You can increase or decrease
    | this value.
    |
    */
    'cache_time' => 300,
];
```

Usage
-----

[](#usage)

### Create own Dashboard file

[](#create-own-dashboard-file)

Under `Filament/Pages/` create a new file called `Dashboard.php` with following contents:

```
