After six years of development, we are proud to announce the 1.0.0 release of our WP-Matomo WordPress plugin!
Started as a simple plugin to show a selection of statistics within the WordPress dashboard, WP-Matomo has become a full Matomo (Piwik) integration plugin. The plugin automatically adds the Matomo tracking code to your WordPress sites. The plugin displays your analytics reports directly within the WordPress admin panel. WordPress networks (“multisite”), CDN URLs and the proxy tracker for Matomo are also supported.
According to WordPress.org the plugin is being used by more than 50,000 WordPress sites!
This article explains how to install WP-Matomo and how to configure it to work with your Matomo instance.
You can get WP-Matomo using WordPress’ plugin management. Login to your WordPress admin dashboard and go to « Plugins » → « Add New ». Enter « WP-Matomo » into the search field at the top right, press enter and next to WP-Matomo choose « Install Now ».
If you want to use WP-Matomo in your simple WordPress blog you can just click « Activate Plugin » and WP-Matomo will ask you to configure your Matomo connection.
Running a WordPress network/multisite you can choose to « Network Activate » the plugin after the installation process. In this case, WP-Matomo will be a fully automated feature of your WordPress network automatically tracking your sites in the same Matomo instance in separate Websites.
Alternatively you can download WP-Matomo manually from the WordPress website and upload all files to your `wp-content/plugins` directory.
Configure your Matomo connection
WP-Matomo lets you choose between three connection modes:
- Self-hosted (HTTP API): This is the default option for a self-hosted Matomo and should work for most configurations. You just have to know your Matomo URL, which is the URL you enter to access Matomo, and your auth token (see below). WP-Matomo will connect to Matomo using http(s)-requests.
- Self-hosted (PHP API): Choose this, if your self-hosted Matomo and WordPress are running on the same machine and you know the full server path to your Matomo instance. Beside the full server path, you also need to know your auth token (see below).
- Cloud-hosted Matomo service: If you are using a cloud-hosted Matomo service, you just need to know your user name and your auth token (see below).
Setting up WP-Piwik
To configure WP-Matomo you will need to specify your Authentication token.
- If the site you want to track in Matomo is already configured in your Matomo, you only need to specify a token_auth for a user with `view` permission.
- If you want WP-Matomo to create the website in Matomo (or if you use WP-Matomo in network mode which requires to be able to configure your sites), you should specify a token_auth which has Super User access (after the setting up phase is completed you can set the authentication token back to the token of a `view` user).
To find your token_auth in Matomo, click on your user name in the right right corner of your Matomo dashboard, then click the « API » in the left menu. The API page displays your auth token in a colored box, just behind the “&token_auth=” string. The screenshot below shows the token_auth anonymous, but your real one will be an alpha numerous random string like a1ec31524a8eabc7a546d71d68b28d17.
That’s it. After you entered your connection data and submitted the form, WP-Matomo will welcome you with some information:
You can now start to configure WP-Matomo and enable the tracking code. Learn about any setting by clicking on the small question mark sign. If you have any problem configuring or using WP-Matomo feel free to use the WordPress support forum related to WP-Piwik.
We invite you to join our translation community at Transifex and help to translate WP-Matomo in more languages!
Happy WordPress Analytics!