teraone/matomo-client is a Laravel package for a matomo api client library for laravel.
It currently has 1 GitHub stars and 15.802 downloads on Packagist (latest version v1.2.1).
Install it with composer require teraone/matomo-client.
Discover more Laravel packages by teraone
or browse all Laravel packages to compare alternatives.
Last updated
This package is based on VisualAppeal/Matomo-PHP-API
You can install the package via composer:
composer require teraone/matomo-client
Publish and edit the configuration file
php artisan vendor:publish
matomo-clientapp/config/matomo-client.php with your Matomo credentialsTo keep things simple, only JSON is supported.
All Methods return a Illuminate\Http\Client\Response
// get the Matomo Client
$matomoClient = app()->get('matomo-client');
// get Visits of this month
$matomo->setDate(now(), MatomoClient::PERIOD_MONTH)
->setFilterLimit(10) // defaults to 100
->getVisits()
->json();
// get Event Names of the last week
$matomo->setDate(now()->subWeek(), MatomoClient::PERIOD_RANGE, now())
->getEventName()
->json();
Under the hood this library uses the Laravel HTTP Client.
You can mock all Requests in your tests
Http::fake(
'https://matomo.test/index.php*' => \Http::response(['value' => 123], 200),
);
Please see CHANGELOG for more information what has changed recently.
Please see CONTRIBUTING for details.
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.