Skip to content
Extraits de code Groupes Projets
Valider 6ff4094c rédigé par Thomas Steur's avatar Thomas Steur
Parcourir les fichiers

add visitor fields before triggering hook

parent b4157a4a
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -302,6 +302,14 @@ class Visit implements VisitInterface ...@@ -302,6 +302,14 @@ class Visit implements VisitInterface
$this->visitorInfo['visit_goal_converted'] = $visitIsConverted ? 1 : 0; $this->visitorInfo['visit_goal_converted'] = $visitIsConverted ? 1 : 0;
$this->visitorInfo['config_resolution'] = substr($this->visitorInfo['config_resolution'], 0, 9); $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. * Triggered before a new [visit entity](/guides/persistence-and-the-mysql-backend#visits) is persisted.
* *
...@@ -314,14 +322,6 @@ class Visit implements VisitInterface ...@@ -314,14 +322,6 @@ class Visit implements VisitInterface
*/ */
Piwik::postEvent('Tracker.newVisitorInformation', array(&$this->visitorInfo, $this->request)); 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->request->overrideLocation($this->visitorInfo);
$this->printVisitorInformation(); $this->printVisitorInformation();
......
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