Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormattpiwik <matthieu.aubry@gmail.com>2010-06-16 19:00:54 +0400
committermattpiwik <matthieu.aubry@gmail.com>2010-06-16 19:00:54 +0400
commit807dc24a5f890e2220a87e350b37adc3ffdcf940 (patch)
tree84bf5d539a5f7594a166eeee489eee0c95cbbe55 /plugins/UserCountry
parentb4b664dfcda4973e6d77cc3434774c9381ad24eb (diff)
Refs #774
* Moving 'segments' definition to a hook that each plugin can listen to. So far only referers, user country and visit server time define segments. * Fixing issue related to column sorting. By default it was sorting by nb_uniq_visitors, now sorting by nb_visits (because unique visitors column is not displayed in the goals table) git-svn-id: http://dev.piwik.org/svn/trunk@2309 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'plugins/UserCountry')
-rw-r--r--plugins/UserCountry/UserCountry.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/plugins/UserCountry/UserCountry.php b/plugins/UserCountry/UserCountry.php
index 5bcaf867d3..fa32445896 100644
--- a/plugins/UserCountry/UserCountry.php
+++ b/plugins/UserCountry/UserCountry.php
@@ -34,6 +34,7 @@ class Piwik_UserCountry extends Piwik_Plugin
'ArchiveProcessing_Period.compute' => 'archivePeriod',
'WidgetsList.add' => 'addWidgets',
'Menu.add' => 'addMenu',
+ 'Goals.getAvailableGoalSegments' => 'addGoalSegments',
);
return $hooks;
}
@@ -49,6 +50,23 @@ class Piwik_UserCountry extends Piwik_Plugin
Piwik_AddMenu('General_Visitors', 'UserCountry_SubmenuLocations', array('module' => 'UserCountry', 'action' => 'index'));
}
+ function addGoalSegments( $notification )
+ {
+ $segments =& $notification->getNotificationObject();
+ $segments[Piwik_Translate('UserCountry_Location')] = array(
+ array(
+ 'name' => Piwik_Translate('UserCountry_Country'),
+ 'module' => 'UserCountry',
+ 'action' => 'getCountry',
+ ),
+ array(
+ 'name' => Piwik_Translate('UserCountry_Continent'),
+ 'module' => 'UserCountry',
+ 'action' => 'getContinent',
+ ),
+ );
+ }
+
function archivePeriod( $notification )
{
$archiveProcessing = $notification->getNotificationObject();