Will modern browsers default settings suppress Matomo analytics?

I am running Matomo latest:
Matomo-Version: 5.1.2
MySQL-Version: 10.11.4-MariaDB-1:10.11.4+maria~deb11-log
PHP-Version: 8.3.11

In Matomo, I have setup CORS for all my 3 websites correctly and of course the trustfull domain name for my Matomo installation.

Further I have setup the htaccess files in these 3 websites (header rules) in order to let webbrowsers execute the Matomo scripting limited on the domain of my Matomo installation as 3rd party scripting.

I am watching a continuously decreasing of visits the last years ago, although I have modernized and improved my websites and actualized the content.

So I have checked, to find the reason and I found out, that there is a tendency in all actual webbrowsers, to install / update them with more and more improved privacy settings (which I welcome) as default settings. These settings suppress the execution of third party scripting even in those cases, when the htaccess rules of the website would allow it and even if the third party would have set CORS adequately.
Matomo analytic is even prevented also, if Matomo is running on a subdomain of the main domain, which should be analyzed.

This restrictive behavior of webbrowsers seems to be very common on mobile devices and becomes more and more the default in desktop browsers.

Concerning Matomo, this will result in:
no reliable tracking
opt-out link for Matomo tracking will have no function

The same problem (execution of 3rd party scripting) happens on my websites, related to a booking calendar, which is running on one of the three websites, but should be accessible on the other two websites also.

Is there any chance, to overcome those browser restrictions? – There must be a way, how to, because there are so many websites out there, which are loading scripts and content from CDNs! How do they do this?

And how can I get my Matomo analytics back to functioning reliable again?

After several tries to modify htaccess in order to overcome browser measures, keeping Matomo from tracking, I gave up. No reliable solution is achievable by this.

I discovered now the Matomo PHP-tracker and I think, this is the solution for the problems: Modern Browsers often prevent JS from 3rd party running. This JS is based on GET. Matomo PHP-tracker is based on POST and therefore it cannot be blocked easily.

I tried to dive into Matomo PHP-tracker and try to create my sepcial MatomoTracker.php But due to sever lack in knowledge about PHP and how to use the “Tracking HTTP API”, I cannot start any try with it.
There should be explanation videos on YouTube about it…

Hi @Confuserix,

I can’t confirm this in general.

I know of many websites where subdomains or third-party domains are tracked with Matomo without browsers blocking the tracker.

It could of course be that there are HTTP header parameters on your websites that tell the browser that only certain domains are allowed to run scripts.

This is typically implemented with the HTTP header “Content-Security-Policy”:

I’m not a web admin to give you precise advice here. However, I do know that if the header is present, you have to configure it precisely for all types of scripts, objects or frames and domains.

If a browser blocks because of this, you usually get a message on the browser developer console.