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:
authormattab <matthieu.aubry@gmail.com>2014-04-10 05:46:39 +0400
committermattab <matthieu.aubry@gmail.com>2014-04-10 05:46:39 +0400
commita9446f721a65a2b3210adcd33d1ec8ae4c78b0b3 (patch)
treef6c9e3b42e0c4d77d25dfb5e314879049ecd1fde /plugins/Events/API.php
parentc631324e923404ea49164fbcb474d558c366020d (diff)
Refs #472 New metrics: Average Event value, Number of events with value.
Diffstat (limited to 'plugins/Events/API.php')
-rw-r--r--plugins/Events/API.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/plugins/Events/API.php b/plugins/Events/API.php
index 241d0bf915..391fe426f3 100644
--- a/plugins/Events/API.php
+++ b/plugins/Events/API.php
@@ -66,6 +66,16 @@ class API extends \Piwik\Plugin\API
$row->setColumn('label', Piwik::translate(Archiver::EVENT_NAME_NOT_SET));
}
});
+
+ // add processed metric avg_event_value
+ $dataTable->queueFilter('ColumnCallbackAddColumnQuotient',
+ array('avg_event_value',
+ 'sum_event_value',
+ 'nb_events_with_value',
+ $precision = 2,
+ $shouldSkipRows = true)
+ );
+
return $dataTable;
}