Visits are imported into Piwik, so that runs fine. But the problem I’m running into is that returning visitors are not recognized as returning, but marked as new a visitor. See attachment, the top and third visitor are using same IP, browser and OS. So the top visitor should be marked as a “returning visitor”? But its not :S
I use logrotation on the apache access log. After rotation, the following command is used to import the visitis into piwik:
I investigated the code, indeed it is not easily possible to change for what you ask for.
However we can maybe add a new config setting for increasing window looking back to increase returning visitors accuracy.
Can you try the following patch? If it works we’ll want to add the 86400 as a config parameter.
--- core/Tracker/Visit.php (revision 7005)
+++ core/Tracker/Visit.php (revision )
@@ -990,7 +990,7 @@
$bindSql = array();
- $timeLookBack = date('Y-m-d H:i:s', $this->getCurrentTimestamp() - Piwik_Config::getInstance()->Tracker['visit_standard_length']);
+ $timeLookBack = date('Y-m-d H:i:s', $this->getCurrentTimestamp() - Piwik_Config::getInstance()->Tracker['visit_standard_length'] - 86400 );
// This setting would be enabled for Intranet websites, to ensure that visitors using all the same computer config, same IP
// are not counted as 1 visitor. In this case, we want to enforce and trust the visitor ID from the cookie.