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:
authorPeter Zhang <waikatozhang@gmail.com>2021-10-05 12:08:11 +0300
committerGitHub <noreply@github.com>2021-10-05 12:08:11 +0300
commit8998ae37375d9dcec802abb06e3fd009f93496b3 (patch)
tree92c44fe21d3aaabfe8c85d869150dd55ba421bf1 /plugins
parent4196894e8f39771b252b1dfaa5a7c8f734d84bfb (diff)
'Users' or 'UserId' tab no data: explain how to populate Users report data (#18077)
* update the userId report guide when there is no data
Diffstat (limited to 'plugins')
-rw-r--r--plugins/UserId/Categories/VisitorsUserSubcategory.php5
-rw-r--r--plugins/UserId/Reports/GetUsers.php13
-rw-r--r--plugins/UserId/lang/en.json7
3 files changed, 16 insertions, 9 deletions
diff --git a/plugins/UserId/Categories/VisitorsUserSubcategory.php b/plugins/UserId/Categories/VisitorsUserSubcategory.php
index cf524ed728..628a9b941f 100644
--- a/plugins/UserId/Categories/VisitorsUserSubcategory.php
+++ b/plugins/UserId/Categories/VisitorsUserSubcategory.php
@@ -17,8 +17,11 @@ class VisitorsUserSubcategory extends Subcategory
protected $id = 'UserId_UserReportTitle';
protected $order = 40;
+
public function getHelp()
{
- return '<p>' . Piwik::translate('UserId_VisitorsUserSubcategoryHelp') . '</p>';
+ return '<p>' . Piwik::translate('UserId_VisitorsUserSubcategoryHelp') . '</p>'.
+ '<p><a target="_blank" rel="noopener noreferrer" href="https://matomo.org/docs/user-id/"><span class="icon-info"></span> ' . Piwik::translate('CoreAdminHome_LearnMore') . '</a></p>';
+ ;
}
}
diff --git a/plugins/UserId/Reports/GetUsers.php b/plugins/UserId/Reports/GetUsers.php
index 406eb7a9d2..04899ade9b 100644
--- a/plugins/UserId/Reports/GetUsers.php
+++ b/plugins/UserId/Reports/GetUsers.php
@@ -25,11 +25,11 @@ class GetUsers extends Base
{
parent::init();
- $this->name = Piwik::translate('UserId_UserReportTitle');
- $this->subcategoryId = 'UserId_UserReportTitle';
- $this->documentation = Piwik::translate('UserId_UserReportDocumentation');
- $this->dimension = new UserId();
- $this->metrics = array('label', 'nb_visits', 'nb_actions', 'nb_visits_converted');
+ $this->name = Piwik::translate('UserId_UserReportTitle');
+ $this->subcategoryId = 'UserId_UserReportTitle';
+ $this->documentation = Piwik::translate('UserId_UserReportDocumentation');
+ $this->dimension = new UserId();
+ $this->metrics = array('label', 'nb_visits', 'nb_actions', 'nb_visits_converted');
$this->supportsFlatten = false;
// This defines in which order your report appears in the mobile app, in the menu and in the list of widgets
@@ -61,6 +61,9 @@ class GetUsers extends Base
$view->config->show_related_reports = false;
$view->config->show_insights = false;
$view->config->show_pivot_by_subtable = false;
+ $view->config->no_data_message = Piwik::translate('UserId_ThereIsNoDataForThisReport') . '<br><br>'
+ . sprintf(Piwik::translate('UserId_ThereIsNoDataForThisReportHelp'),
+ "<a target='_blank' rel='noreferrer noopener' href='https://matomo.org/docs/user-id/'>", "</a>");
if ($view->isViewDataTableId(HtmlTable::ID)) {
$view->config->disable_row_evolution = false;
diff --git a/plugins/UserId/lang/en.json b/plugins/UserId/lang/en.json
index 0603567b0f..f53f89ee91 100644
--- a/plugins/UserId/lang/en.json
+++ b/plugins/UserId/lang/en.json
@@ -4,6 +4,7 @@
"UserReportTitle": "User IDs",
"UserReportDocumentation": "This report shows visits and other general metrics for every individual User ID.",
"PluginDescription": "Shows user reports",
- "VisitorsUserSubcategoryHelp": "The User IDs report shows visits associated with all of your registered and logged in users. You can use this section to understand website usage by specific users and identify who your most and least active users are."
- }
-} \ No newline at end of file
+ "VisitorsUserSubcategoryHelp": "The User IDs report shows visits associated with all of your registered and logged in users. You can use this section to understand website usage by specific users and identify who your most and least active users are.",
+ "ThereIsNoDataForThisReport": "There is no data for this report.",
+ "ThereIsNoDataForThisReportHelp" : "%1$sLearn more about how to generate data for this report in our user guide.%2$s" }
+}