charlielangridge/fathom-stats-display
最新稳定版本:v0.1.3
Composer 安装命令:
composer require charlielangridge/fathom-stats-display
包简介
A Laravel Nova Card to show Fathom Analytics stats.
README 文档
README
A Laravel Nova Card to show Fathom Analytics stats.
Table of Contents
Getting Started
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
Prerequisites
This package requires the following :
- PHP 8.0 or higher
- Laravel Nova 4.0 or higher
- Fathom account with API access
Installing
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!
Usage
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.
Authors
Contributors
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 643
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-11-29