diff options
Diffstat (limited to 'plugins/Referers/Referers.php')
-rw-r--r-- | plugins/Referers/Referers.php | 54 |
1 files changed, 8 insertions, 46 deletions
diff --git a/plugins/Referers/Referers.php b/plugins/Referers/Referers.php index 291971370c..3e305ba3d2 100644 --- a/plugins/Referers/Referers.php +++ b/plugins/Referers/Referers.php @@ -23,10 +23,11 @@ class Piwik_Referers extends Piwik_Plugin public function getInformation() { $info = array( - 'description' => Piwik_Translate('Referers_PluginDescription'), + 'name' => 'Referers', + 'description' => 'Reports the Referers data: Search Engines, Keywords, Websites, Campaign Tracking, Direct Entry. ', 'author' => 'Piwik', - 'author_homepage' => 'http://piwik.org/', - 'version' => Piwik_Version::VERSION, + 'homepage' => 'http://piwik.org/', + 'version' => '0.1', ); return $info; @@ -39,7 +40,6 @@ class Piwik_Referers extends Piwik_Plugin 'ArchiveProcessing_Period.compute' => 'archivePeriod', 'WidgetsList.add' => 'addWidgets', 'Menu.add' => 'addMenus', - 'Goals.getAvailableGoalSegments' => 'addGoalSegments', ); return $hooks; } @@ -62,49 +62,12 @@ class Piwik_Referers extends Piwik_Plugin function addMenus() { - Piwik_AddMenu('Referers_Referers', 'Referers_SubmenuEvolution', array('module' => 'Referers', 'action' => 'index')); + Piwik_AddMenu('Referers_Referers', 'Referers_SubmenuEvolution', array('module' => 'Referers')); Piwik_AddMenu('Referers_Referers', 'Referers_SubmenuSearchEngines', array('module' => 'Referers', 'action' => 'getSearchEnginesAndKeywords')); Piwik_AddMenu('Referers_Referers', 'Referers_SubmenuWebsites', array('module' => 'Referers', 'action' => 'getWebsites')); Piwik_AddMenu('Referers_Referers', 'Referers_SubmenuCampaigns', array('module' => 'Referers', 'action' => 'getCampaigns')); } - function addGoalSegments( $notification ) - { - $segments =& $notification->getNotificationObject(); - $segments = array_merge($segments, array( - array( - 'group' => Piwik_Translate('Referers_Referers'), - 'name' => Piwik_Translate('Referers_Keywords'), - 'module' => 'Referers', - 'action' => 'getKeywords', - ), - array( - 'group' => Piwik_Translate('Referers_Referers'), - 'name' => Piwik_Translate('Referers_SearchEngines'), - 'module' => 'Referers', - 'action' => 'getSearchEngines', - ), - array( - 'group' => Piwik_Translate('Referers_Referers'), - 'name' => Piwik_Translate('Referers_Websites'), - 'module' => 'Referers', - 'action' => 'getWebsites', - ), - array( - 'group' => Piwik_Translate('Referers_Referers'), - 'name' => Piwik_Translate('Referers_Campaigns'), - 'module' => 'Referers', - 'action' => 'getCampaigns', - ), - array( - 'group' => Piwik_Translate('Referers_Referers'), - 'name' => Piwik_Translate('Referers_Type'), - 'module' => 'Referers', - 'action' => 'getRefererType', - ), - )); - } - function archivePeriod( $notification ) { $archiveProcessing = $notification->getNotificationObject(); @@ -187,7 +150,7 @@ class Piwik_Referers extends Piwik_Plugin destroy($this->distinctUrls); } - protected function archiveDayAggregateVisits(Piwik_ArchiveProcessing $archiveProcessing) + protected function archiveDayAggregateVisits($archiveProcessing) { $query = "SELECT referer_type, referer_name, @@ -201,12 +164,11 @@ class Piwik_Referers extends Piwik_Plugin sum(case visit_total_actions when 1 then 1 else 0 end) as bounce_count, sum(case visit_goal_converted when 1 then 1 else 0 end) as nb_visits_converted FROM ".$archiveProcessing->logTable." - WHERE visit_last_action_time >= ? - AND visit_last_action_time <= ? + WHERE visit_server_date = ? AND idsite = ? GROUP BY referer_type, referer_name, referer_url, referer_keyword ORDER BY nb_visits DESC"; - $query = $archiveProcessing->db->query($query, array( $archiveProcessing->getStartDatetimeUTC(), $archiveProcessing->getEndDatetimeUTC(), $archiveProcessing->idsite )); + $query = $archiveProcessing->db->query($query, array( $archiveProcessing->strDateStart, $archiveProcessing->idsite )); $this->interestBySearchEngine = $this->interestByKeyword = |