Matomo script not finding matomo.js at InfinityFree

Error Message from Browser Console
bookCornerCart.html:22 GET file://michaelsbookcorner.com/Analytics/matomo.js net::ERR_INVALID_URL

I have had nothing but problems installing Matomo. I’m wondering if I should try to do it over from the beginning.
I’ve been doing some work with one of the pages on my website where I’ve installed the matomo script in the head tag. In the console, I have an error telling me that the URL leading to matomo.js is invalid. During installation, as instructed, I uploaded all of the files received from Matomo to a folder called myDomain/Analytics at the hosting site. Now I am getting an error right off the bat telling me the URL myDomain/Analytics/matomo.js is not valid. I went into the file manager for InfinityFree where my website lives to the Analytics folder and there it is. So, I’m wondering how it is that the URL is invalid or the file cannot be found.

I suspect this is one of many issues causing the installation to have been a failure so I am going through it step by step. Any ideas out there? Perhaps this is a problem at InfinityFree rather than with Matomo as their script looks to be providing the correct URL.

@MJScharen, this faq might help? Troubleshooting FAQ - Analytics Platform - Matomo

Were you testing that code on your own computer by any chance?

The Matamo snippet on your page has the URL //michaelsbookcorner.com/Analytics/. The // at the start means it will use HTTPS if the page you’re including it on is HTTPS, and HTTP if it is using HTTP. But if you are viewing the file from local storage, the file is loaded over FILE, meaning it will use FILE to load the URL, which is not going to work.

This is not a really Matamo issue and definitely not a hosting issue. The script just wasn’t designed to work on local HTML.


That said, that URL return a 404 Not Found error, and checking your account the whole Analytics folder seems to be gone.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.