Skip to content

bernskioldmedia/laravel-matomo

Repository files navigation

Laravel Matomo

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Access and manage Matomo from Laravel.

Installation

You can install the package via composer:

composer require bernskioldmedia/laravel-matomo

You can publish the config file with:

php artisan vendor:publish --tag="laravel-matomo-config"

This is the contents of the published config file:

return [

    /**
     * This is the Matomo API key that allows you to work
     * with the API.
     */
    'api_key' => env('MATOMO_API_KEY'),

    /**
     * This is the URL of the Matomo installation that you want
     * to use the package with.
     */
    'base_url' => env('MATOMO_BASE_URL'),

];

Usage

A select number of the Matomo APIs are available, with more to be added as we have a need for them.

Each API has its own resource, with the methods available as nicely named methods. All are accessible via the provided Facade. See the examples below.

For the full list of methods, please refer, currently, to the source code,

use \BernskioldMedia\LaravelMatomo\Facades\Matomo;

// get a summary object of metrics for the site with the ID 1.
$summary = Matomo::summary()->site(1)->all();

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

About

Access and manage Matomo from Laravel.

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages