Cloudflare Location Provider plugin installed but its radio button option on the Geolocation settings page is unselectable and says 'broken' underneath it

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.

Would appreciate any advice.

Thanks!

Hi,

Most likely the author of that plugin can help you more than anyone else, so I’d recommend you to ask him or invite him to answer here on the forum:

Hi Lukas,

Thanks for the suggestion. Will do.

Could you tell me how to contact the author? On the author’s github page, I only see ‘Follow’ button but no ‘contact’ button.

Hi,

It turns out someone already did this:

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.

I’m in the middle of some development work, so I will wait until I’ve finished it before activating the Cloudflare setting in cpanel