/** * Parse this page */ protected function parse() { parent::parse(); // get data $data = BackendAnalyticsModel::getDataForPage($this->pagePath, $this->startTimestamp, $this->endTimestamp); $this->parseOverviewData($data['aggregates']); $this->parseLineChartData($data['entries']['metrics_per_day']); // parse the page path $this->tpl->assign('pagePath', 'http://' . $data['entries']['hostname'] . $this->pagePath); $googleURL = BackendAnalyticsModel::GOOGLE_ANALYTICS_URL . '/%1$s?id=%2$s&pdr=%3$s'; $googleTableId = str_replace('ga:', '', BackendAnalyticsModel::getTableId()); $googleDate = date('Ymd', $this->startTimestamp) . '-' . date('Ymd', $this->endTimestamp); // parse links to google $this->tpl->assign('googleContentDetailURL', sprintf($googleURL, 'content_detail', $googleTableId, $googleDate) . '&d1=' . urlencode($this->pagePath)); }