diff --git a/core/Tracker/Visit.php b/core/Tracker/Visit.php index ca35af28eda..470ec3eb4cd 100644 --- a/core/Tracker/Visit.php +++ b/core/Tracker/Visit.php @@ -944,7 +944,9 @@ protected function getExistingVisitFieldsToUpdate($action, $visitIsConverted) // Ecommerce buyer status $visitEcommerceStatus = $this->goalManager->getBuyerType($this->visitorInfo['visit_goal_buyer']); - if($visitEcommerceStatus != GoalManager::TYPE_BUYER_NONE) { + if($visitEcommerceStatus != GoalManager::TYPE_BUYER_NONE + // only update if the value has changed (prevents overwriting the value in case a request has updated it in the meantime) + && $visitEcommerceStatus != $this->visitorInfo['visit_goal_buyer']) { $valuesToUpdate['visit_goal_buyer'] = $visitEcommerceStatus; }