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
path: root/core
diff options
context:
space:
mode:
authorThomas Steur <thomas.steur@googlemail.com>2014-06-12 05:17:33 +0400
committerThomas Steur <thomas.steur@googlemail.com>2014-06-12 05:17:33 +0400
commit6ff4094c741d91995288de431b9e8fcaddf6c2e9 (patch)
treea844ae98d70cf24912d615a7ca364d3ef376c9d9 /core
parentb4157a4ab6daa52e663e36519eb680b2f00b89fd (diff)
add visitor fields before triggering hook
Diffstat (limited to 'core')
-rw-r--r--core/Tracker/Visit.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/core/Tracker/Visit.php b/core/Tracker/Visit.php
index dd2608197c..aaba4b4fa4 100644
--- a/core/Tracker/Visit.php
+++ b/core/Tracker/Visit.php
@@ -302,6 +302,14 @@ class Visit implements VisitInterface
$this->visitorInfo['visit_goal_converted'] = $visitIsConverted ? 1 : 0;
$this->visitorInfo['config_resolution'] = substr($this->visitorInfo['config_resolution'], 0, 9);
+ $dimensions = VisitDimension::getAllDimensions();
+ foreach ($dimensions as $dimension) {
+ if (!method_exists($dimension, 'onNewVisit')) {
+ continue;
+ }
+ $this->visitorInfo[$dimension->getFieldName()] = $dimension->onNewVisit($this->request, $this->visitorInfo, $action);
+ }
+
/**
* Triggered before a new [visit entity](/guides/persistence-and-the-mysql-backend#visits) is persisted.
*
@@ -314,14 +322,6 @@ class Visit implements VisitInterface
*/
Piwik::postEvent('Tracker.newVisitorInformation', array(&$this->visitorInfo, $this->request));
- $dimensions = VisitDimension::getAllDimensions();
- foreach ($dimensions as $dimension) {
- if (!method_exists($dimension, 'onNewVisit')) {
- continue;
- }
- $this->visitorInfo[$dimension->getFieldName()] = $dimension->onNewVisit($this->request, $this->visitorInfo, $action);
- }
-
$this->request->overrideLocation($this->visitorInfo);
$this->printVisitorInformation();