PHP code example of texxasrulez / matomo_analytics
1. Go to this page and download the library: Download texxasrulez/matomo_analytics 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/ */
texxasrulez / matomo_analytics example snippets
// Matomo base URL (no trailing slash)
$config['matomo_analytics_url'] = 'https://analytics.example.com';
// Matomo site ID (integer)
$config['matomo_analytics_site_id'] = 1;
// Respect browser Do Not Track header
$config['matomo_analytics_respect_dnt'] = true;
// Disable tracking for authenticated Roundcube users
$config['matomo_analytics_disable_for_authenticated'] = false;
$config['plugins'][] = 'matomo_analytics';
$config['matomo_analytics_debug_enabled'] = true; // write debug entries to Roundcube logs
$config['matomo_analytics_debug_html_comments'] = true; // add HTML comment after injection
$config['matomo_analytics_debug_log_channel'] = 'matomo_analytics'; // optional custom log channel