diff options
author | diosmosis <diosmosis@users.noreply.github.com> | 2019-08-07 00:16:13 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-07 00:16:13 +0300 |
commit | 8bc18861652ddcd64f8022318f0b8201ac7e9ba4 (patch) | |
tree | 73e65f15b3467cf8a3bd048bfba432c356ed85ba /plugins/Transitions | |
parent | be4540fd4c15118bf773683d6c7848b22af903a1 (diff) |
Handle ranking query others row properly in contents & events archiver. (#14622)
* Add more types of actions to ManyVisitsWithMockLocationProvider fixture.
* fix test change
* update expected test files
* Handle ranking query others row properly in contents & events archiver.
* Use custom ranking query specific others label and handle by default in DataArray::asDatatable().
* Updating expected test files.
* Use strict compare since label can be 0 apparently.
* Update expecred test files.
Diffstat (limited to 'plugins/Transitions')
-rw-r--r-- | plugins/Transitions/API.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/Transitions/API.php b/plugins/Transitions/API.php index 4c57d2722d..33c330f999 100644 --- a/plugins/Transitions/API.php +++ b/plugins/Transitions/API.php @@ -271,6 +271,7 @@ class API extends \Piwik\Plugin\API $types[Action::TYPE_DOWNLOAD] = 'downloads'; $rankingQuery = new RankingQuery($limitBeforeGrouping ? $limitBeforeGrouping : $this->limitBeforeGrouping); + $rankingQuery->setOthersLabel('Others'); $rankingQuery->addLabelColumn(array('name', 'url_prefix')); $rankingQuery->partitionResultIntoMultipleGroups('type', array_keys($types)); @@ -301,6 +302,7 @@ class API extends \Piwik\Plugin\API protected function queryExternalReferrers($idaction, $actionType, $logAggregator, $limitBeforeGrouping = false) { $rankingQuery = new RankingQuery($limitBeforeGrouping ? $limitBeforeGrouping : $this->limitBeforeGrouping); + $rankingQuery->setOthersLabel('Others'); // we generate a single column that contains the interesting data for each referrer. // the reason we cannot group by referer_* becomes clear when we look at search engine keywords. @@ -379,6 +381,7 @@ class API extends \Piwik\Plugin\API $keyIsSiteSearchAction = 2; $rankingQuery = new RankingQuery($limitBeforeGrouping ? $limitBeforeGrouping : $this->limitBeforeGrouping); + $rankingQuery->setOthersLabel('Others'); $rankingQuery->addLabelColumn(array('name', 'url_prefix')); $rankingQuery->setColumnToMarkExcludedRows('is_self'); $rankingQuery->partitionResultIntoMultipleGroups('action_partition', array($keyIsOther, $keyIsPageUrlAction, $keyIsSiteSearchAction)); |