Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordiosmosis <benaka@piwik.pro>2015-07-09 06:06:12 +0300
committerdiosmosis <benaka@piwik.pro>2015-08-06 17:37:58 +0300
commit4b1b0757ff146837ec3ef8d928f37b04c1d17ac4 (patch)
treefdf80cfea4e5f715c046b907391d94aaf3b0a196 /core/Tracker/Visit.php
parent9c722038a97e4676e9c66fe205c9bd8767e3591d (diff)
Move visitor not found logic in Visit::handle() to Goals request processor.
Diffstat (limited to 'core/Tracker/Visit.php')
-rw-r--r--core/Tracker/Visit.php21
1 files changed, 5 insertions, 16 deletions
diff --git a/core/Tracker/Visit.php b/core/Tracker/Visit.php
index 7f26956fe1..0a5a2f0425 100644
--- a/core/Tracker/Visit.php
+++ b/core/Tracker/Visit.php
@@ -128,8 +128,6 @@ class Visit implements VisitInterface
$isNewVisit = $this->isVisitNew($visitor, $action);
$goalManager = GoalsRequestProcessor::$goalManager;
- $isManualGoalConversion = $goalManager->isManualGoalConversion();
- $requestIsEcommerce = $goalManager->requestIsEcommerce;
foreach ($this->requestProcessors as $processor) {
$abort = $processor->manipulateVisitProperties($this->visitProperties, $this->request);
@@ -146,7 +144,6 @@ class Visit implements VisitInterface
// AND
// - the last page view for this visitor was less than 30 minutes ago @see isLastActionInTheSameVisit()
if (!$isNewVisit) {
-
$idReferrerActionUrl = $this->visitProperties->visitorInfo['visit_exit_idaction_url'];
$idReferrerActionName = $this->visitProperties->visitorInfo['visit_exit_idaction_name'];
@@ -161,19 +158,7 @@ class Visit implements VisitInterface
$action->record($visitor, $idReferrerActionUrl, $idReferrerActionName);
}
} catch (VisitorNotFoundInDb $e) {
-
- // There is an edge case when:
- // - two manual goal conversions happen in the same second
- // - which result in handleExistingVisit throwing the exception
- // 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 ($isManualGoalConversion
- || $requestIsEcommerce
- ) {
- $this->visitProperties->setRequestMetadata('Goals', 'someGoalsConverted', false);
- $this->visitProperties->setRequestMetadata('Goals', 'visitIsConverted', false);
- }
+ $this->visitProperties->setRequestMetadata('CoreHome', 'visitorNotFoundInDb', true);
}
}
@@ -199,6 +184,10 @@ class Visit implements VisitInterface
// update the cookie with the new visit information
$this->request->setThirdPartyCookie($this->visitProperties->visitorInfo['idvisitor']);
+ foreach ($this->requestProcessors as $processor) {
+ $processor->processRequest($this->visitProperties);
+ }
+
// record the goals if applicable
if ($this->visitProperties->getRequestMetadata('Goals', 'someGoalsConverted')) {
$goalManager->recordGoals(