diff options
author | Stefan Giehl <stefan@matomo.org> | 2019-03-05 00:10:06 +0300 |
---|---|---|
committer | diosmosis <diosmosis@users.noreply.github.com> | 2019-03-05 00:10:06 +0300 |
commit | 3ba0e38ffe5d45561d5dff541652a95c25a88dec (patch) | |
tree | 8f73353c1c82e49506e195b15e3baf43fb07ef98 /plugins/Referrers | |
parent | 283ec8d650d25d6f7577c13108a69d98367fc486 (diff) |
Improve total report values calculation (#14158)
* Ensure summed up values are numeric
to prevent a `A non well formed numeric value encountered` on PHP 7.x
* Do not calculate total values for average, rate or nested metrics
* Fix calculation for minimal or maximal metrics
* updates expected test files
* Also skip evolution metrics
* skip all non numeric values
* update test file
* calculate totals for nested metrics recursivly
* update test files
Diffstat (limited to 'plugins/Referrers')
-rw-r--r-- | plugins/Referrers/tests/System/expected/test_Referrers_getReferrerType__API.getProcessedReport_day.xml | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/plugins/Referrers/tests/System/expected/test_Referrers_getReferrerType__API.getProcessedReport_day.xml b/plugins/Referrers/tests/System/expected/test_Referrers_getReferrerType__API.getProcessedReport_day.xml index fd8d54cdbc..d30fa7502e 100644 --- a/plugins/Referrers/tests/System/expected/test_Referrers_getReferrerType__API.getProcessedReport_day.xml +++ b/plugins/Referrers/tests/System/expected/test_Referrers_getReferrerType__API.getProcessedReport_day.xml @@ -1193,27 +1193,24 @@ <nb_visits>62</nb_visits> <nb_actions>62</nb_actions> <nb_users>0</nb_users> - <max_actions>31</max_actions> + <max_actions>1</max_actions> <sum_visit_length>11315</sum_visit_length> <bounce_count>62</bounce_count> <nb_visits_converted>0</nb_visits_converted> <goals> <row idgoal="1"> - <nb_conversions>1</nb_conversions> - <nb_visits_converted>1</nb_visits_converted> + <nb_conversions>31</nb_conversions> + <nb_visits_converted>31</nb_visits_converted> <revenue>0</revenue> </row> <row idgoal="2"> - <nb_conversions>2</nb_conversions> - <nb_visits_converted>1</nb_visits_converted> + <nb_conversions>62</nb_conversions> + <nb_visits_converted>31</nb_visits_converted> <revenue>0</revenue> </row> </goals> <nb_conversions>93</nb_conversions> <revenue>0</revenue> - <conversion_rate>0</conversion_rate> <nb_actions_per_visit>31</nb_actions_per_visit> - <avg_time_on_site>5673</avg_time_on_site> - <bounce_rate>3100</bounce_rate> </reportTotal> </result>
\ No newline at end of file |