PHP code example of mzaman / laravel-matomo-tracker
1. Go to this page and download the library: Download mzaman/laravel-matomo-tracker library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
// Instead of using
LaravelMatomoTracker::doTrackAction($actionUrl, 'download'); // or
LaravelMatomoTracker::doTrackAction($actionUrl, 'link');
// You can use these simplified methods:
LaravelMatomoTracker::doTrackDownload($actionUrl);
LaravelMatomoTracker::doTrackOutlink($actionUrl);
LaravelMatomoTracker::setCustomDimension(int $id, string $value);
LaravelMatomoTracker::setCustomDimensions([]); // bulk insert of custom dimensions
LaravelMatomoTracker::setCustomVariables([]); // bulk insert of custom variables
bash
php artisan vendor:publish
bash
php artisan queue:table
php artisan migrate
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.