Page views are not being logged by Matomo - how do I debug the tracking code?

I have a static website written in Jekyll that I am maintaining at three locations:

  • My development environment. For live updating, I have a jekyll live server that serves the pages on the loopback interface
  • My test environment. This is an LXD container also running on my local machine on an internal bridged interface.
  • My production environment. This essentially a clone of the test LXD container, running outside on a VPS. My Matomo instance is running in this container.

The strange thing is that hits to the pages in the dev server on and to the test server on the local container are all properly recorded by Matomo running in a container on the external VPS. But hits to the pages running in the container on the external VPS are not recorded.

I do not understand why this would be the case, since in all three cases the communication with Matomo is initiated by my device which is external to the VPS.

How do I troubleshoot this?




Check your browsers developer tools to see if the requests to matomo.js and matomo.php are going through successfully.

If so, you can temporarily enable which makes Matomo respond with a verbose log to the matomo.php request.

1 Like

Wow, THANKS for the fast response!

You are right, I get the error message in the Firefox Developer Tools debugger:
"Error loading from source “https://[url redacted]/matomo.js”.

Okay – that was exactly the nudge I needed. It turned out I had not turned off my ad blocker for the production URL. Whoops!

All the hits are tracked now. And I also have a good troubleshooting procedure for the future. Thanks Lukas!

1 Like