_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']); $_school = addslashes($data['schoolName']); $this->addInitFunction("(function (){ window._gaq && _gaq.push(['_trackEvent', 'Page: {$_page}', 'View', '{$_school} - {$_user}']); })"); } return $this; } }