Open amigthea opened 2 years ago
Hi @Azertooth, thanks for contacting us.
I'd suggest first checking the Matomo installation settings that you provided to Cloudflare when setting up the Matomo App, specifically the url and site id. If your Matomo installation is in a subdirectory (eg. mydomain.com/matomo) then that would need to be included in the Cloudflare settings too.
To check that the tracking script is being correctly loaded by your Cloudflare site, you could view the site, open the browser web developer console, switch to the Network tab, reload and look for the connection that loads matomo.js
to confirm that there are no errors.
For Cloudflare you should also have the following setting in config/config.ini.php
to show real IP addresses.
[General]
proxy_client_headers[] = HTTP_CF_CONNECTING_IP
If that all works then it could be useful to check your Matomo web server access logs to confirm that incoming connections are being received and that there are no hosting rules blocking Cloudflare connections.
Hope that helps.
Hi @bx80 and thank you for your time to reply
I already checked all of that before opening this issue, the only things I did't try is the config.ini settings, is that valid even if I do not have the proxy check enabled on cloudflare A record dns?
Hi,
Indeed, the proxy settings should be unrelated.
As you can see in https://github.com/matomo-org/cloudflare-app-manual/blob/master/source/app.js, this app is really simple and just executes the Matomo tracking code with the set settings.
So can you check if this code is executed on your site (e.g. window._paq
is set)?
thank you @Findus23 for joining the discussion
I got my main website working integrating the tracking code directly on the webpages but I'm trying the cloudflare route with another website and that's still not working.
To check that the tracking script is being correctly loaded by your Cloudflare site, you could view the site, open the browser web developer console, switch to the Network tab, reload and look for the connection that loads
matomo.js
to confirm that there are no errors.
I'm stuck here, the matomo.js is not loaded on the client browser.
Where I could look out for troubleshooting the problem?
Generally it works, I tested it with Opera, Firefox, Edge and Brave. Of course in some cases the ad/tracker blocker blocks it, at least in Brave OOTB, hence an exception needs to be added.
You need to look into the browser console, the "sources" tab:
How could I test the connection between cloudflare matomo app and matomo server? I setup all related settings but I can't get clients visits logged on matomo backend. I had the wordpress plugin and all was working but as soon as I switched to cloudflare app I can't get clients logs anymore