PHP code example of piwik / piwik-php-tracker
1. Go to this page and download the library: Download piwik/piwik-php-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/ */
piwik / piwik-php-tracker example snippets
// Required variables
$matomoSiteId = 6; // Site ID
$matomoUrl = "https://example.tld"; // Your matomo URL
$matomoToken = ""; // Your authentication token
// Optional variable
$matomoPageTitle = ""; // The title of the page
// Load object
composer