GeoIP (PECL) installed correctly, but missing city data


I have seen several other threads on this topic, but no one has replied to them. So I apologize for starting a new thread, but this seems to clearly be an issue with Piwik. If it’s not, I’m happy to help find the user error that myself and others are encountering.

I have Piwik installed on a private server. The GeoIP settings page in Piwik indicate that the PECL extension is installed correctly, and the test script on the right side correctly detects my city. I am using the GeoLiteCity.dat file that I have renamed to GeoIPCity.dat as instructed.

However, my real-time visitor report, the real-time visitor map and all reports contain absolutely no city data. I have attempted to reprocess old logs via the instructions in the Piwik knowledge base. That hasn’t worked, which isn’t so much an issue as is collecting city data going forward.

The web site being analyzed by Piwik is a national OEM and service company, so collecting city data can be crucial to decisions we make. Any help would be appreciated - I am very impressed with all of Piwik’s features and especially the recent improvements. Let me know if I need to provide any config files, screen shots or logs, and thanks for your time.

(Stefan Giehl) #2

Have you enable IP anonymisation in Piwik Settings?

If yes, please ensure you have enabled to use the not anonymised IP for enriching the user data.
That menas a bit less user privacy but much better results in geo location.


Nope, I have anonymisation completely disabled, which I should have mentioned in the original post.

(Matthieu Napoli) #4

Hi, if I understand correctly there is no data in your Piwik, but I don’t see the link with the GeoIP database?

If you have no data, have you checked that you have inserted the Javascript tracking code in the website you want to track? Are you sure it’s working correctly (maybe you can check in the Chrome/Firefox developer console that there is no error on the website).

Check out this FAQ too: Piwik doesn't track any visits and pages, and shows "There is no data for this report" in all reports. - Analytics Platform - Matomo


No, that is not correct. There is all the data I could possibly want, EXCEPT city data. At least, nothing else is missing that I can tell. I’ll look more closely to be certain.

Actually, now that you mention it, I do minification on the fly. I was just assuming that the Piwik code was capable of that.

I’ll try marking the JavaScript tracking code to not minify and see if that makes a difference.