Matomo for WordPress is not showing any statistics / reports, how do I fix it?
You are using Matomo for WordPress and have enabled tracking, but no data is shown in the Summary report page or when you go to « Matomo Reporting ».
1. What is archiving?
When visitors are being tracked, Matomo stores information about each individual action your visitors take. This is called raw data. From time to time (typically every hour or so), Matomo generates aggregated reports from this raw data. For example, it will generate a report saying
5 visitors from the United States, or 3 visitors where using Firefox as a browser. This aggregated report generation is called archiving and runs in the background through WordPress Cron (WP-Cron).
2. Find out if it is actually a tracking issue, or an archiving issue
- Go to your WordPress Admin Dashboard
- Go to Matomo Analytics => Reporting
- Click on left reporting menu on Visitors => « Visits Log » or « Real Time »
If any of the two reports are showing data, then likely it is an archiving issue. If these two reports are not showing any data, then it might be actually a tracking issue.
We recommend you also double check the selected date. If you just installed Matomo for example, make sure you are looking at today’s data. If you have been using Matomo for a while, you might want to look at yesterday’s data or last week’s data.
If you have low traffic, you want to make sure you actually had visits on your website in that time. We recommend you access your website in incognito mode so you are logged out of WordPress. Just in case you have excluded your own IP, you might also want to access your website from your phone or so.
3. Find out when archiving ran successfully the last time
Another indicator that you are having issues with archiving might be if the last archiving cronjob was not successful in a while. To find out when it ran last successfully, go to « Matomo Analytics => Diagnostics » (older versions have a menu item « Matomo Analytics => System Report »). There you will find a section called « Crons » and it will show you when the archiving finished last.
If the date next to « Last ended » in the « Archive » row was a while back, then likely some error occurs during the archive process.
4. Are there any errors in the system report?
The next step is to check in the system report page if there are any errors or warnings that need fixing. For example, it might say there is a MySQL permission missing. Not all warnings or errors might be related to archiving and in doubt simply ping us see how to create an issue at the bottom. We’re happy to help.
5. Does archiving work when you execute it manually?
To check if archiving works when you trigger it manually, scroll to the top of the System Report page and click on Troubleshooting.
Now click on the “Archive reports” button.
It may take a few seconds or minutes for this to finish depending on your server size and the number of visits / page views your website gets. Once it is finished, check if there are any errors or warnings shown at the beginning of the page. You might see some warnings or errors looking like this (if there are any, let us know by creating an issue see below):
You will also want to check if the « Matomo Analytics => Summary » or any of the other Matomo reports are now showing data.
6. Enabling file logging
If data is still not showing up, or if the archiving worked when triggering manually but not during a cron, then we recommend enabling file logging. Make sure to have these two options enabled in your wp-config.php
:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
Now we recommend waiting for a few hours for the cron to run again (the cron usually runs hourly). Depending on your configuration, any errors or warnings will be logged to your WordPress wp-content/debug.log
file or similar. You can identify Matomo related logs when they contain the word Matomo
.
If you don’t find any warnings or errors in the debug log, we recommend having a look at the PHP error log or your webserver error log if possible.
6. Create an issue
Now it is time to let us know about the problem you are experiencing by creating an issue on our GitHub issue tracker. In the issue description, you can describe your issue in as many details as possible and then paste the System Report, as well as any error or warning messages you could find.
7. Possible workarounds
It is important to always create an issue if you are having trouble with the archiving so we can fix it and also avoid the issue for other users. If for some reason the issue is not fixable, or we can’t get enough information to fix it, there may be workarounds:
Try disabling the asynchronous archiving
This may be a work around if the system report says Supports Async Archiving
=> Yes
in the Matomo
category. Then it may be possible that disabling this feature helps. You can do this by editing you wp-config.php
and adding the following line:
define( 'MATOMO_SUPPORT_ASYNC_ARCHIVING', false );