PHPackages                             jeffersongoncalves/laravel-matomo - 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. [Templating &amp; Views](/categories/templating)
4. /
5. jeffersongoncalves/laravel-matomo

ActiveLibrary[Templating &amp; Views](/categories/templating)

jeffersongoncalves/laravel-matomo
=================================

A simple and elegant Laravel package that seamlessly integrates Matomo Analytics tracking code into your Blade views.

v2.0.2(2mo ago)2731MITBladePHP ^8.2|^8.3CI passing

Since Mar 5Pushed 1mo ago1 watchersCompare

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

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

[![Laravel Matomo](https://raw.githubusercontent.com/jeffersongoncalves/laravel-matomo/master/art/jeffersongoncalves-laravel-matomo.png)](https://raw.githubusercontent.com/jeffersongoncalves/laravel-matomo/master/art/jeffersongoncalves-laravel-matomo.png)

Laravel Matomo
==============

[](#laravel-matomo)

[![Latest Version on Packagist](https://camo.githubusercontent.com/8fb0d9e376dc8e3b04d67ad2163fa812c13cb7736699cee00985516f7c73531e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a6566666572736f6e676f6e63616c7665732f6c61726176656c2d6d61746f6d6f2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jeffersongoncalves/laravel-matomo)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/6fa4fc2d482cb67153b612142d6e3187dc58f91984fab9030581aec3ae010483/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6a6566666572736f6e676f6e63616c7665732f6c61726176656c2d6d61746f6d6f2f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d6173746572266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/jeffersongoncalves/laravel-matomo/actions?query=workflow%3A%22Fix+PHP+code+styling%22+branch%3Amaster)[![Total Downloads](https://camo.githubusercontent.com/7125e4ed11f25dc7791629d67370e7a5d8e71df65b0b264057c727f7a9a748b6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a6566666572736f6e676f6e63616c7665732f6c61726176656c2d6d61746f6d6f2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jeffersongoncalves/laravel-matomo)

A simple and elegant Laravel package that seamlessly integrates Matomo Analytics tracking code into your Blade views. Settings are stored in the database via [spatie/laravel-settings](https://github.com/spatie/laravel-settings), allowing runtime configuration without `.env` files.

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

[](#installation)

Install the package via Composer:

```
composer require jeffersongoncalves/laravel-matomo
```

Publish the settings migration:

```
php artisan vendor:publish --tag=matomo-settings-migrations
```

Run the migration:

```
php artisan migrate
```

Usage
-----

[](#usage)

Add the tracking script to your Blade layout (typically before ``):

```
@include('matomo::script')
```

### Configuration

[](#configuration)

All settings are stored in the database. You can update them via code:

```
use JeffersonGoncalves\Matomo\Settings\MatomoSettings;

$settings = app(MatomoSettings::class);

$settings->domains = 'example.com';
$settings->site_id = '1';
$settings->host_analytics = 'analytics.example.com';
$settings->file = 'matomo.php';
$settings->script = 'matomo.js';

$settings->save();
```

### Available Settings

[](#available-settings)

SettingDefaultDescription`domains``''`Domain(s) for tracking`site_id``'1'`Site ID in Matomo`host_analytics``''`Matomo server URL (without protocol)`file``'matomo.php'`PHP tracking file`script``'matomo.js'`JS tracking fileTesting
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

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

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

[](#contributing)

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

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Jefferson Goncalves](https://github.com/jeffersongoncalves)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

45

—

FairBetter than 92% of packages

Maintenance87

Actively maintained with recent releases

Popularity15

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 65.7% 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 ~89 days

Total

5

Last Release

77d ago

Major Versions

v1.0.1 → v2.0.02026-02-22

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/411493?v=4)[Jefferson Gonçalves](/maintainers/jeffersongoncalves)[@jeffersongoncalves](https://github.com/jeffersongoncalves)

---

Top Contributors

[![jeffersongoncalves](https://avatars.githubusercontent.com/u/411493?v=4)](https://github.com/jeffersongoncalves "jeffersongoncalves (23 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (8 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (3 commits)")[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (1 commits)")

---

Tags

analyticsbladecomposerlaravellaravel-packagematomomatomo-analyticsmatomo-trackingphpspatie-laravel-settingslaraveljeffersongoncalveslaravel-matomo

###  Code Quality

TestsPest

Static AnalysisPHPStan

### Embed Badge

![Health badge](/badges/jeffersongoncalves-laravel-matomo/health.svg)

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

###  Alternatives

[ryangjchandler/blade-capture-directive

Create inline partials in your Blade templates with ease.

8222.2M12](/packages/ryangjchandler-blade-capture-directive)[daikazu/laravel-glider

Start using Glide on-the-fly instantly in your Laravel blade templates.

882.3k](/packages/daikazu-laravel-glider)

PHPackages © 2026

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