PHPackages                             teraone/matomo-client - 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. [API Development](/categories/api)
4. /
5. teraone/matomo-client

ActiveLibrary[API Development](/categories/api)

teraone/matomo-client
=====================

A Matomo API Client Library for Laravel

v1.2.1(1y ago)115.8k↓100%1[1 PRs](https://github.com/teraone/matomo-client/pulls)MITPHPPHP ^8.3CI passing

Since Nov 20Pushed 4mo ago2 watchersCompare

[ Source](https://github.com/teraone/matomo-client)[ Packagist](https://packagist.org/packages/teraone/matomo-client)[ Docs](https://github.com/teraone/matomo-client)[ RSS](/packages/teraone-matomo-client/feed)WikiDiscussions master Synced today

READMEChangelog (7)Dependencies (3)Versions (9)Used By (0)

A simple Matomo API Client for Laravel.
=======================================

[](#a-simple-matomo-api-client-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/076b6aac5f4d7b9f688e883bdef71a7c3dd9b66e241a970791e498e7b478ea54/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f746572616f6e652f6d61746f6d6f2d636c69656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/teraone/matomo-client)[![Total Downloads](https://camo.githubusercontent.com/a56fb058739fb015db1c284ee3c894b4b9ea0dd4928bbe45b3b6b538db97eebb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f746572616f6e652f6d61746f6d6f2d636c69656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/teraone/matomo-client)[![GitHub Actions](https://github.com/teraone/matomo-client/actions/workflows/main.yml/badge.svg)](https://github.com/teraone/matomo-client/actions/workflows/main.yml/badge.svg)

This package is based on [VisualAppeal/Matomo-PHP-API](https://github.com/VisualAppeal/Matomo-PHP-API)

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

[](#installation)

You can install the package via composer:

```
composer require teraone/matomo-client
```

Publish and edit the configuration file

```
php artisan vendor:publish
```

- Choose `matomo-client`
- Update the file `app/config/matomo-client.php` with your Matomo credentials

Usage
-----

[](#usage)

To 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();
```

### Testing

[](#testing)

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),
);
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [VisualAppeal](https://github.com/VisualAppeal)
- [All Contributors](https://github.com/VisualAppeal/Matomo-PHP-API/graphs/contributors)
- This package was generated using the [Laravel Package Boilerplate](https://laravelpackageboilerplate.com).

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

46

↑

FairBetter than 93% of packages

Maintenance64

Regular maintenance activity

Popularity27

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~202 days

Recently: every ~273 days

Total

7

Last Release

369d ago

Major Versions

0.0.1 → v1.0.02021-11-30

PHP version history (3 changes)0.0.1PHP ^8.0

v1.1.1PHP ^8

v1.2.0PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/34bb3ed24e78987d5f89cff121c51fd55070a90f2887eba16583a78cb77acb50?d=identicon)[teraone](/maintainers/teraone)

---

Top Contributors

[![tecbeast42](https://avatars.githubusercontent.com/u/11748193?v=4)](https://github.com/tecbeast42 "tecbeast42 (3 commits)")

---

Tags

laravelpiwikmatomoteraonematomo-client

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/teraone-matomo-client/health.svg)

```
[![Health](https://phpackages.com/badges/teraone-matomo-client/health.svg)](https://phpackages.com/packages/teraone-matomo-client)
```

###  Alternatives

[codedredd/laravel-soap

A SoapClient wrapper integration for Laravel

221500.6k3](/packages/codedredd-laravel-soap)[scalar/laravel

Render your OpenAPI-based API reference

6065.3k2](/packages/scalar-laravel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
