GeoIPOrg.dat in Piwik 1.9.1

I love the new integrated Geolocation, but how can I use it with the GeoIPOrg.dat database?

The FAQ describes how to install GeoIPCity.dat or GeoLiteCity.dat, and there is mention of support for other databases, but no instructions for how to actually install other databases.

I’ve tried placing GeoIPOrg.dat in misc/ by itself, placing it misc/ alongside GeoIPCity.dat, renaming it GeoIPCity.dat, and none has worked.

That last one (naming the Org database GeoIPCity.dat), triggers a crash when Piwik tries to log an error:

Class 'Piwik' not found in /Library/WebServer/Documents/piwik/plugins/UserCountry/LocationProvider/GeoIp/Php.php on line 97

Please update again the files:

This bug will be fixed!

I’ll ask another dev to answer question about GeoIPOrg.dat

How you use the org database depends on what type of GeoIP implementation you use. If you’re using either the GeoIP (Php) or GeoIP (PECL) implementation, putting the database (named as GeoIPOrg.dat) into the misc directory should work.

If you’re using the Apache server module, you need to put another GeoIPDBFile /path/to/GeoIPOrg.dat in your apache config.

If you’re using the nginx extension, you have to add a geoip_org /path/to/GeoIPOrg.dat rule to your server config.

Let me know if this helps, or if it still doesn’t work.

I tried putting GeoIPOrg.dat in misc, both with and without GeoIPCity.dat along side it. In both cases it seems to be ignored. I’ve had both in place over the weekend and it is only showing GeoIPCity.dat data.

I am assuming that if GeoIPOrg.dat were being used, then hovering over the flags in the Visitor Log would display the organization in place of the provider. Is there any other way to determine if GeoIPOrg.dat is working?

You’re right that the organization will be displayed when hovering over the flags, however, sometimes the organization will be the same as the provider. Also, the Provider plugin, if enabled, will overwrite what is set by the GeoIP plugin.

The main test is on the Geolocation admin page. If the organization/isp info was set, it would be under the address, like:

ISP: …
Organization: …

If it doesn’t show, then it was not returned for your IP or the DB was not found.

Anyway, I’ll be augmenting the GeoIP diagnostic capabilities in the next release so it will be easier to manage.

Also, can you tell me what GeoIP option are you using?


The Provider plugin was active. Once I deactivated it and cleared my Piwik session, the Organization started showing up where the Provider used to be.


This also triggered a small bug in the visitor log. Where it used to show “Provider: (url)” it now says the Organization name and tries to build a link like “http://Organization Name/”. It would be useful if that still linked to domain while displaying the Organization.

Thanks again for your help!

How did you clear the session?

Has the GeoIPOrg.dat gone anywhere? I have been trying to get it to work I have both the GeoIPCity and GeoIPOrg.dat in the misc folder and neither seem to be kicking in I have tried to deactivate the “Provider” plugin and that only makes it so that I get Unknown through out. What I am missing? I have spend hours reading through the help/forums and this thread is the only where it is about the GeoIPOrg.dat and that it has kicked in. But I have tried to go by what is said here and still no luck.

I got it working once I deactivated both the legacy GeoIP plugin and the Provider plugin. I also had to quit and restart my browser and wait for new visits to come in.

Double check that your GeoIPOrg.dat file’s permissions mode is set world readable, and verify that you actually have the .dat version and not the CSV version.

Big thanks for coming back to me. It is the Dat version and I have tried both 777 and 755 access rights to it.

I can see the Provider plugin but not any specific GeoIP plugin (there are four options under Geo Location are you talking about any of those?)

I have the latest version of Piwik, 1.92

Just getting Unknown as soon as I take out the provider plugin and I have deleted the GeoIPCity data file and switched between GeoIP settings back and forth. Very frustrating :-), I am using Arvixe for hosting

There was a separate GeoIP plugin prior to 1.9, which is now obsolete and needs to be deactivated if you have it installed. But you may not have installed it.

I would think that its possible to get “unknown” for some visits, as some IP addresses will have an unknown Org. But I do not know why you might get “unknown” for all visits. Check your PHP version? Check that your own location shows up on the Geolocation page in Piwik? That’s about all I can think of.

Hi its odd as I am also getting mostly unknown for my visits. I have the geoip pcl installed and I have seen several people mention this to be an issue. I am wondering since the dev team I think is mostly in europe(and has tested being located in europe) are there any north american users that successfully have the geo location working for region and city level? What strikes me as odd is there is no error and the geoip is showing to be installed correctly.

For me the main signal that the DB has not connected is that the MaxMind DB test show an actual company/result (if I am using the GEOipORG Database it should show the same in Piwik) GeoIP2 Database Demo | MaxMind and piwik is not. Simply put -> Not in Piwik but in the MaxMind test DB = GeoIPorg.dat not connected.

It is working for me, across all regions. I have GeoLiteCity.dat, but named GeoIPCity.dat in misc as recommended in the documentation. I also have GeoIPOrg.dat in misc, purchased and updated with the past month.

I have never seen “Unknown” when hovering over the flag icon in the Visitor Log. My initial problem was that it displayed only the city-level location and the reverse DNS domain (provider). That has since been fixed and it now shows the city-level location and the organization (still labeled “Provider”). In some cases the location is vague, like an entire country or even an entire continent, but I have never seen it say “Unknown”. So I suspect this is a different problem.

FWIW, the string “Unknown” seems to be returned in “UserCountry/LocationProvider/GeoIp.php” by the function getRegionNameFromCodes() when the string naming a region can’t be found. I am not a dev and am not familiar with the code, but it seems to me like the geolocation information is being found, but then there is a problem in translation/localization of the result. Just a guess.

We need YOUR help! We are running a crowd funding campaign to raise funds to implement the detailed Visitors Maps of Countries, Regions and Cities (for all countries)!

These maps will be beautiful, usable, and built using open standards SVG+JS. They will show detailed visitor count, conversion rates, by Country but also (New!) by city and region.

Pledge now at:

There will be no more flash in Piwik and we will add amazing new Maps of your visitors.

Piwik needs you!