private function setVisitorColumn(Visitor $visitor, $key, $value) { $this->visitorInfo[$key] = $value; $visitor->setVisitorColumn($key, $value); }
/** * Gather fields=>values that needs to be updated for the existing visit in log_visit * * @param Visitor $visitor * @param Action|null $action * @param $visitIsConverted * @return array */ protected function getExistingVisitFieldsToUpdate($visitor, $action, $visitIsConverted) { $valuesToUpdate = array(); // Might update the idvisitor when it was forced or overwritten for this visit if (strlen($this->visitorInfo['idvisitor']) == Tracker::LENGTH_BINARY_ID) { $valuesToUpdate['idvisitor'] = $this->visitorInfo['idvisitor']; $visitor->setVisitorColumn('idvisitor', $this->visitorInfo['idvisitor']); } $dimensions = $this->getAllVisitDimensions(); $valuesToUpdate = $this->triggerHookOnDimensions($dimensions, 'onExistingVisit', $visitor, $action, $valuesToUpdate); if ($visitIsConverted) { $valuesToUpdate = $this->triggerHookOnDimensions($dimensions, 'onConvertedVisit', $visitor, $action, $valuesToUpdate); } // Custom Variables overwrite previous values on each page view $valuesToUpdate = array_merge($valuesToUpdate, $this->visitorCustomVariables); return $valuesToUpdate; }