Download the PHP package mzaman/laravel-matomo-tracker without Composer
On this page you can find all versions of the php package mzaman/laravel-matomo-tracker. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mzaman/laravel-matomo-tracker
More information about mzaman/laravel-matomo-tracker
Files in mzaman/laravel-matomo-tracker
Package laravel-matomo-tracker
Short Description A Laravel facade/wrapper for the matomo/matomo-php-tracker for server-side Matomo tracking.
License BSD-3-Clause
Homepage https://github.com/mzaman/laravel-matomo-tracker
Informations about the package laravel-matomo-tracker
LaravelMatomoTracker
About
The mzaman\laravel-matomo-tracker Laravel package is a wrapper for the piwik\piwik-php-tracker. The Piwik PHP tracker allows server-side tracking with Matomo.
Compatibility
This package is compatible with Laravel 9.x, 10.x and later. Ensure that your Laravel version meets the required version before proceeding with the installation.
Installation
Via Composer
Require the mzaman/laravel-matomo-tracker package in your composer.json and update your dependencies:
Publish the Config File (Optional)
Run php artisan vendor:publish to publish the config file if needed.
Update Your .env
Add the following variables to your .env file and configure them to fit your environment:
Usage
You can use the facade to track.
For tracking other events, such as downloads or outlinks, you can use:
Queue Setup
To enable queued tracking, you need to configure your queue settings in config/queue.php for the specified MATOMO_QUEUE_CONNECTION.
For example, to use the database queue driver, your .env file should look like this:
Make sure to run the necessary migrations to set up your database queue:
Queue Functions
For queuing, you can use these functions:
Troubleshooting
If you're experiencing issues with the package, ensure that:
- You have correctly set up the
.envvariables forMATOMO_URL,MATOMO_SITE_ID, andMATOMO_AUTH_TOKEN. - Your queue system is configured correctly. Check the Laravel queue documentation for more details: Laravel Queue Docs.
- You are using the correct version of
matomo/matomo-php-trackerthat is compatible with your Matomo installation. - Check the
storage/logs/laravel.logfile for any related errors or issues.
Tracking
Basic Functionality
You can also use the following methods to simplify tracking actions:
Advanced Tracking
Here are additional methods for tracking specific events and actions:
For more advanced Matomo tracking capabilities, refer to the Matomo PHP Tracker API Documentation.
Change Log
Please see the changelog for more information on what has changed recently.
Contributing
Please see contributing.md for details and a to-do list.
Security
If you discover any security-related issues, please email [email protected] instead of using the issue tracker.
Credits
- All Contributors
License
BSD-3-Clause. Please see the license file for more information.