Skip to content
Extraits de code Groupes Projets
Valider b0717253 rédigé par diosmosis's avatar diosmosis
Parcourir les fichiers

Allow processed metrics to provide metric documentation.

parent 7f94d088
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -52,6 +52,14 @@ abstract class Metric ...@@ -52,6 +52,14 @@ abstract class Metric
*/ */
abstract public function getTranslatedName(); abstract public function getTranslatedName();
/**
* TODO
*/
public function getDocumentation()
{
return "";
}
/** /**
* TODO * TODO
*/ */
......
...@@ -428,6 +428,23 @@ class Report ...@@ -428,6 +428,23 @@ class Report
} }
} }
$processedMetrics = $this->processedMetrics ?: array();
foreach ($processedMetrics as $processedMetric) {
if (!($processedMetric instanceof ProcessedMetric)) {
continue;
}
$name = $processedMetric->getName();
$metricDocs = $processedMetric->getDocumentation();
if (empty($metricDocs)) {
$metricDocs = @$translations[$name];
}
if (!empty($metricDocs)) {
$documentation[$processedMetric->getName()] = $metricDocs;
}
}
return $documentation; return $documentation;
} }
......
...@@ -44,6 +44,10 @@ ...@@ -44,6 +44,10 @@
<nb_visits>If a visitor comes to your website for the first time or if he visits a page more than 30 minutes after his last page view, this will be recorded as a new visit.</nb_visits> <nb_visits>If a visitor comes to your website for the first time or if he visits a page more than 30 minutes after his last page view, this will be recorded as a new visit.</nb_visits>
<nb_users>The number of users logged in your website. It is the number of unique active users that have a User ID set (via the Tracking code function 'setUserId').</nb_users> <nb_users>The number of users logged in your website. It is the number of unique active users that have a User ID set (via the Tracking code function 'setUserId').</nb_users>
<nb_actions>The number of actions performed by your visitors. Actions can be page views, internal site searches, downloads or outlinks.</nb_actions> <nb_actions>The number of actions performed by your visitors. Actions can be page views, internal site searches, downloads or outlinks.</nb_actions>
<avg_time_generation>The average time it took to generate the page. This metric includes the time it took the server to generate the web page, plus the time it took for the visitor to download the response from the server. A lower 'Avg. generation time' means a faster website for your visitors!</avg_time_generation>
<bounce_rate>The percentage of visits that only had a single pageview. This means, that the visitor left the website directly from the entrance page.</bounce_rate>
<nb_actions_per_visit>The average number of actions (page views, site searches, downloads or outlinks) that were performed during the visits.</nb_actions_per_visit>
<avg_time_on_site>The average duration of a visit.</avg_time_on_site>
</metricsDocumentation> </metricsDocumentation>
<processedMetrics> <processedMetrics>
<avg_time_generation>Avg. generation time</avg_time_generation> <avg_time_generation>Avg. generation time</avg_time_generation>
...@@ -137,6 +141,9 @@ ...@@ -137,6 +141,9 @@
<nb_visits>If a visitor comes to your website for the first time or if he visits a page more than 30 minutes after his last page view, this will be recorded as a new visit.</nb_visits> <nb_visits>If a visitor comes to your website for the first time or if he visits a page more than 30 minutes after his last page view, this will be recorded as a new visit.</nb_visits>
<nb_users>The number of users logged in your website. It is the number of unique active users that have a User ID set (via the Tracking code function 'setUserId').</nb_users> <nb_users>The number of users logged in your website. It is the number of unique active users that have a User ID set (via the Tracking code function 'setUserId').</nb_users>
<nb_actions>The number of actions performed by your visitors. Actions can be page views, internal site searches, downloads or outlinks.</nb_actions> <nb_actions>The number of actions performed by your visitors. Actions can be page views, internal site searches, downloads or outlinks.</nb_actions>
<bounce_rate>The percentage of visits that only had a single pageview. This means, that the visitor left the website directly from the entrance page.</bounce_rate>
<nb_actions_per_visit>The average number of actions (page views, site searches, downloads or outlinks) that were performed during the visits.</nb_actions_per_visit>
<avg_time_on_site>The average duration of a visit.</avg_time_on_site>
</metricsDocumentation> </metricsDocumentation>
<processedMetrics> <processedMetrics>
<bounce_rate>Bounce Rate</bounce_rate> <bounce_rate>Bounce Rate</bounce_rate>
...@@ -732,6 +739,7 @@ ...@@ -732,6 +739,7 @@
<nb_outlinks>The number of times this link was clicked.</nb_outlinks> <nb_outlinks>The number of times this link was clicked.</nb_outlinks>
<nb_uniq_outlinks>The number of visits that involved a click on this link. If a link was clicked multiple times during one visit, it is only counted once.</nb_uniq_outlinks> <nb_uniq_outlinks>The number of visits that involved a click on this link. If a link was clicked multiple times during one visit, it is only counted once.</nb_uniq_outlinks>
<nb_searches>The number of visits that searched for this keyword on your website's search engine.</nb_searches> <nb_searches>The number of visits that searched for this keyword on your website's search engine.</nb_searches>
<avg_time_generation>The average time it took to generate the page. This metric includes the time it took the server to generate the web page, plus the time it took for the visitor to download the response from the server. A lower 'Avg. generation time' means a faster website for your visitors!</avg_time_generation>
</metricsDocumentation> </metricsDocumentation>
<processedMetrics> <processedMetrics>
<avg_time_generation>Avg. generation time</avg_time_generation> <avg_time_generation>Avg. generation time</avg_time_generation>
...@@ -2168,6 +2176,10 @@ ...@@ -2168,6 +2176,10 @@
<nb_visits>If a visitor comes to your website for the first time or if he visits a page more than 30 minutes after his last page view, this will be recorded as a new visit.</nb_visits> <nb_visits>If a visitor comes to your website for the first time or if he visits a page more than 30 minutes after his last page view, this will be recorded as a new visit.</nb_visits>
<nb_users>The number of users logged in your website. It is the number of unique active users that have a User ID set (via the Tracking code function 'setUserId').</nb_users> <nb_users>The number of users logged in your website. It is the number of unique active users that have a User ID set (via the Tracking code function 'setUserId').</nb_users>
<nb_actions>The number of actions performed by your visitors. Actions can be page views, internal site searches, downloads or outlinks.</nb_actions> <nb_actions>The number of actions performed by your visitors. Actions can be page views, internal site searches, downloads or outlinks.</nb_actions>
<avg_time_generation>The average time it took to generate the page. This metric includes the time it took the server to generate the web page, plus the time it took for the visitor to download the response from the server. A lower 'Avg. generation time' means a faster website for your visitors!</avg_time_generation>
<bounce_rate>The percentage of visits that only had a single pageview. This means, that the visitor left the website directly from the entrance page.</bounce_rate>
<nb_actions_per_visit>The average number of actions (page views, site searches, downloads or outlinks) that were performed during the visits.</nb_actions_per_visit>
<avg_time_on_site>The average duration of a visit.</avg_time_on_site>
</metricsDocumentation> </metricsDocumentation>
<uniqueId>API_get</uniqueId> <uniqueId>API_get</uniqueId>
</row> </row>
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter