Diagnostic Geo configuration

I installed GeoIP PECL and copied the latest GeoLite City database to misc/GeoIPCity.dat. Now the admin page says “According to this provider, your current location is: Hayward, CA United States”. However, all visits are still shown as ‘Unknown’ in Visitors/Locations & Provider page. How can I find out what I missed? Thank you.

Piwik can only apply the new geo data to new visitors. If you want it to work for all visitors your site has had, you need to force Piwik to re-process the reports. See here: How to - Analytics Platform - Matomo

This should work on the condition that your visitors’ IP addresses are still fully in the logs, i.e. you did not tell Piwik to shorten them.

Hi Wiesel,

Thank you for looking into this. I dropped all piwik_archive_* tables but still got no luck. All visits, including new visits, are all shown as ‘Unknown’. What else can I try?

I know what I missed. To use PECL, you need to add this to your php.ini.
[geoip]
geoip.custom_directory = /home/deployer/piwik/misc/

Glad you figured it out.
Thanks for posting the solution.