New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make geoip backend work with geoip2 #4487
Comments
This article explains some changes: |
Thanks for the suggestion! Note: I read this on their site: Downloadable databases for GeoIP2 are not yet available. However, when they are, they will use our new MaxMind DB format. Once the databases are released, we will provide additional details on their use on this dev site. SO we have to wait that they make the DB available. |
yes I read this too but if you uses the links in the ticket above, you can already download the files... |
+1.. there is a huge difference between geolite and geolite2 in terms of brute data..i downloaded both in csv and the newer one is 3x larger so 3x times more data! csv format is the accurate measure for comparison here, not compressed binaries which might work on different algorithms hope to see this ticket solved.. in my case visitors` cities are correctly reported in less than 50 % of the cases (i use google analytics real-time map to compare, which is always accurate).. but i am sure that this is different from country to country, others might have 90% accurate results on the same old database |
Trying to use the now legacy geoip database I get "Constant GEOIP_NETSPEED_EDITION_REV1 already defined", after inserting an if statement for checking if it was already defined GeoIP (PECL) is not able to tell me the database type. The message I get is: "This GeoIP implementation has access to the following types of databases: ." Any chance this is going to get some attention soon so we can easily use geoip2 with piwik and not even worry about the above issue? |
I am also getting the "Constant GEOIP_NETSPEED_EDITION_REV1 already defined" error. Is there a fix for this? |
Downloadable databases for GeoIP2 are available now: So can we have Piwik support new GeoIP2? |
I too get the "Constant GEOIP_NETSPEED_EDITION_REV1 already defined" Error. :( |
The GeoIp2 database output is different from GeoIp1 concerning names, codes and structure. As you can see, it also contains (some) translations of geographic names and the Below are some questions to ask ourselves, but first some examples: The city name output is:
The Region Names aren't supported the way they are in GeoIp1. There now is an
For different countries, the devisions are different and not necessarily mapping to the GeoIp1 setup. What is the best way to handle these changes? Converting the new GeoIp2 output to exisiting GeoIp1 data will be error prone, so maybe it's best to store visit-data in a new format (using the Should current visit-data be transformed into the GeoIp2 structure? In #6690 (comment) @olavmrk suggested making a split between new installs and existing setups. Is that feasible? Implement server support for apache and/or nginx ? I'm looking forward to your comments... |
it's nice to talk about this important new feature :-) Implementation: I think Geoip2 support in Piwik should be implemented as a location provider just like GeoIP is currently implemented. (code). The implementation detail of the geoip2 location provider will be hidden in the location provider class, via the implementation of these few methods here: https://github.com/piwik/piwik/blob/master/plugins/UserCountry/LocationProvider.php#L67-135 Admin UI: currently users can choose in the Geo location UI to use Data migration: I think we don't have to worry about data migration for this task, as IMO there won't be major issue there (but maybe i'm missing something). I hope it helps, let me know if you have any other question! |
Hello, Thanks. |
From my usage I haven't noticed issues anymore. |
@g-p-g are you sure you are using the enhanced database of geoip version 2 ? |
@hpvd I posted here about 1 year ago regarding this issue (you can see my comment way above). It's working for me using the latest Piwik release (not just the latest, but a few before the latest too). It's also possible that Piwik upgrades stopped reverting changes in place to get this working, which until a few version ago had to be redone after each update. |
@g-p-g How did you make it work. |
No ETA yet, we have not scheduled this improvement at this stage. It would be awesome if a developer from the community would issue a Pull request for this, but I understand it is a non trivial change. |
Hi all, I have done some work on GeoIP2 support, but currently don't have time to continue on it. I can PR it, but it's not finished. See: Don't forget to run Good to know What it does do
Needs work on
|
+1 for this - would love to pay for a more accurate database to use with Piwik :) |
wow. Many thanks for these that fast and positive pieces of information! regarding testing autofetch: the 2 free databases available also got updates from time to time (and needs to be refreshed) : |
The performance characteristics of the new version may need to be tested against the legacy database. In the Java version of the GeoIP2 plugin there is a performance issue related to text deserialization. Obviously Piwik is not Java, but it'd be unfortunate to see a significant regression in lookup times, especially if Piwik doesn't use most of the new data. |
In our case we need accurate Maxmind and Intranet IPAM information. |
Tested with Piwik 3.0.0 |
I am using it with latest Piwik 3.0 and seems working fine |
Has anyone had any luck getting the ISP and sort data to show in Piwik? We have not yet been able to install the ISP/Org database, we have access to the new version (2) and the legacy version. We've put both types of files into the misc directory but we are still seeing "Org: Unknown ISP: Unknown". We have been able to install the lite city database. |
We need to bundle support for Geoip2 in Matomo very soon, ideally before April 2018, as it will stop getting updates then. On the official page for GeoLite Legacy it says:
(this was noted in a separate issue #12411 ) Proposed steps
|
maybe this helps some how: |
Would love to the see the geoip2 support. I have it in my server logs, but not in my matomo yet |
Also love to see Matomo gets an compatibility update since the very soon upcoming deprecation 👍 |
Matomo 3.5.0-RC includes Geoip2 as a separate plugin 🎉 🚀 Testing welcome. please enable the GeoIp2 plugin, then go to Administration > Geolocation > and select the new Geoip2 driver. Feedback welcome! |
I have upgraded and had the old GeoIP2-Plugin (available at the marketplace) enabled. Note that upgrading breaks the system if the old plugin is still installed. Uninstall before the upgrade. If you forgot (or didn't know), a blank page (internal PHP error) will replace the usual UI. |
Just performed the upgrade and stumbled upon the same issue. Would be great, for the next users who are going to upgrade, if there was a red warning about this before the upgrade, because without the above GitHub comment by @Lozik it would have taken me some time to discover it and there would have been a long service interruption. |
do we use the best available free geo ip database from maxmind as default?
we use by default this link to get the data base:
http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
it has a file size of 10,6MB
on
http://dev.maxmind.com/geoip/geoip2/geolite2/
you could find today the Link to a free database with a size of 14,4MB
http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.mmdb.gz
=> is this an updated better Version with more/better/more accurate information in it? Or only a different format?
The text was updated successfully, but these errors were encountered: