I’m very happy that GeoIP is finally included in Piwik core with version 1.9. And it’s awesome that the developers included the geoipUpdateRows.php script, which retroactively applies the new GeoIP information to site visits that occurred prior to installing version 1.9.
However, it seems that even though geoipUpdateRows.php does in fact update all previous visits by inserting the more granular geographic data, the new data is not reflected in the Visitor reports in Piwik widgets.
To put it more directly, even though I can see the updated GeoIP data in my Piwik database, that data does not appear in Piwik itself for dates prior to when I updated to Piwik 1.9.
Anyone else have this problem?
I guess the reports have to be invalidated and newly archived, otherwise it won’t be reflected in the archived data.
With latest version of geoipUpdateRows.php I got an error
PHP Notice: Undefined index: lang in /subdomains/c/www/plugins/UserCountry/LocationProvider/Default.php on line 34
PS! GeoIP configured as Apache module.
Yes see the help in: How do I force the reports to be re-processed from the logs?[/quote]
Yes. But nothing changed after rerun archiving. I delete the piwik_archiving_* tables and rerun cronjob manually. But now I see that “Country” unknown for all visits
are the location_ columns set correctly in log_visit after running the script ?
After updating to new release and after updating archiving logs…
See screenshots(for last 25 rows)
@Viper This is due to two things: the script won’t work w/ the Apache module, you have to use the PECL extension or the PHP API. Also, there’s a bug in the script where it won’t fail if you try w/ the apache module.
There’s a new working script here: http://dev.piwik.org/trac/browser/trunk/misc/others/geoipUpdateRows.php?format=txt
You won’t have to change your selected GeoIP option w/ this script, just make sure either the GeoIP (PECL) or GeoIP (PHP) option is installed and working. Then run the script and re-process your reports.