sandywp / plugins / wp-piwik
Connect Matomo
Analytics Dashboard for WordPress
Adds Matomo (former Piwik) statistics to your WordPress dashboard and is also able to add the Matomo Tracking Code to your blog.
Ready in seconds.
v1.1.10 60,000+ installs WP 5.0+

What you get inside
4 screens-
WP-Matomo settings.
-
WP-Matomo statistics page.
-
Closer look to a pie chart.
-
WordPress toolbar graph.
About this plugin
Version 1.1.7 includes a security related fix, it is highly recommended to update to this or a later version.
If you are not yet using Matomo On-Premise, Matomo Cloud or hosting your own instance of Matomo, please use the Matomo for WordPress plugin.
This plugin uses the Matomo API to show your Matomo statistics in your WordPress dashboard. It’s also able to add the Matomo tracking code to your blog and to do some modifications to the tracking code. Additionally, WP-Matomo supports WordPress networks and manages multiple sites and their tracking codes.
To use this plugin the Matomo web analytics application is required. If you do not already have a Matomo setup (e.g., provided by your web hosting service), you have two simple options: use either a self-hosted Matomo or a cloud-hosted Matomo by InnoCraft.
Requirements: PHP 7.0 (or higher), WordPress 5.0 (or higher), Matomo 4.0 (or higher)
Languages: English, Albanian, Chinese, Dutch, French, German, Greek, Hungarian, Italian, Polish, Portuguese (Brazil). Partially supported: Azerbaijani, Belarusian, Hindi, Lithuanian, Luxembourgish, Norwegian, Persian, Romanian, Russian, Spanish, Swedish, Turkish, Ukrainian
What is Matomo?
First steps
- Learn how to install your own Matomo instance: Requirements, Installation.
- If you need support about Matomo, please have a look at the Matomo forums.
- Finally, you can start setting up WP-Matomo.
Shortcodes
You can use following shortcodes if activated:
[wp-piwik module="overview" title="" period="day" date="yesterday"]
Shows overview table like WP-Matomo’s overview dashboard. See Matomo API documentation on VisitsSummary.get to get more information on period and day. Multiple data arrays will be cumulated. If you fill the title attribute, its content will be shown in the table’s title.
[wp-piwik module="opt-out" language="en" width="100%" height="200px"]
Shows the Matomo opt-out Iframe. You can change the Iframe’s language by the language attribute (e.g. de for German language) and its width and height using the corresponding attributes.
[wp-piwik module="post" range="last30" key="sum_daily_nb_uniq_visitors"]
Shows the chosen keys value related to the current post. You can define a range (format: lastN, previousN or YYYY-MM-DD,YYYY-MM-DD) and the desired value’s key (e.g., sum_daily_nb_uniq_visitors, nb_visits or nb_hits – for details see Matomo’s API method Actions.getPageUrl using a range).
[wp-piwik]
is equal to [wp-piwik module=”overview” title=”” period=”day” date=”yesterday”].
Credits and Acknowledgements
- Graphs powered by Chart.js (MIT License).
- All translators at Transifex and WordPress.
- Anyone who donates to the WP-Matomo project, including the Matomo team!
- All users who send me mails containing criticism, commendation, feature requests and bug reports – you help me to make WP-Matomo much better!
Thank you all!
Questions
- Where can I find the Matomo URL and the Matomo auth token?
To use this plugin you will need your own Matomo instance. If you do not already have a Matomo setup, you have two simple options: use either a self-hosted Matomo or cloud-hosted Matomo by InnoCraft.
As soon as Matomo works, you’ll be able to configure WP-Matomo: The Matomo URL is the same URL you use to access your Matomo, e.g. for the demo site: http://demo.matomo.org. The auth token is some kind of a secret password, which allows WP-Matomo to get the necessary data from Matomo. To get your auth token, log in to Matomo, click at the preferences gear icon (top right) and click at “API” (left sidebar menu, near the bottom).
You can get a more detailed description here: https://matomo.org/blog/2015/05/wordpress-integration-wp-piwik-1-0/
- I get this message: “WP-Matomo (WP-Piwik) was not able to connect to Matomo (Piwik) using our configuration”. How to proceed?
First, please make sure your configuration is valid, e.g., if you are using the right Matomo URL (see description above). Then, go to the “Support” tab and run the test script. This test script will try to get some information from Matomo and shows the full response. Usually, the response output gives a clear hint what’s wrong:
The response output contains…
– bool(false) and HTTP/1.1 403 Forbidden: WP-Matomo is not allowed to connect to Matomo. Please check your Matomo server’s configuration. Maybe you are using a password protection via .htaccess or you are blocking requests from localhost/127.0.0.1. If you aren’t sure about this, please contact your web hoster for support.
– bool(false) and HTTP/1.1 404 Not Found: The Matomo URL is wrong. Try to copy & paste the URL you use to access Matomo itself via browser.
– bool(false) and no further HTTP response code: The Matomo server does not respond. Very often, this is caused by firewall or mod_security settings. Check your server logfiles to get further information. If you aren’t sure about this, please contact your web hoster for support.If this does not help as well, feel free to open a topic in the support forum. Please share all available information including the test script result, if possible.
- PHP Compatibility Checker reports PHP7 compatbility issues with WP-Matomo.
The Compatibility Checker shows two false positives. WP-Matomo is 100% PHP7 compatible, you can ignore the report.
- Overview shortcode shows no unique visitors using a yearly range.
See Matomo FAQ.
- WP-Matomo only shows the first 100 sites of my multisite network. How can I get all other sites?
The Matomo API is limited to 100 sites by default. Add the following line to the section [General] of Matomo’s config/config.ini.php file:
API_datatable_default_limit = 1000- Tracking does not work on HostGator!
Try to enable the “avoid mod_security” option (WP-Matomo settings, Tracking tab) or create a mod_security whitelist.
- Can I contribute to WP-Matomo as a translator?
You like to contribute to WP-Matomo translations? Please use the Transifex translation community.
Of course, I will add missing languages if requested, and I will also upload the existing language files of older WP-Matomo releases.
If you can’t (or don not want to) use transifex, you can also translate languages/wp-piwik.pot delivered with WP-Matomo.
Thank you very much! 🙂
sandywp / also on the shelf
Try another plugin
Site Kit by Google – Analytics, Search Console, AdSense, Speed
4.2 · 5M+ installs
Site Kit is a one-stop solution for WordPress users to use everything Google has to offer to make them successful on the web.
-
The best free Google Analytics plugin for WordPress. See how visitors find and use your website so you can grow your business…
WP Statistics – Simple, privacy-friendly Google Analytics alternative
4.1 · 600K+ installs
Get website traffic insights with GDPR/CCPA compliant, privacy-friendly analytics. Includes visitor data, stunning graphs, and no…
Spin up a real WordPress site in seconds.
Test plugins, build a demo, hand a client a link — then squash it and start again. No local setup, no Docker.