Tracking code verification failed

Hello,
I installed Matomo on my server and added the plugin to my WordPress site. I followed the step-by-step guide “Installing with WordPress”. However, at point 18 (Test if the tracking code can send requests to your Matomo instance by entering the exact URL you wish to track, then clicking “Test Installation”. A new tab should open and close within 10 seconds), I get an error saying: “Tracking code verification failed. Please check that you have installed the [WP-Matomo Integration (WP-Piwik)] component and followed all the steps.” [Read more]

Hi @julienallexandre Sorry to hear that you are having issue installing Matomo for WordPress. Just to confirm, is this the guide you followed? https://matomo.org/installing-matomo-for-wordpress/

Are you getting an error after you click the button Activate?

Hello,

Finally, I succeeded. The problem was related to the default Matomo installation, which assigned ID 1 to the Matomo site containing the link to my installation.

At first, I hadn’t noticed this, so the check didn’t work. I had to position myself on ID 2.

It might be useful to review the documentation.

(A silly mistake on my part)

Best regards,
Capture d’écran 2024-09-02 à 10.49.44

Hello @julienallexandre Thanks for keeping us updated and for letting us know on how the issue was fixed.

I ran into the same issue recently. In my case, it turned out the tracking code wasn’t properly added in the header, and caching was also interfering with the test. Try clearing your cache (plugin + browser) and double-check if the Matomo URL and site ID are correct in the plugin settings. Also make sure no ad blocker or firewall is blocking the request during the test.

Hey Julien, I’ve seen this happen before when a security plugin or a server firewall blocks the verification request. Based on the error, the system can’t “see” the tracking code on your site even if it’s actually there.

Quick tip: try disabling any caching or security plugins (like Wordfence) temporarily and run the test again. If that works, you’ll just need to whitelist Matomo’s IP or the specific tracking URL in your security settings.

Are you using any specific security or performance plugins that might be interfering?

I’ve seen this happen a few times when the tracking script is installed correctly, but the verification request gets blocked before Matomo can validate it.

A couple things worth checking:

  • make sure caching/security plugins are temporarily disabled during the test

  • confirm the Matomo tracking code is actually visible in the page source

  • check whether Cloudflare, ModSecurity, or hosting firewall rules are blocking the verification request

  • verify the Matomo URL and Site ID exactly match what’s configured in WordPress

  • test in an incognito window to avoid cached scripts/cookies

If the popup tab opens and closes immediately, the request is usually firing, but something is preventing Matomo from confirming the response properly.

That error usually means the tracking request isn’t successfully reaching your Matomo instance, even though the plugin itself may be installed correctly.

I’d probably check:

  • whether the tracking JS is actually loading in the page source

  • if ad blockers or browser privacy settings are blocking requests

  • site URL mismatches (http vs https / www vs non-www)

  • whether the Matomo endpoint is accessible externally

  • caching/minification plugins interfering with the tracking script

Sometimes the verification tool fails even when the tracking code is technically present, especially if requests are delayed or modified by optimization plugins. With analytics and calculator-style sites, I’ve noticed clean request flow and accurate endpoint configuration matter more than people expect.

For further detailed understanding, visit dotscalculator, where you can see everything practically.

I’ve run into this before, and it’s often not the plugin itself but something blocking or modifying the verification request. I’d check that the Matomo tracking code is visible in the page source, verify the Site ID and URL are correct, and temporarily disable any caching or optimization plugins.

It’s also worth checking whether Cloudflare, ModSecurity, firewalls, or browser ad blockers are interfering with the request.

If the verification popup opens and closes immediately, the request is usually being sent, but Matomo isn’t able to confirm it properly due to one of these issues.