Piwik Package for Laravel

4.2.0 2023-03-17 20:41 UTC


GitHub Workflow Status Sonar Quality Gate Sonar Coverage Packagist PHP Version Support Packagist Version Packagist Downloads

An Interface to Piwik's Analytics API for Laravel (Composer Package)

This is the Laravel 5+ version of the Laravel-Piwik Bundle.

Version 4.0.0 and onwards have dropped support for PHP 5.6, 7.0 and 7.1


Add RobBrazier/Piwik to composer.json:

    "require": {
        "robbrazier/piwik": "~4.2"

For Laravel 5.4 and below

Add 'RobBrazier\Piwik\PiwikServiceProvider' and 'Piwik' => 'RobBrazier\Piwik\Facades\Piwik' to app/config/app.php

'providers' = [


'aliases' = [
    'Piwik' => RobBrazier\Piwik\Facades\Piwik::class,

For Laravel 5.5 and above, no app.php changes are required as the autoloader will pick up the required configuration

Then move the config file out of the package, so that it doesn't get replaced when you update, by running:

php artisan vendor:publish --provider="RobBrazier\Piwik\PiwikServiceProvider" --tag="config"

Update your packages with composer update or install with composer install.

Then go to config/piwik.php and add your config settings such as server, apikey, siteid etc.


Usage Documentation is located at API Documentation is located at


Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.