I installed the Cloudflare Location Provider plugin, but in the Geolocation page of Matomo dashboard, the radio button option for Cloudflare has “Broken” underneath it in red text, and I can’t select the option.
I tried uninstalling the plugin and reinstalling it. But no luck.
The most likely cause of the plugin appearing “broken”, is that you do not have the HTTP_CF_IPCOUNTRY header available. You need to explicitly enable this option in the Cloudflare “Network” dashboard. If you have done this and it’s still broken, check that your web server is actually passing through the variable to PHP (Apache does this automatically, but other web servers may vary).
It seems the plugin really just takes the Location it gets from Cloudflare (via the header) and forwards it to Matomo. If it doesn’t get the header from cloudflare it shows up as broken.
Thanks for that. I didn’t realise that the plugin would check to see if Cloudflare was activated or not.
I was waiting to successfully install & activate the Matomo Cloudflare plugin before I activated Cloudflare in my cpanel in order to avoid having to deactivate Cloudflare in case the plugin had any issues.
Deactivating Cloudflare can take a while to propogate, and in the interim, cause the website to error with SSL issues.