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:
Diffstat (limited to 'plugins/UserId/Reports/GetUsers.php')
-rw-r--r--plugins/UserId/Reports/GetUsers.php67
1 files changed, 67 insertions, 0 deletions
diff --git a/plugins/UserId/Reports/GetUsers.php b/plugins/UserId/Reports/GetUsers.php
new file mode 100644
index 0000000000..c5914776c5
--- /dev/null
+++ b/plugins/UserId/Reports/GetUsers.php
@@ -0,0 +1,67 @@
+<?php
+/**
+ * Piwik - free/libre analytics platform
+ *
+ * @link http://piwik.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ */
+
+namespace Piwik\Plugins\UserId\Reports;
+
+use Piwik\Piwik;
+use Piwik\Plugin\Report;
+use Piwik\Plugin\ViewDataTable;
+use Piwik\View;
+
+/**
+ * A report showing all unique user IDs and some aggregated information about them. It also allows
+ * to open a popover with visitor details
+ */
+class GetUsers extends Base
+{
+ /**
+ * @return array
+ */
+ public static function getColumnsToDisplay()
+ {
+ return array(
+ 'label', 'nb_visits', 'nb_actions', 'nb_visits_converted'
+ );
+ }
+
+ protected function init()
+ {
+ parent::init();
+
+ $this->name = Piwik::translate('UsersManager_MenuUsers');
+ $this->menuTitle = $this->name;
+ $this->documentation = '';
+
+ // This defines in which order your report appears in the mobile app, in the menu and in the list of widgets
+ $this->order = 1;
+ }
+
+ /**
+ * @param ViewDataTable $view
+ */
+ public function configureView(ViewDataTable $view)
+ {
+ $view->config->addTranslation('label', Piwik::translate('General_UserId'));
+ $view->config->addTranslation('nb_visits_converted', Piwik::translate('General_VisitConvertedGoal'));
+
+ /*
+ * Hide most of the table footer actions, leaving only export icons and pagination
+ */
+ $view->config->columns_to_display = $this->getColumnsToDisplay();
+ $view->config->show_all_views_icons = false;
+ $view->config->show_active_view_icon = false;
+ $view->config->show_related_reports = false;
+ $view->config->show_insights = false;
+ $view->config->show_pivot_by_subtable = false;
+ $view->config->show_flatten_table = false;
+ $view->config->disable_row_evolution = true;
+
+ // exclude users with less then 2 visits, when low population filter is active
+ $view->requestConfig->filter_excludelowpop_value = 2;
+ }
+}