docker
docker copied to clipboard
matomo.js script failing to load
Hi,
I was trying to install matomo on a local server to test it, but I can't make the le javascript tracker work. The install was successful and I can access the dashbord.
My current set up is a Nginx instance as reverse proxy on an ubuntu 20 machine. This nginx instance pass the connections to a docker-compose instance like the one in .example/nginx.
Visits are recorded correctly when I go to the mamoto.php page and I can see them in my dashboard. It also work using the noscript tracker (I removed the
On Firefox the following error in console: Loading failed for the
I added the following lines to my config.ini.php under [general]:
proxy_client_headers[] = "HTTP_X_FORWARDED_FOR"
proxy_host_headers[] = HTTP_X_FORWARDED_HOST
My proxy conf for the reverse proxy is the followin:
server {
server_name matomo.my.domain.com;
listen [::]:80 ipv6only=on;
listen 80;
location / {
proxy_pass http://localhost:8081;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
4 years on and I have the exact same issue, same browser: firefox
Though I am on linux, no edge browser.
I can browse to http://my.domain.com/matomo.js and the file loads into the browser, but when I access my site I get Loading failed for the <script> with source “https://analytics.bevansbench.com/matomo.js”.
in the console, and no visits show up in matomo
Checked the network tab and in the transferred column "Blocked By uBlock Origin", I didn't even realise I had that blocker installed, I don't recall installing it. :/
also see: https://forum.matomo.org/t/matomo-is-blocked-by-ublock-origin-plugin/47053