Skip to content
Extraits de code Groupes Projets
Valider f0c8c351 rédigé par Matthieu Aubry's avatar Matthieu Aubry
Parcourir les fichiers

Merge pull request #9310 from peterbo/9156-ForceNewVisitAtMidnight

 New visit after midnight - setting for disabling this characteristic, refs #9156 
parents 830696c2 93bede79
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -654,6 +654,10 @@ create_new_visit_when_campaign_changes = 1 ...@@ -654,6 +654,10 @@ create_new_visit_when_campaign_changes = 1
; absent before, but is present now. ; absent before, but is present now.
create_new_visit_when_website_referrer_changes = 0 create_new_visit_when_website_referrer_changes = 0
; ONLY CHANGE THIS VALUE WHEN YOU DO NOT USE PIWIK ARCHIVING, SINCE THIS COULD CAUSE PARTIALLY MISSING ARCHIVE DATA
; Whether to force a new visit at midnight for every visitor. Default 1.
create_new_visit_after_midnight = 1
; maximum length of a Page Title or a Page URL recorded in the log_action.name table ; maximum length of a Page Title or a Page URL recorded in the log_action.name table
page_maximum_length = 1024; page_maximum_length = 1024;
......
...@@ -10,6 +10,7 @@ namespace Piwik\Plugins\CoreHome\Tracker; ...@@ -10,6 +10,7 @@ namespace Piwik\Plugins\CoreHome\Tracker;
use Piwik\Common; use Piwik\Common;
use Piwik\Date; use Piwik\Date;
use Piwik\Config;
use Piwik\EventDispatcher; use Piwik\EventDispatcher;
use Piwik\Exception\UnexpectedWebsiteFoundException; use Piwik\Exception\UnexpectedWebsiteFoundException;
use Piwik\Tracker\Cache; use Piwik\Tracker\Cache;
...@@ -154,7 +155,9 @@ class VisitRequestProcessor extends RequestProcessor ...@@ -154,7 +155,9 @@ class VisitRequestProcessor extends RequestProcessor
} }
$wasLastActionYesterday = $this->wasLastActionNotToday($visitProperties, $request); $wasLastActionYesterday = $this->wasLastActionNotToday($visitProperties, $request);
if ($wasLastActionYesterday) { $forceNewVisitAtMidnight = (bool) Config::getInstance()->Tracker['create_new_visit_after_midnight'];
if ($wasLastActionYesterday && $forceNewVisitAtMidnight) {
Common::printDebug("Visitor detected, but last action was yesterday..."); Common::printDebug("Visitor detected, but last action was yesterday...");
return true; return true;
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter