Open Findus23 opened 4 years ago
@Findus23 did you try upgrading to Matomo 4? Will this plugin will be disabled when upgraded (until a v4 version is released)?
@allanedk we have upgraded to Matomo 4 and are now using Matomo 4.0.5 unfortunately the plugin has been disabled Under Plugins it says "CloudflareLocationProvider needs Piwik <4.0.0-b1".
The same functionality can also be achieved without this plugin. In Matomo's Administration:
MM_COUNTRY_CODE
to HTTP_CF_IPCOUNTRY
DBIP / GeoIP 2 (HTTP Server Module)
You can also keep the default MM_COUNTRY_CODE and set it via NGINX. This lets you use fallbacks such as a local database if CloudFlare's header is not available:
fastcgi_param MM_COUNTRY_CODE $http_cf_ipcountry;
If you can't freely control your server, you can still follow @msheakoski instructions but set MM_COUNTRY_CODE
to HTTP_CF_IPCOUNTRY
as described by the cloudflare manual for configuring IP Geolocation for PHP applications.
After I did that I could activate the DBIP / GeoIP Server Module which was greyed out before.
you can still follow @msheakoski instructions but set
MM_COUNTRY_CODE
toHTTP_CF_IPCOUNTRY
@ctholho Thank you for pointing out this typo! I have updated my comment to use the correct variable name.
Hi, hope you are doing well!
Matomo 4 is progressing steadily and it would be great if this plugin was also available for it.
Migrating the plugin should be pretty simple as there were not many breaking changes.
You can find the migration guide here: https://developer.matomo.org/guides/migrate-matomo-3-to-4
It boils down to:
>=4.0.0-b1,<5.0.0-b1
)4.x-dev
) and make this branch the default in the github settingsIf you later fix a bug and also want to backport it to the 3.x plugin, you can cherry-pick the commit to the old branch, release a new version (lower than the one for 4.x) and publish it and 3.x users should get this update.
If you have questions about anything, just ask me!