diff options
author | diosmosis <diosmosis@users.noreply.github.com> | 2020-12-09 06:00:03 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-09 06:00:03 +0300 |
commit | 1fe1bb3917e4b624a3c45272d60fafa08f672626 (patch) | |
tree | 1358241fdec12ea4e407c1fd32f152413ed23dc3 /plugins/Goals | |
parent | 5f7eb3e1f655ec2aa0d0360c3f5deb89688a4344 (diff) |
Correct archived metric query for days to conversion (#16917)
* Correct query for days to conversion
* match archiving logic
Diffstat (limited to 'plugins/Goals')
-rw-r--r-- | plugins/Goals/Goals.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/Goals/Goals.php b/plugins/Goals/Goals.php index 9f5cf91bce..413eccc6ab 100644 --- a/plugins/Goals/Goals.php +++ b/plugins/Goals/Goals.php @@ -165,7 +165,7 @@ class Goals extends \Piwik\Plugin $metric->setCategory($custom->getCategoryId()); $metric->setDocumentation('The number of days it took a visitor to convert this goal.'); $metric->setName('goal_' . $goal['idgoal'] . '_daystoconversion'); - $metric->setQuery('sum(log_conversion.visitor_seconds_since_first * 86400)'); + $metric->setQuery('sum(floor(log_visit.visitor_seconds_since_first / 86400))'); $metricsList->addMetric($metric); $custom = new GoalDimension($goal, 'visitor_count_visits', 'Visits to conversion goal "' . $goal['name'] . '" (ID ' . $goal['idgoal'] .' )'); |