diff options
author | sgiehl <stefan@matomo.org> | 2022-11-09 10:54:58 +0300 |
---|---|---|
committer | sgiehl <stefan@matomo.org> | 2022-11-10 13:11:45 +0300 |
commit | f2f7fcbe6f4b73adbecd75ce60a6730b33a49dba (patch) | |
tree | 6d48268158eb8afa22a31e0fbbe8ca61c25d449a | |
parent | df92c9f705b7c29b758cba0f4f26c690ce34b049 (diff) |
use flattened report to fetch converting pagesm19960
-rw-r--r-- | plugins/Goals/Controller.php | 27 |
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(); |