Skip to content
Extraits de code Groupes Projets
Valider 68f276a4 rédigé par mattpiwik's avatar mattpiwik
Parcourir les fichiers

Fixes #2661

Now we don't create a new visit, simply ignore the duplicate request

git-svn-id: http://dev.piwik.org/svn/trunk@5171 59fd770c-687e-43c8-a1e3-f5a4ff64c105
parent e6977654
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -146,8 +146,8 @@ class Piwik_Tracker_Visit implements Piwik_Tracker_Visit_Interface
$this->goalManager->init($this->request);
$requestIsManualGoalConversion = ($this->goalManager->idGoal > 0);
if($this->goalManager->requestIsEcommerce)
$requestIsEcommerce = $this->goalManager->requestIsEcommerce;
if($requestIsEcommerce)
{
$someGoalsConverted = true;
......@@ -219,7 +219,8 @@ class Piwik_Tracker_Visit implements Piwik_Tracker_Visit_Interface
// because the UPDATE didn't affect any rows (one row was found, but not updated since no field changed)
// - the exception is caught here and will result in a new visit incorrectly
// In this case, we cancel the current conversion to be recorded:
if($requestIsManualGoalConversion)
if($requestIsManualGoalConversion
|| $requestIsEcommerce)
{
$someGoalsConverted = $visitIsConverted = false;
}
......@@ -339,7 +340,7 @@ class Piwik_Tracker_Visit implements Piwik_Tracker_Visit_Interface
// If a pageview and goal conversion in the same second, with previously a goal conversion recorded
// the request would not "update" the row since all values are the same as previous
// therefore the request below throws exception, instead we make sure the UPDATE will affect the row
$valuesToUpdate['visit_total_time'] += (int)$this->goalManager->idGoal;
$valuesToUpdate['visit_total_time'] += (int)$this->goalManager->idGoal + 2; // +2 to offset idgoal=-1 and idgoal=0
}
// Update the idvisitor to the latest known value, in case the cookie value changed for some reasons,
......
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