PHPackages                             sanskritick/matomo-tracker - 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. sanskritick/matomo-tracker

ActiveLibrary[API Development](/categories/api)

sanskritick/matomo-tracker
==========================

A Laravel facade/wrapper for the matomo/matomo-php-tracker for server side Matomo tracking.

0.1.3(5y ago)0270MITPHP

Since Feb 27Pushed 3y ago1 watchersCompare

[ Source](https://github.com/sanskritick/matomo-tracker)[ Packagist](https://packagist.org/packages/sanskritick/matomo-tracker)[ Docs](https://github.com/sanskritick/matomo-tracker)[ RSS](/packages/sanskritick-matomo-tracker/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (5)Versions (5)Used By (0)

MatomoTracker
=============

[](#matomotracker)

[![Latest Stable Version](https://camo.githubusercontent.com/1b6a0488fea281f1dc22fb9177158aa361856751b4decc958efce60ca071f3cd/68747470733a2f2f706f7365722e707567782e6f72672f73616e736b72697469636b2f6d61746f6d6f2d747261636b65722f76)](//packagist.org/packages/sanskritick/matomo-tracker)[![Total Downloads](https://camo.githubusercontent.com/e402a4065b15a8631a5d6e27b4197ad62b501f8c0ed3475d9b55f0c28f4e3994/68747470733a2f2f706f7365722e707567782e6f72672f73616e736b72697469636b2f6d61746f6d6f2d747261636b65722f646f776e6c6f616473)](//packagist.org/packages/sanskritick/matomo-tracker)[![License](https://camo.githubusercontent.com/51742bcdffc53f5e5023a032d5917d4347118eb2a774a971ab707a557cdcf5a7/68747470733a2f2f706f7365722e707567782e6f72672f73616e736b72697469636b2f6d61746f6d6f2d747261636b65722f6c6963656e7365)](//packagist.org/packages/sanskritick/matomo-tracker)

About
-----

[](#about)

The `sanskritick/matomo-tracker` Laravel package is a wrapper for the `matomo/matomo-php-tracker`. The Matomo php tracker allows serverside tracking.

Features
--------

[](#features)

- MatomoTracker Facade
- Queued tracking requests in Laravel queue

Feel free to suggest new features.

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

[](#installation)

Via Composer

Require the `sanskritick/matomo-tracker` package in your `composer.json` and update your dependencies:

```
composer require sanskritick/matomo-tracker
```

Publish the config file (optional)

Run `php artisan vendor:publish` to publish the config file if needed.

```
php artisan vendor:publish
```

Update your `.env`

Add these variables to your `.env` file and configure it to fit your environment.

```
[...]
MATOMO_URL="https://your.matomo-install.com"
MATOMO_SITE_ID=1
MATOMO_AUTH_TOKEN="00112233445566778899aabbccddeeff"
MATOMO_QUEUE="matomotracker"
[...]
```

That's it!

Usage
-----

[](#usage)

You can use the facade to track.

```
MatomoTracker::doTrackPageView('Page Title')
```

### Tracking

[](#tracking)

#### Basic functionality

[](#basic-functionality)

Please see the \[[https://developer.matomo.org/api-reference/PHP-Matomo-Tracker\](Matomo](https://developer.matomo.org/api-reference/PHP-Matomo-Tracker](Matomo) Tracker) page for basic method documentation.

Additionally there are some Methods to simplyfy the usage:

```
// instead of using
MatomoTracker::doTrackAction($actionUrl, 'download') // or
MatomoTracker::doTrackAction($actionUrl, 'link')

// you can use this
MatomoTracker::doTrackDownload($actionUrl);
MatomoTracker::doTrackOutlink($actionUrl);
```

#### Queues

[](#queues)

For queuing you can use these functions.

```
MatomoTracker::queuePageView(string $documentTitle)
MatomoTracker::queueEvent(string $category, string $action, $name = false, $value = false)
MatomoTracker::queueContentImpression(string $contentName, string $contentPiece = 'Unknown', $contentTarget = false)
MatomoTracker::queueContentInteraction(string $interaction, string $contentName, string $contentPiece = 'Unknown', $contentTarget = false)
MatomoTracker::queueSiteSearch(string $keyword, string $category = '',  $countResults = false)
MatomoTracker::queueGoal($idGoal, $revencue = 0.0)
MatomoTracker::queueDownload(string $actionUrl)
MatomoTracker::queueOutlink(string $actionUrl)
MatomoTracker::queueEcommerceCartUpdate(float $grandTotal)
MatomoTracker::queueEcommerceOrder(float $orderId, float $grandTotal, float $subTotal = 0.0, float $tax = 0.0, float $shipping = 0.0,  float $discount = 0.0)
MatomoTracker::queueBulkTrack()
```

For setting up queues, find the documentation on [Laravel Queues](https://laravel.com/docs/6.x/queues).

### Settings

[](#settings)

Have a look in the \[[https://developer.matomo.org/api-reference/PHP-Matomo-Tracker\](Matomo](https://developer.matomo.org/api-reference/PHP-Matomo-Tracker](Matomo) Tracker) page for basic settings documentation.

Additionaly these settings are available:

```
MatomoTracker::setCustomDimension(int $id, string $value) // only applicable if the custom dimensions plugin is installed on the Matomo installation
MatomoTracker::setCustomDimensions([]) // array of custom dimension objects {id: , value: } // bulk insert of custom dimensions and basic type checking
MatomoTracker::setCustomVariables([]) // array of custom variable objects {id: , name: , value: , scope: } // bulk insert of custom variables and basic type checking
```

Change log
----------

[](#change-log)

Please see the [changelog](changelog.md) for more information on what has changed recently.

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

[](#contributing)

Please see [contributing.md](contributing.md) for details and a todolist.

Security
--------

[](#security)

Please see [security.md](security.md) for details and a todolist.

License
-------

[](#license)

MIT. Please see the [license file](license.md) for more information.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 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 ~0 days

Total

4

Last Release

1895d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5d30645e834a8506cbaddd1563ca98d20b621a8cd5eb298a4681d5310c6c0a3a?d=identicon)[vbasky](/maintainers/vbasky)

---

Top Contributors

[![vbasky](https://avatars.githubusercontent.com/u/287302?v=4)](https://github.com/vbasky "vbasky (10 commits)")

---

Tags

laravelserver side trackingMatomo PHP Tracker

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/sanskritick-matomo-tracker/health.svg)

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

###  Alternatives

[alfrasc/laravel-matomo-tracker

A Laravel facade/wrapper for the matomo/matomo-php-tracker for server side Matomo tracking.

1923.9k](/packages/alfrasc-laravel-matomo-tracker)[rakibdevs/openweather-laravel-api

Laravel package to connect https://openweathermap.org/ to get customized weather data for any location on the globe immediately

7648.2k](/packages/rakibdevs-openweather-laravel-api)

PHPackages © 2026

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