diff options
author | diosmosis <diosmosis@users.noreply.github.com> | 2019-02-12 06:53:33 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-12 06:53:33 +0300 |
commit | 6c4bfb8b8ea121e326110cfddd50ced30a90fb8a (patch) | |
tree | 4ab6459da082f943b887fb198007b2834eae07ab /plugins/Goals | |
parent | 8d59c5a6511d0cc98af4140761152de0be313285 (diff) |
Make segmented visitor log in sales page only display visits with orders. (#14079)
* Make segmented visitor log in sales page only display visits with orders.
* Remove some uses.
* Leave out invalid characters in widget unique ID.
* Change widget ID as well as report ID.
Diffstat (limited to 'plugins/Goals')
-rw-r--r-- | plugins/Goals/Pages.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/Goals/Pages.php b/plugins/Goals/Pages.php index c9410f2807..2373ea82cd 100644 --- a/plugins/Goals/Pages.php +++ b/plugins/Goals/Pages.php @@ -8,7 +8,6 @@ */ namespace Piwik\Plugins\Goals; -use Piwik\Cache; use Piwik\Common; use Piwik\Piwik; use Piwik\Plugins\CoreVisualizations\Visualizations\JqplotGraph\Evolution; @@ -156,7 +155,9 @@ class Pages $config->setParameters(array('idGoal' => Piwik::LABEL_ID_GOAL_IS_ECOMMERCE_ORDER)); $config->setOrder(5); $config->setIsNotWidgetizable(); - $this->buildGoalByDimensionView(Piwik::LABEL_ID_GOAL_IS_ECOMMERCE_ORDER, $config); + + $extraParameters = [ 'segmented_visitor_log_segment_suffix' => 'visitEcommerceStatus==ordered' ]; + $this->buildGoalByDimensionView(Piwik::LABEL_ID_GOAL_IS_ECOMMERCE_ORDER, $config, $extraParameters); return array($config); } @@ -253,7 +254,7 @@ class Pages return $config; } - private function buildGoalByDimensionView($idGoal, WidgetContainerConfig $container) + private function buildGoalByDimensionView($idGoal, WidgetContainerConfig $container, $extraParameters = []) { $container->setLayout('ByDimension'); $ecommerce = ($idGoal == Piwik::LABEL_ID_GOAL_IS_ECOMMERCE_ORDER); @@ -302,6 +303,7 @@ class Pages $widget->setName($report['name']); } $widget->setParameters($params); + $widget->addParameters($extraParameters); $widget->setCategoryId($categoryText); $widget->setSubcategoryId($categoryText); $widget->setOrder($order); |