/** * Log visitor informations * * @param boolean $isPreview Is the current page is a preview * @param boolean $isAdmin Is an admin is connected * * @return void */ protected function logVisitor($isPreview, $isAdmin) { if (!$isPreview and !$isAdmin) { try { $visitor = new Visitor(); $session = new SessionContainer(); $sessionId = $session->getDefaultManager()->getId(); $session->visitorId = $visitor->getVisitorId($sessionId); } catch (Exception $e) { //don't care } } }