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:
authorsgiehl <stefan@matomo.org>2022-11-09 10:54:58 +0300
committersgiehl <stefan@matomo.org>2022-11-10 13:11:45 +0300
commitf2f7fcbe6f4b73adbecd75ce60a6730b33a49dba (patch)
tree6d48268158eb8afa22a31e0fbbe8ca61c25d449a
parentdf92c9f705b7c29b758cba0f4f26c690ce34b049 (diff)
use flattened report to fetch converting pagesm19960
-rw-r--r--plugins/Goals/Controller.php27
1 files changed, 17 insertions, 10 deletions
diff --git a/plugins/Goals/Controller.php b/plugins/Goals/Controller.php
index 5122e30152..e53cc82c22 100644
--- a/plugins/Goals/Controller.php
+++ b/plugins/Goals/Controller.php
@@ -344,16 +344,23 @@ class Controller extends \Piwik\Plugin\Controller
$idGoalToProcess = AddColumnsProcessedMetricsGoal::GOALS_FULL_TABLE;
}
- $request = new Request("method=$apiMethod
- &format=original
- &format_metrics=0
- &filter_update_columns_when_show_all_goals=1
- &idGoal=$idGoalToProcess
- &filter_sort_order=desc
- &filter_sort_column=$columnNbConversions
- &showColumns=label,$columnNbConversions,$columnConversionRate" .
- // select a couple more in case some are not valid (ie. conversions==0 or they are "Keyword not defined")
- "&filter_limit=" . (self::COUNT_TOP_ROWS_TO_DISPLAY + 2));
+ $requestString = "method=$apiMethod
+ &format=original
+ &format_metrics=0
+ &filter_update_columns_when_show_all_goals=1
+ &idGoal=$idGoalToProcess
+ &filter_sort_order=desc
+ &filter_sort_column=$columnNbConversions
+ &showColumns=label,$columnNbConversions,$columnConversionRate" .
+ // select a couple more in case some are not valid (ie. conversions==0 or they are "Keyword not defined")
+ "&filter_limit=" . (self::COUNT_TOP_ROWS_TO_DISPLAY + 2);
+
+ if ($apiMethod == 'Actions.getEntryPageUrls') {
+ $requestString .= '&flat=1';
+ }
+
+ $request = new Request($requestString);
+
$datatable = $request->process();
$formatter = new Formatter();
$topDimension = array();