Fathom Analytics API
This is an unofficial PHP SDK to get statistics out of Fathom Analytics, as long as it does not offer an official API.
You can install the package via composer:
composer require beyondcode/fathom-api
$analytics = new BeyondCode\FathomAnalytics($email, $password); $sites = $analytics->getSites(); $analytics->getCurrentVisitors($siteId); // Returns the visitor data for today $analytics->getData($siteId); // Returns the visitor data for the whole week until today $analytics->getData($siteId, Carbon::now()->startOfWeek()); // Returns the visitor data for two days ago until yesterday. $analytics->getData($siteId, Carbon::now()->subDays(2), Carbon::now()->subDays(1));
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
If you discover any security related issues, please email firstname.lastname@example.org instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.