Unique Visitor Detection

Hallo,

I installed Piwik on the 05.10.2009 (2 days ago) because it looked the best and had the most info about the visitors (Browser, Version, Resolution, Country,…)
There is a new Version of the site with optimal resolution over 800x600 (old was 800x600) and wanted too check was visitors are using.
At writing i found this -> dev.piwik.org/trac/ticket/888
What exacly matched my logs. But there it say’s it’s been fixed and i have 0.4.3 version.

So what to do? Reopen the bug?

I took the code that checks bing:

if( in_array($refererInfo['referer_name'], array("Live", "Bing")) && preg_match('/^65\.55/', long2ip($userInfo['location_ip'])))

And checked the logs. The one IP that i tested matches (65.55.165.13) but none of the logs has a referer (Live or Bing) so thats the problem.
And whats funny yesterday i checked Piwik and there it was Bing as Search Engine but not today.

Because it destroyed my statistics i decided to remove them. I’m writing what has to be done here to help someone who also needs it.

  • First i removed the microsoft IP’s from logging so i don’t get new until the “bug” is repaired. Just put the Piwik Javascript code inside (PHP code):
if(!preg_match("/^65\.55/", $_SERVER["REMOTE_ADDR"]))
{
?>
<piwik code>
>?
}
  • Then remove the logs:
DELETE log_visit, log_link_visit_action
FROM log_visit INNER JOIN log_link_visit_action
WHERE log_visit.idvisit = log_link_visit_action.idvisit AND log_visit.location_ip >= (65 * 256 + 55) * 256 * 256 && log_visit.location_ip < (65 * 256 + 56) * 256 * 256

You will need other tables. Perhaps piwik_log_visit an such.

  • Then to make Piwik re-trigger the archiving delete the archive_* tables.

Go to you Dashboard style_emoticons/<#EMO_DIR#>/smile.gif

@Piwik developers: Great FAQ!

We fixed this again in #958. It’ll be in the 0.4.4 release.

The feature of automatically deleting old older than 7/30/N days is now available in Piwik, under Settings > Privacy > Delete old logs from the database.

This is available in the latest 1.5 RC release, check it out now and report if you have suggestions, directly in this post: 301 Moved Permanently

Good news: GeoIP is now integrated in Piwik, enabling Accurate Visitors Geolocation in your Analytics reports. To enable GeoIP go to the Settings > Geolocation admin page, and follow the short instructions.

You can also get an even more accurate Country & City Database from here to enjoy top accuracy in detecting your visitors locations.

See also the documentation about Geolocation - Analytics Reports in Piwik.