diff options
Diffstat (limited to 'plugins')
11 files changed, 21 insertions, 12 deletions
diff --git a/plugins/Goals/Columns/Metrics/GoalSpecific/AverageOrderRevenue.php b/plugins/Goals/Columns/Metrics/GoalSpecific/AverageOrderRevenue.php index b490332af7..3adf911418 100644 --- a/plugins/Goals/Columns/Metrics/GoalSpecific/AverageOrderRevenue.php +++ b/plugins/Goals/Columns/Metrics/GoalSpecific/AverageOrderRevenue.php @@ -26,7 +26,7 @@ class AverageOrderRevenue extends GoalSpecificProcessedMetric { public function getName() { - return Goals::makeGoalColumn($this->idGoal, 'avg_order_revenue'); + return Goals::makeGoalColumn($this->idGoal, 'avg_order_revenue', false); } public function getTranslatedName() diff --git a/plugins/Goals/Columns/Metrics/GoalSpecific/ConversionRate.php b/plugins/Goals/Columns/Metrics/GoalSpecific/ConversionRate.php index 746811192e..75da8baa00 100644 --- a/plugins/Goals/Columns/Metrics/GoalSpecific/ConversionRate.php +++ b/plugins/Goals/Columns/Metrics/GoalSpecific/ConversionRate.php @@ -27,7 +27,7 @@ class ConversionRate extends GoalSpecificProcessedMetric { public function getName() { - return Goals::makeGoalColumn($this->idGoal, 'conversion_rate'); + return Goals::makeGoalColumn($this->idGoal, 'conversion_rate', false); } public function getTranslatedName() diff --git a/plugins/Goals/Columns/Metrics/GoalSpecific/Conversions.php b/plugins/Goals/Columns/Metrics/GoalSpecific/Conversions.php index fa6b6ccf2f..8ae81b9dba 100644 --- a/plugins/Goals/Columns/Metrics/GoalSpecific/Conversions.php +++ b/plugins/Goals/Columns/Metrics/GoalSpecific/Conversions.php @@ -21,7 +21,7 @@ class Conversions extends GoalSpecificProcessedMetric { public function getName() { - return Goals::makeGoalColumn($this->idGoal, 'nb_conversions'); + return Goals::makeGoalColumn($this->idGoal, 'nb_conversions', false); } public function getTranslatedName() diff --git a/plugins/Goals/Columns/Metrics/GoalSpecific/ItemsCount.php b/plugins/Goals/Columns/Metrics/GoalSpecific/ItemsCount.php index 05398fc0f4..787475ab49 100644 --- a/plugins/Goals/Columns/Metrics/GoalSpecific/ItemsCount.php +++ b/plugins/Goals/Columns/Metrics/GoalSpecific/ItemsCount.php @@ -21,7 +21,7 @@ class ItemsCount extends GoalSpecificProcessedMetric { public function getName() { - return Goals::makeGoalColumn($this->idGoal, 'items'); + return Goals::makeGoalColumn($this->idGoal, 'items', false); } public function getTranslatedName() diff --git a/plugins/Goals/Columns/Metrics/GoalSpecific/Revenue.php b/plugins/Goals/Columns/Metrics/GoalSpecific/Revenue.php index 18e3de2254..e8d6e06fa9 100644 --- a/plugins/Goals/Columns/Metrics/GoalSpecific/Revenue.php +++ b/plugins/Goals/Columns/Metrics/GoalSpecific/Revenue.php @@ -23,7 +23,7 @@ class Revenue extends GoalSpecificProcessedMetric { public function getName() { - return Goals::makeGoalColumn($this->idGoal, 'revenue'); + return Goals::makeGoalColumn($this->idGoal, 'revenue', false); } public function getTranslatedName() diff --git a/plugins/Goals/Columns/Metrics/GoalSpecific/RevenuePerVisit.php b/plugins/Goals/Columns/Metrics/GoalSpecific/RevenuePerVisit.php index 1391f2a99f..2e8f05e9eb 100644 --- a/plugins/Goals/Columns/Metrics/GoalSpecific/RevenuePerVisit.php +++ b/plugins/Goals/Columns/Metrics/GoalSpecific/RevenuePerVisit.php @@ -28,7 +28,7 @@ class RevenuePerVisit extends GoalSpecificProcessedMetric { public function getName() { - return Goals::makeGoalColumn($this->idGoal, 'revenue_per_visit'); + return Goals::makeGoalColumn($this->idGoal, 'revenue_per_visit', false); } public function getTranslatedName() diff --git a/plugins/Goals/Columns/Metrics/GoalSpecificProcessedMetric.php b/plugins/Goals/Columns/Metrics/GoalSpecificProcessedMetric.php index cdd36339da..53f7b895a6 100644 --- a/plugins/Goals/Columns/Metrics/GoalSpecificProcessedMetric.php +++ b/plugins/Goals/Columns/Metrics/GoalSpecificProcessedMetric.php @@ -76,6 +76,8 @@ abstract class GoalSpecificProcessedMetric extends ProcessedMetric { if ($this->idGoal == Piwik::LABEL_ID_GOAL_IS_ECOMMERCE_ORDER) { return Piwik::translate('Goals_EcommerceOrder'); + } else if ($this->idGoal == Piwik::LABEL_ID_GOAL_IS_ECOMMERCE_CART) { + return Piwik::translate('Goals_AbandonedCart'); } if (isset($this->idSite)) { diff --git a/plugins/Goals/Controller.php b/plugins/Goals/Controller.php index d24c42e7b2..16ad1f5358 100644 --- a/plugins/Goals/Controller.php +++ b/plugins/Goals/Controller.php @@ -236,10 +236,13 @@ class Controller extends \Piwik\Plugin\Controller } } - if (!empty($idGoal) && isset($this->goals[$idGoal])) { + if (!empty($idGoal) + && isset($this->goals[$idGoal]) + ) { $goalName = $this->goals[$idGoal]['name']; $columnTranslation = "$columnTranslation (" . $this->translator->translate('Goals_GoalX', "$goalName") . ")"; } + return $columnTranslation; } diff --git a/plugins/Goals/Goals.php b/plugins/Goals/Goals.php index 389e1f9b84..5cb133ee58 100644 --- a/plugins/Goals/Goals.php +++ b/plugins/Goals/Goals.php @@ -53,9 +53,13 @@ class Goals extends \Piwik\Plugin } } - public static function makeGoalColumn($idGoal, $column) + public static function makeGoalColumn($idGoal, $column, $forceInt = true) { - return 'goal_'. (int)$idGoal . '_' . $column; + if ($forceInt) { // in non-archiver code idGoal can be, eg, ecommerceOrder + $idGoal = (int) $idGoal; + } + + return 'goal_'. $idGoal . '_' . $column; } public static function getGoalColumns($idGoal) diff --git a/plugins/SegmentEditor/angularjs/segment-generator/segmentgenerator.controller.js b/plugins/SegmentEditor/angularjs/segment-generator/segmentgenerator.controller.js index 828011206f..3ebfbfb923 100644 --- a/plugins/SegmentEditor/angularjs/segment-generator/segmentgenerator.controller.js +++ b/plugins/SegmentEditor/angularjs/segment-generator/segmentgenerator.controller.js @@ -34,11 +34,11 @@ if(singleChar == true){ newMetric.segment = metric.substr(0,minPos); newMetric.matches = metric.substr(minPos,1); - newMetric.value = metric.substr(minPos+1); + newMetric.value = decodeURIComponent(metric.substr(minPos+1)); } else { newMetric.segment = metric.substr(0,minPos); newMetric.matches = metric.substr(minPos,2); - newMetric.value = metric.substr(minPos+2); + newMetric.value = decodeURIComponent(metric.substr(minPos+2)); } // if value is only "" -> change to empty string if(newMetric.value === '""') diff --git a/plugins/SegmentEditor/tests/Integration/SegmentFormatterTest.php b/plugins/SegmentEditor/tests/Integration/SegmentFormatterTest.php index 206a2e0c74..c5fa41fc2c 100644 --- a/plugins/SegmentEditor/tests/Integration/SegmentFormatterTest.php +++ b/plugins/SegmentEditor/tests/Integration/SegmentFormatterTest.php @@ -104,7 +104,7 @@ class SegmentFormatterTest extends IntegrationTestCase /** * @expectedException \Exception - * @expectedExceptionMessage The segment 'pageUrl=!1.0' is not valid. + * @expectedExceptionMessage The segment condition 'pageUrl=!1.0' is not valid. */ public function test_getHumanReadable_ShouldThrowAnException_IfSegmentCannotBeParsedBecauseOfInvalidFormat() { |