_trackUser(); return parent::_beforeDisplay(); } protected function _trackUser() { if (!$this->hasAuth() || !($auth = $this->getAuth()) || !$auth->isLoggedIn() || !($data = $auth->getData())) { return $this; } if (defined('SITE_LIVE') && SITE_LIVE) { $_page = addslashes($this->getTitle()); $_user = addslashes($data['name']); $this->addInitFunction("(function (){ window._gaq && _gaq.push(['_trackEvent', 'Page: {$_page}', 'View', '{$_user}']); })"); } return $this; } }