RobBrazier / Laravel_Piwik by robbrazier

Piwik Package for Laravel
122,762
108
9
Package Data
Maintainer Username: robbrazier
Package Create Date: 2013-01-16
Package Last Update: 2024-04-29
Home Page: https://docs.robbrazier.com/Laravel_Piwik/
Language: PHP
License: MIT
Last Refreshed: 2024-04-30 15:06:01
Package Statistics
Total Downloads: 122,762
Monthly Downloads: 1,930
Daily Downloads: 130
Total Stars: 108
Total Watchers: 9
Total Forks: 20
Total Open Issues: 5

Laravel-Piwik v3.2.0

Build Status Code Climate Code Climate Minimum PHP Version Packagist Version Packagist Total Downloads Waffle.io

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

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

Installation

Add RobBrazier/Piwik to composer.json:

{
    "require": {
        "robbrazier/piwik": "~3.2"
    }
}

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

'providers' = array(
    ...
    RobBrazier\Piwik\PiwikServiceProvider::class,
    ...
);

[...]

'aliases' = array(
    ...
    'Piwik' => RobBrazier\Piwik\Facades\Piwik::class,
    ...
);

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.

Development

Scripts such as running unit tests for various PHP versions and integration tests for multiple Laravel versions are configured via the Taskfile.yml.

They can be run locally by installing go-task/task and then running the commands as below:

# unit tests
PHP_VERSION=7.1 task unitTest

# integration tests
LARAVEL_VERSION=5.5 task integrationTest

Documentation

Usage Documentation is located at http://laravel-piwik.robbrazier.com/Usage.html API Documentation is located at http://laravel-piwik.robbrazier.com/API_Docs.html

Contributing

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.

License

MIT