/** * Fills $this->visitor */ public function process() { $this->getVisitor(); $this->saveVisitor(); if (!$this->visitor->hasUserId() && !Yii::$app->user->isGuest) { $this->visitor->setUserId(Yii::$app->user->identity->getId()); } if ($this->detectFirstVisitSource) { } if ($this->detectAllVisitsSources) { } if ($this->storeLastActivity) { $this->visitor->save(); } if ($this->storeVisitedPages) { $this->storeVisitedPages(); } }