Unrelated to this PR, but noticed in https://github.com/matomo-org/matomo/blob/3.x-dev/plugins/GeoIp2/GeoIp2.php#L26, we're checking if the current location provider is an instance of the
GeoIp2 plugin. I think the full namepsace needs to be there. Missed this in last PR review.
Tested locally, works, just need to fix the tests.
Hey, this be available in the next release, right?
@mackuba this should be in 3.5.1, so should be in the latest release.
@diosmosis ah, right, I've looked in the code on the server and the changes are there.
Is it necessary to enable the Provider plugin to see ISPs on the location reports page? I've dug into the code a little bit, and it looks like without the Provider plugin the
location_provider column isn't even present in the database, but I've read somewhere that the Provider plugin is disabled by default, because it runs reverse DNS which is rather slow - but that shouldn't be needed at all if I get the provider info from the MaxMind database?... Does it make sense what I'm saying?
Looks like the plugin has to be installed for the column to be in the table and for the provider to be looked up: https://github.com/matomo-org/matomo/blob/3.x-dev/plugins/UserCountry/Columns/Provider.php#L31. I think it also needs to be enabled in order to display the report. The reverse DNS logic shouldn't execute if the provider information is obtained via GeoIP2 (I believe).
I think otherwise you have to be using a Maxmind GeoIP implementation and the ASN database has to be named 'GeoLite2-ASN.mmdb' or 'GeoIP2-ISP.mmdb'.