コード例 #1
0
ファイル: index.php プロジェクト: naujasdizainas/forkcms
 /**
  * Parse this page
  */
 protected function parse()
 {
     parent::parse();
     $warnings = BackendAnalyticsModel::checkSettings();
     $this->tpl->assign('warnings', $warnings);
     if (empty($warnings)) {
         $this->parseOverviewData();
         $this->parseLineChartData();
         $this->parsePieChartData();
         $this->parseImportantReferrals();
         $this->parseImportantKeywords();
         $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);
         $this->tpl->assign('googleTopReferrersURL', sprintf($googleURL, 'referring_sources', $googleTableId, $googleDate));
         $this->tpl->assign('googleTopKeywordsURL', sprintf($googleURL, 'keywords', $googleTableId, $googleDate));
         $this->tpl->assign('googleTopContentURL', sprintf($googleURL, 'top_content', $googleTableId, $googleDate));
         $this->tpl->assign('googleTrafficSourcesURL', sprintf($googleURL, 'sources', $googleTableId, $googleDate));
         $this->tpl->assign('googleVisitorsURL', sprintf($googleURL, 'visitors', $googleTableId, $googleDate));
         $this->tpl->assign('googlePageviewsURL', sprintf($googleURL, 'pageviews', $googleTableId, $googleDate));
         $this->tpl->assign('googleTimeOnSiteURL', sprintf($googleURL, 'time_on_site', $googleTableId, $googleDate));
         $this->tpl->assign('googleVisitorTypesURL', sprintf($googleURL, 'visitor_types', $googleTableId, $googleDate));
         $this->tpl->assign('googleBouncesURL', sprintf($googleURL, 'bounce_rate', $googleTableId, $googleDate));
         $this->tpl->assign('googleAveragePageviewsURL', sprintf($googleURL, 'average_pageviews', $googleTableId, $googleDate));
     }
 }
コード例 #2
0
ファイル: exit_pages.php プロジェクト: naujasdizainas/forkcms
 /**
  * Parse this page
  */
 protected function parse()
 {
     parent::parse();
     $this->parseOverviewData();
     $this->parseChartData();
     $this->parseExitPages();
     $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('googleTopExitPagesURL', sprintf($googleURL, 'exits', $googleTableId, $googleDate));
 }
コード例 #3
0
 /**
  * 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));
 }
コード例 #4
0
ファイル: all_pages.php プロジェクト: netconstructor/forkcms
 /**
  * Parse this page
  *
  * @return	void
  */
 protected function parse()
 {
     // call parent parse
     parent::parse();
     // overview data
     $this->parseOverviewData();
     // get and parse data for chart
     $this->parseChartData();
     // parse pages
     $this->parsePages();
     // init google url
     $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('googleTopContentURL', sprintf($googleURL, 'top_content', $googleTableId, $googleDate));
 }