Skip to content Skip to navigation
Back to the main support

Connect your WordPress site with Matomo Analytics

Since version 6.0 of SEOPress PRO, you can now connect your site with Matomo Analytics and get your stats right into your WordPress dashboard.

To do this, you will have to generate an authentication token from Matomo for security. By default, your stats are not public. A token is like a password to access your data.

Do not share it publicly.

To create an authentication token, sign in to your Matomo administration (Cloud or self-hosted).

Then go to Administration, Personal, Security page.

From Auth tokens section, click Create New Token button.

Enter your password.

Add a description for your token to help you know where you’re using it.

Click Create New Token button.

Make sure to manually copy the token. Paste it to “Matomo Authentication Token” field from your WordPress admin, SEO, Analytics settings page, Matomo tab.

Save changes.

After doing this, you can click on “I CONFIRM I COPIED THE TOKEN AND UNDERSTAND I SHOULD NOT SHARE THIS TOKEN WITH ANYONE ELSE. GO BACK TO SECURITY PAGE.”.

If you lost your token, you will have to recreate one.

Go to your WordPress dashboard page, you can now visualize your Matomo statistics from the dedicated widget. The same statistics appear in SEO, Dashboard, Site overview section, Matomo Analytics tab. Since SEOPress 10.4, both charts show dates along their horizontal axis.

Analytics > Matomo tab - SEOPress Free
Analytics > Matomo tab – SEOPress Free

Troubleshooting: the statistics do not sync

SEOPress PRO fetches your Matomo statistics every hour, and when you click Sync now. Since SEOPress 10.4, when a sync fails, the Matomo Analytics tab of the Site overview and the Matomo widget of the WordPress dashboard tell you why, instead of showing an empty chart. The error message comes with what to check, the Response from Matomo (the exact error returned by your instance) and the date of the Last attempt.

Message What it means and what to do
Matomo refused the API token. The token was deleted, has expired or is invalid, or the Matomo user it belongs to does not have at least “view” access to the Site ID entered in SEOPress. Check the token in Matomo under Administration, Personal, Security, and the user’s access to that website. If needed, create a new token and paste it again.
Your Matomo instance could not be reached. SEOPress could not connect to your instance. Check the Matomo URL entered in the Tracking ID field (SEOPress connects to it over HTTPS), that the instance is up, and that its TLS certificate is valid.
Matomo answered something we could not read. The answer was not Matomo API data. The URL may point to a web page rather than to your Matomo instance, or a security layer (firewall, bot protection) may be intercepting the request. The response shows the HTTP status code that was returned.
The last sync with Matomo failed. Any other error. Read the response from Matomo for details.

Once the problem is fixed, click Sync now in the Matomo Analytics tab. A failed result stays in cache for five minutes only (two hours for statistics), and the hourly sync always asks Matomo again, so a corrected token or URL is picked up quickly.

If the Matomo Analytics tab asks you to Connect Matomo Analytics, or the WordPress dashboard widget says You need to login to Matomo Analytics., the API token is missing. Since SEOPress 10.4, the Site overview needs the Matomo URL, the Site ID and the token to show your statistics. Tracking visitors on your site does not need the token.