Matomo Statistics Widget

Add a dashboard widget displaying your (self-hosted) Matomo statistics

#How to install

Install via the Control Panel or via Composer:

composer require jeroenpeters1986/statamic-matomo-widget

If assets are not automatically published during installation, run:

php artisan vendor:publish --tag=statamic-matomo-widget --force

#Add environment variables

Add the following to your .env file:

MATOMO_URL=https://your-matomo-url
MATOMO_SITE_ID=1
MATOMO_API_TOKEN=your-token-auth

#Enable Widget

Add the widget to your Control Panel configuration in config/statamic/cp.php:

[
'type' => 'matomo',
'width' => 50,
],

#Configuration

Publish the configuration file if you want to customize chart type, height, metrics, days, or cache duration:

php artisan vendor:publish --tag=matomo-widget-config

This creates config/statamic/matomo_widget.php.

#Compatibility

Version 2.x requires PHP 8.3+ and Statamic 6.0+. Sites running Statamic 3.3, 4, or 5 continue to use the 1.x release (^1.0). If you encounter any issues, please create an issue on GitHub.