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:
authordiosmosis <benaka@piwik.pro>2015-10-10 02:58:26 +0300
committerdiosmosis <benaka@piwik.pro>2015-10-10 02:58:26 +0300
commit43b7ed91738abd9d325c31fa83d7c73f22a217c3 (patch)
treec5f42da9dcdf9fe21e25197867f522d2d6d4664e /plugins/Contents
parent2fe8faacdbde76121dfabca6088a300d6e8fae7d (diff)
Add metric documentation for nb_impressions, nb_interactions & interaction_rate.
Diffstat (limited to 'plugins/Contents')
-rw-r--r--plugins/Contents/Columns/Metrics/InteractionRate.php5
-rw-r--r--plugins/Contents/Contents.php8
-rw-r--r--plugins/Contents/lang/en.json5
3 files changed, 17 insertions, 1 deletions
diff --git a/plugins/Contents/Columns/Metrics/InteractionRate.php b/plugins/Contents/Columns/Metrics/InteractionRate.php
index 64485fe0e6..513f0efe35 100644
--- a/plugins/Contents/Columns/Metrics/InteractionRate.php
+++ b/plugins/Contents/Columns/Metrics/InteractionRate.php
@@ -32,6 +32,11 @@ class InteractionRate extends ProcessedMetric
return Piwik::translate('Contents_InteractionRate');
}
+ public function getDocumentation()
+ {
+ return Piwik::translate('Contents_InteractionRateMetricDocumentation');
+ }
+
public function compute(Row $row)
{
$interactions = $this->getMetric($row, 'nb_interactions');
diff --git a/plugins/Contents/Contents.php b/plugins/Contents/Contents.php
index 10536930af..8bd0fe8042 100644
--- a/plugins/Contents/Contents.php
+++ b/plugins/Contents/Contents.php
@@ -8,6 +8,8 @@
*/
namespace Piwik\Plugins\Contents;
+use Piwik\Piwik;
+
class Contents extends \Piwik\Plugin
{
/**
@@ -17,6 +19,7 @@ class Contents extends \Piwik\Plugin
{
return array(
'Metrics.getDefaultMetricTranslations' => 'addMetricTranslations',
+ 'Metrics.getDefaultMetricDocumentationTranslations' => 'addMetricDocumentationTranslations',
'AssetManager.getJavaScriptFiles' => 'getJsFiles',
'AssetManager.getStylesheetFiles' => 'getStylesheetFiles',
);
@@ -39,4 +42,9 @@ class Contents extends \Piwik\Plugin
$stylesheets[] = "plugins/Contents/stylesheets/datatable.less";
}
+ public function addMetricDocumentationTranslations(&$translations)
+ {
+ $translations['nb_impressions'] = Piwik::translate('Contents_ImpressionsMetricDocumentation');
+ $translations['nb_interactions'] = Piwik::translate('Contents_InteractionsMetricDocumentation');
+ }
}
diff --git a/plugins/Contents/lang/en.json b/plugins/Contents/lang/en.json
index e6a89ad640..3873a7b2ac 100644
--- a/plugins/Contents/lang/en.json
+++ b/plugins/Contents/lang/en.json
@@ -8,6 +8,9 @@
"ContentName":"Content Name",
"ContentPiece":"Content Piece",
"ContentTarget":"Content Target",
- "Contents":"Contents"
+ "Contents":"Contents",
+ "InteractionsMetricDocumentation": "The number of times a content block was interacted with (eg, a 'click' on a banner or ad).",
+ "ImpressionsMetricDocumentation": "The number of times a content block, such as a banner or an ad, was displayed on a page.",
+ "InteractionRateMetricDocumentation": "The ratio of content impressions to interactions."
}
} \ No newline at end of file