Pagemetrics for Matomo
Pagemetrics for Matomo adds privacy-friendly, server-side analytics to WordPress by leveraging the pagemachine/matomo-tracking PHP library. When enabled, the plugin sends page view and optional download events from your…
Use with caution
Pagemetrics for Matomo works, but test it on a staging site before relying on it in 2026. It runs on 10+ sites and was last updated 3 months ago, and scores 60/100 on our health check.
- Tested with the latest WordPress (7.1)
- Small user base (10+ active installs)
- Very few reviews so far
- Needs PHP 8.1 or newer
How does it stack up?
Side-by-side on installs, updates, ratings & supportDaily downloads
Download spikes usually follow a new release — each site that auto-updates counts as a download.
Rankings
Where Pagemetrics for Matomo stands todayWordPress.org search rankings
Live position in the plugin search, top 100| Keyword | Position |
|---|---|
| analytics | >100 |
| matomo | #33 |
| privacy | >100 |
| server side | >100 |
| tracking | >100 |
Version adoption
Share of active sites per release.
About Pagemetrics for Matomo
From the official readme · v1.1.2Description
Pagemetrics for Matomo adds privacy-friendly, server-side analytics to WordPress by
leveraging the pagemachine/matomo-tracking PHP library. When enabled, the
plugin sends page view and optional download events from your WordPress site
directly to a Matomo instance without loading Matomo’s JavaScript tracker.
Key benefits:
- Track page views on the server with full control over attributes such as title, URL and referrer.
- Optional download tracking rewrites file links and records the click before redirecting visitors.
- Optional AI assistant bot tracking detects crawls from ChatGPT, Claude, Perplexity and others and forwards them to Matomo’s dedicated AI Assistants report.
- Multisite aware – network admins can define defaults, individual sites can override them.
- Respects Do Not Track and Global Privacy Control headers through the underlying library.
- Logs issues to the WordPress debug log when
WP_DEBUGis enabled.
Looking for expert help with Matomo or server-side tracking? Pagemachine offers
consulting, implementation and ongoing support via our Pagemetrics solution.
More info: Pagemetrics.eu
Developer Hooks
Page view tracking:
pm_matomo_tracking_should_track_request— Returnfalseto skip page view tracking for the current request.pm_matomo_tracking_visitor_ip— Override the visitor IP forwarded to Matomo ascip(defaults toREMOTE_ADDR; used for page views and downloads when an auth token is set). Return an empty string to skip IP forwarding.
Download tracking:
pm_matomo_tracking_should_rewrite_downloads— Returnfalseto keep original download URLs for the current post.pm_matomo_tracking_is_download_url— Decide whether a specific URL should be rewritten (receives URL and default extension list).pm_matomo_tracking_download_extensions— Adjust the list of file extensions that count as downloads.pm_matomo_tracking_download_url— Customize the generated redirect URL used for download tracking.pm_matomo_tracking_download_redirect_status— Change the HTTP status code used when redirecting to the original file.
AI assistant bot tracking:
pm_matomo_tracking_ai_bot_user_agents— Extend or replace the list of User-Agent substrings used to detect AI bots.
General:
pm_matomo_tracking_log_message— Listen to debug messages emitted whileWP_DEBUGis enabled.
Example usages
// Skip tracking for administrators.
add_filter('pm_matomo_tracking_should_track_request', static function ($shouldTrack) {
return current_user_can('manage_options') ? false : $shouldTrack;
});
// Keep original download URLs on the privacy policy page.
add_filter('pm_matomo_tracking_should_rewrite_downloads', static function ($shouldRewrite) {
return is_page('privacy-policy') ? false : $shouldRewrite;
});
// Force CDN assets to be treated as downloads.
add_filter('pm_matomo_tracking_is_download_url', static function ($decision, $url) {
return str_contains($url, 'cdn.example.com/assets/') ? true : $decision;
}, 10, 2);
// Add extra file types to download tracking.
add_filter('pm_matomo_tracking_download_extensions', static function ($extensions) {
$extensions = array_merge($extensions, ['svg', 'heic']);
return array_unique($extensions);
});
// Append a checksum to rewritten download URLs.
add_filter('pm_matomo_tracking_download_url', static function ($trackingUrl, $target, $label) {
$checksum = substr(hash('sha256', $target . $label), 0, 12);
return add_query_arg('pm_checksum', $checksum, $trackingUrl);
}, 10, 3);
// Use a 307 redirect instead of the default 302.
add_filter('pm_matomo_tracking_download_redirect_status', static function () {
return 307;
});
// Add a custom bot to AI assistant tracking.
add_filter('pm_matomo_tracking_ai_bot_user_agents', static function (array $substrings): array {
$substrings[] = 'MyCustomBot';
return $substrings;
});
// Behind a reverse proxy: forward the real client IP from X-Forwarded-For.
add_filter('pm_matomo_tracking_visitor_ip', static function ($ip, $request) {
$forwarded = $request->getHeaderLine('X-Forwarded-For');
if ($forwarded === '') {
return $ip;
}
// Use the first (client) address in the list.
return trim(explode(',', $forwarded)[0]);
}, 10, 2);
// Forward debug messages to the PHP error log while developing.
add_action('pm_matomo_tracking_log_message', static function ($level, $message) {
if (!defined('WP_DEBUG') || WP_DEBUG !== true) {
return;
}
// phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log
error_log(sprintf('[Pagemetrics for Matomo][%s] %s', strtoupper((string) $level), $message));
}, 10, 2);
Installation
- Upload the
pagemetrics-for-matomoplugin directory (including the bundledvendor/
folder) to your site’swp-content/pluginspath. - Activate the plugin through the Plugins → Pagemetrics for Matomo screen in WordPress.
- Open Settings → Pagemetrics for Matomo and configure:
- Matomo URL (e.g.
https://matomo.example.com/) - Default Matomo site ID
- Optional auth token (required for IP tracking and other privileged attributes)
- HTTP timeout for Matomo requests
- Download tracking toggle, if you want the plugin to rewrite file links automatically
- AI assistant bot tracking toggle, to send AI crawler hits to Matomo’s AI Assistants report (requires Matomo 5.8.0 or later)
- Matomo URL (e.g.
- (Multisite) Network administrators can define defaults under Network Admin → Settings → Pagemetrics for Matomo. Individual sites can override those values on their local settings page.
The plugin starts sending data as soon as the Matomo URL and site ID are set.
Changelog
1.1.2
- Tested with WordPress 7.1.
- No functional changes.
1.1.1
- Fixed: the real visitor IP is now forwarded to Matomo as the
cipparameter when an auth token is set, so page views and downloads geolocate the visitor instead of the WordPress server. - New
pm_matomo_tracking_visitor_ipfilter to override the forwarded IP (e.g. from a trusted proxy header) or disable IP forwarding.
1.1.0
- Added AI assistant bot tracking: detects crawls from ChatGPT, Claude, Perplexity and other AI agents and forwards them to Matomo’s AI Assistants report (requires Matomo 5.8.0+).
- New
pm_matomo_tracking_ai_bot_user_agentsfilter to extend the list of detected bot User-Agents.
1.0.0
- Initial release with server-side page view tracking, optional download tracking and multisite support.
For developers
Is this your plugin? Show off the numbers.
Add a live badge to your site, docs or GitHub README. It updates on its own — no account needed.
Best Pagemetrics for Matomo alternatives
All analytics plugins →FAQ
Pagemetrics for Matomo: quick answers
Straight answers, pulled from live WordPress.org data.
Source: WordPress.org
Is Pagemetrics for Matomo free?
Yes. Pagemetrics for Matomo is free to download and use from the official WordPress.org plugin directory.
Is Pagemetrics for Matomo safe to use in 2026?
Pagemetrics for Matomo works, but test it on a staging site before relying on it in 2026. It runs on 10+ sites and was last updated 3 months ago, and scores 60/100 on our health check.
How many websites use Pagemetrics for Matomo?
Pagemetrics for Matomo is active on 10+ WordPress websites and has been downloaded 954 times since it launched in November 2025. It was downloaded 110 times in the last 30 days.
Does Pagemetrics for Matomo work with WordPress 7.1?
Yes. The developer has tested Pagemetrics for Matomo up to WordPress 7.1.5, the latest release. It requires WordPress 6.1 or newer.
What PHP version does Pagemetrics for Matomo need?
Pagemetrics for Matomo requires PHP 8.1 or higher. Most hosts run PHP 8.x today, so it works on any modern WordPress hosting.
When was Pagemetrics for Matomo last updated?
The latest version, 1.1.2, was released on August 22, 2026 (3 months ago).
Who makes Pagemetrics for Matomo?
Pagemetrics for Matomo is developed and maintained by Pagemachine.
What are the best alternatives to Pagemetrics for Matomo?
The most popular alternatives to Pagemetrics for Matomo are Site Kit by Google (5M+ installs), MonsterInsights (2M+ installs) and WP Statistics (500K+ installs).
Powered by PageForge
One template and a spreadsheet. A real page for every search.
PageForge turns each row of a CSV into a WordPress page with its own title, URL, SEO fields and schema, built on the layout you already designed. Free on WordPress.org.
- CSV and XLSX, plus Google Sheets on Professional and Enterprise
- Its own title, URL, SEO fields and schema for every page
- Works with the block editor, Elementor, Divi and Avada
- Free on WordPress.org, no credit card

