A Laravel Nova Card to show Fathom Analytics stats.
charlielangridge/fathom-stats-display is a Laravel package for a laravel nova card to show fathom analytics stats..
It currently has 3 GitHub stars and 1.778 downloads on Packagist (latest version v0.1.3).
Install it with composer require charlielangridge/fathom-stats-display.
Discover more Laravel packages by charlielangridge
or browse all Laravel packages to compare alternatives.
Last updated
You'll need a Fathom account - if you don't have one, feel free to use our referal code: https://usefathom.com/ref/BYODNP - you'll get $10 off your first invoice and we get a little something too
This package requires the following :
To get started, you will need to install the following dependencies :
composer require charlielangridge/fathom-stats-display
Next add your Fathom API Token and Site ID to your .env file
FATHOM_SITE_ID=
FATHOM_TOKEN=
Publish the included config file:
php artisan vendor:publish --provider="CharlieLangridge\FathomStatsDisplay\CardServiceProvider"
That's it, you're ready to go!
Add the card to any of your dashboards
<?php
namespace App\Nova\Dashboards;
use CharlieLangridge\FathomStatsDisplay\FathomStatsDisplay;
use Laravel\Nova\Dashboards\Main as Dashboard;
class Main extends Dashboard
{
/**
* Get the cards for the dashboard.
*
* @return array
*/
public function cards()
{
return [
(new FathomStatsDisplay)->entityId(),
];
}
}
You can pass an optional Fathom Site ID to the card's entityId() method, but it must be one your API key has access to (e.g. you have multiple fathom sites and want to show multiple different analytics cards on your dashboard). If left empty, it will default to the Site ID you have defined in your .env file.
Stats are cached for an hour, but can be refreshed with the on-card link. The time period for the stats is selectable with the drop-down.
The MIT License (MIT). Please see License File for more information.