Matomo tracker redirects fail

I identified what was causing this issue for me.

matomo.js and matomo.php resources both redirect to yunohost SSO, thus pulling up a login page, which is HTML, and that’s why the content type doesn’t match.

If I pull up the resources URLS on a private browser (i.e. no cookies), I see the yunohost login page.

This must be the same setup for everyone using matomo on yunohost, so it shouldn’t require manually updating nginx conf.

I’ve tried

  • Searching for a solution in “Users Groups and Permissions” admin section.
  • Using the (legacy hack) approach of adding a “skipped_uri” as described here.

Update:
I resolved this problem by moving the matomo install from a subdirectory (xxxx.com/matomo) to it’s own domain (analytics.xxxxx.com). I also updated DNS, ssl certs, and tracking code accordingly.

This redirect problem has now been resolved, and I will therefore close this thread. I no longer see any errors on the client side through the firefox dev console.

1 Like