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:
-rw-r--r--core/DataTable/Filter/AddColumnsProcessedMetricsGoal.php32
-rw-r--r--plugins/Actions/API.php24
-rw-r--r--plugins/Actions/Reports/GetEntryPageTitles.php4
-rw-r--r--plugins/Actions/Reports/GetEntryPageUrls.php4
-rw-r--r--plugins/Actions/Reports/GetPageTitles.php4
-rw-r--r--plugins/Actions/Reports/GetPageUrls.php3
-rw-r--r--plugins/CoreHome/javascripts/dataTable.js10
-rw-r--r--plugins/CoreHome/javascripts/dataTable_rowactions.js3
-rw-r--r--plugins/Dashboard/javascripts/dashboardWidget.js2
-rw-r--r--plugins/Goals/API.php130
-rw-r--r--plugins/Goals/Controller.php5
-rw-r--r--plugins/Goals/Goals.php9
-rw-r--r--plugins/Goals/Pages.php11
-rw-r--r--plugins/Goals/Reports/BasePages.php49
-rw-r--r--plugins/Goals/Reports/GetPagesEntry.php61
-rw-r--r--plugins/Goals/Reports/GetPagesEntryTitles.php61
-rw-r--r--plugins/Goals/Reports/GetPagesTitles.php51
-rw-r--r--plugins/Goals/Reports/GetPagesUrl.php51
-rw-r--r--plugins/Goals/Visualizations/Goals.php173
-rw-r--r--plugins/Goals/Visualizations/GoalsEntryPages.php71
-rw-r--r--plugins/Goals/Visualizations/GoalsPages.php74
-rw-r--r--plugins/Goals/lang/en.json2
-rw-r--r--plugins/Goals/tests/System/TrackGoalsPagesTest.php16
-rw-r--r--plugins/Goals/tests/System/expected/test_trackGoals_pages__Actions.getEntryPageTitles_day.xml40
-rw-r--r--plugins/Goals/tests/System/expected/test_trackGoals_pages__Actions.getEntryPageUrls_day.xml41
-rw-r--r--plugins/Goals/tests/System/expected/test_trackGoals_pages__Actions.getPageTitles_day.xml117
-rw-r--r--plugins/Goals/tests/System/expected/test_trackGoals_pages__Actions.getPageUrls_day.xml121
-rw-r--r--plugins/Goals/tests/System/expected/test_trackGoals_pages__Goals.getPagesEntryTitles_day.xml204
-rw-r--r--plugins/Goals/tests/System/expected/test_trackGoals_pages__Goals.getPagesEntry_day.xml204
-rw-r--r--plugins/Goals/tests/System/expected/test_trackGoals_pages__Goals.getPagesTitles_day.xml199
-rw-r--r--plugins/Goals/tests/System/expected/test_trackGoals_pages__Goals.getPagesUrl_day.xml199
-rw-r--r--plugins/Goals/tests/UI/Goals_spec.js8
-rw-r--r--tests/PHPUnit/Framework/TestRequest/ApiTestConfig.php7
33 files changed, 566 insertions, 1424 deletions
diff --git a/core/DataTable/Filter/AddColumnsProcessedMetricsGoal.php b/core/DataTable/Filter/AddColumnsProcessedMetricsGoal.php
index 40d53ceb16..2ec9e1169c 100644
--- a/core/DataTable/Filter/AddColumnsProcessedMetricsGoal.php
+++ b/core/DataTable/Filter/AddColumnsProcessedMetricsGoal.php
@@ -66,6 +66,16 @@ use Piwik\Plugins\Goals\Columns\Metrics\RevenuePerVisit;
class AddColumnsProcessedMetricsGoal extends AddColumnsProcessedMetrics
{
/**
+ * Process metrics for entry page views
+ */
+ const GOALS_ENTRY_PAGES = -4;
+
+ /**
+ * Process for page views
+ */
+ const GOALS_PAGES = -3;
+
+ /**
* Process main goal metrics: conversion rate, revenue per visit
*/
const GOALS_MINIMAL_REPORT = -2;
@@ -136,19 +146,25 @@ class AddColumnsProcessedMetricsGoal extends AddColumnsProcessedMetrics
// When the table is displayed by clicking on the flag icon, we only display the columns
// Visits, Conversions, Per goal conversion rate, Revenue
if ($this->processOnlyIdGoal == self::GOALS_OVERVIEW) {
- continue;
+ continue;
}
$extraProcessedMetrics[] = new Conversions($idSite, $idGoal); // PerGoal\Conversions or GoalSpecific\
- $extraProcessedMetrics[] = new ConversionsAttrib($idSite, $idGoal); // PerGoal\Conversions or GoalSpecific\
- $extraProcessedMetrics[] = new ConversionsEntry($idSite, $idGoal); // PerGoal\Conversions or GoalSpecific\
$extraProcessedMetrics[] = new GoalSpecificRevenuePerVisit($idSite, $idGoal); // PerGoal\Revenue
- $extraProcessedMetrics[] = new GoalSpecificRevenuePerEntry($idSite, $idGoal); // PerGoal\Revenue entries
$extraProcessedMetrics[] = new Revenue($idSite, $idGoal); // PerGoal\Revenue
- $extraProcessedMetrics[] = new RevenueAttrib($idSite, $idGoal); // PerGoal\Revenue attrib
- $extraProcessedMetrics[] = new RevenueEntry($idSite, $idGoal); // PerGoal\Revenue entrances
- $extraProcessedMetrics[] = new ConversionEntryRate($idSite, $idGoal); // PerGoal\ConversionRate for entrances
- $extraProcessedMetrics[] = new ConversionPageRate($idSite, $idGoal); // PerGoal\ConversionRate for page uniq views
+
+ if ($this->processOnlyIdGoal == self::GOALS_PAGES) {
+ $extraProcessedMetrics[] = new ConversionsAttrib($idSite, $idGoal); // PerGoal\Conversions or GoalSpecific\
+ $extraProcessedMetrics[] = new RevenueAttrib($idSite, $idGoal); // PerGoal\Revenue attrib
+ $extraProcessedMetrics[] = new ConversionPageRate($idSite, $idGoal); // PerGoal\ConversionRate for page uniq views
+ }
+
+ if ($this->processOnlyIdGoal == self::GOALS_ENTRY_PAGES) {
+ $extraProcessedMetrics[] = new ConversionsEntry($idSite, $idGoal); // PerGoal\Conversions or GoalSpecific\
+ $extraProcessedMetrics[] = new GoalSpecificRevenuePerEntry($idSite, $idGoal); // PerGoal\Revenue entries
+ $extraProcessedMetrics[] = new RevenueEntry($idSite, $idGoal); // PerGoal\Revenue entrances
+ $extraProcessedMetrics[] = new ConversionEntryRate($idSite, $idGoal); // PerGoal\ConversionRate for entrances
+ }
if ($this->isEcommerce) {
$extraProcessedMetrics[] = new AverageOrderRevenue($idSite, $idGoal);
diff --git a/plugins/Actions/API.php b/plugins/Actions/API.php
index 7c69e8ffd6..09949baf19 100644
--- a/plugins/Actions/API.php
+++ b/plugins/Actions/API.php
@@ -172,6 +172,9 @@ class API extends \Piwik\Plugin\API
$dataTable = $this->getPageUrls($idSite, $period, $date, $segment, $expanded, $idSubtable, false, $flat, $includeGoals);
$this->filterNonEntryActions($dataTable);
+ if ($includeGoals) {
+ $this->filterActionDataTableEntryGoals($dataTable);
+ }
return $dataTable;
}
@@ -222,6 +225,9 @@ class API extends \Piwik\Plugin\API
$dataTable = $this->getPageTitles($idSite, $period, $date, $segment, $expanded, $idSubtable, $flat, $includeGoals);
$this->filterNonEntryActions($dataTable);
+ if ($includeGoals) {
+ $this->filterActionDataTableEntryGoals($dataTable);
+ }
return $dataTable;
}
@@ -484,6 +490,14 @@ class API extends \Piwik\Plugin\API
if (!$includeGoals) {
$dataTable->filter('Piwik\Plugins\Actions\DataTable\Filter\RemoveGoals');
+ } else {
+ $dataTable->queueFilter('Piwik\Plugins\Goals\DataTable\Filter\CalculateConversionPageRate');
+ $dataTable->queueFilter('ReplaceColumnNames');
+ $dataTable->queueFilter('Piwik\Plugins\Goals\DataTable\Filter\RemoveUnusedGoalRevenueColumns');
+ $colsToRemove = ['idaction', 'type', 'nb_conversions', 'revenue', 'nb_visits'];
+ $dataTable->queueFilter('ColumnDelete', array($colsToRemove));
+ $nestedColsToRemove = ['nb_conversions', 'nb_visits_converted', 'nb_conv_pages_before', 'nb_conversions_page_uniq'];
+ $dataTable->queueFilter('ColumnDelete', array($nestedColsToRemove, [], false, true));
}
$dataTable->filter('Piwik\Plugins\Actions\DataTable\Filter\Actions', array($isPageTitleType));
@@ -491,6 +505,16 @@ class API extends \Piwik\Plugin\API
return $dataTable;
}
+ private function filterActionDataTableEntryGoals($dataTable)
+ {
+ if ($dataTable) {
+ $dataTable->queueFilter('ReplaceColumnNames');
+ $dataTable->queueFilter('Piwik\Plugins\Goals\DataTable\Filter\RemoveUnusedGoalRevenueColumns');
+ $dataTable->queueFilter('ColumnDelete',
+ array($columnsToRemove = ['idaction', 'nb_visits', 'entry_nb_uniq_visitors', 'revenue', 'nb_conversions']));
+ }
+ }
+
/**
* Removes DataTable rows referencing actions that were never the first action of a visit.
*
diff --git a/plugins/Actions/Reports/GetEntryPageTitles.php b/plugins/Actions/Reports/GetEntryPageTitles.php
index 779f1918fe..8b5755bd18 100644
--- a/plugins/Actions/Reports/GetEntryPageTitles.php
+++ b/plugins/Actions/Reports/GetEntryPageTitles.php
@@ -38,8 +38,8 @@ class GetEntryPageTitles extends Base
);
$this->order = 6;
$this->actionToLoadSubTables = $this->action;
-
$this->subcategoryId = 'Actions_SubmenuPagesEntry';
+ $this->hasGoalMetrics = true;
}
public function configureWidgets(WidgetsList $widgetsList, ReportWidgetFactory $factory)
@@ -82,6 +82,8 @@ class GetEntryPageTitles extends Base
$this->addPageDisplayProperties($view);
$this->addBaseDisplayProperties($view);
+
+ $view->config->show_goals = true;
}
public function getRelatedReports()
diff --git a/plugins/Actions/Reports/GetEntryPageUrls.php b/plugins/Actions/Reports/GetEntryPageUrls.php
index 8966e76258..df6a70a8a3 100644
--- a/plugins/Actions/Reports/GetEntryPageUrls.php
+++ b/plugins/Actions/Reports/GetEntryPageUrls.php
@@ -40,8 +40,8 @@ class GetEntryPageUrls extends Base
$this->order = 3;
$this->actionToLoadSubTables = $this->action;
-
$this->subcategoryId = 'Actions_SubmenuPagesEntry';
+ $this->hasGoalMetrics = true;
}
public function getProcessedMetrics()
@@ -78,6 +78,8 @@ class GetEntryPageUrls extends Base
$this->addPageDisplayProperties($view);
$this->addBaseDisplayProperties($view);
+
+ $view->config->show_goals = true;
}
public function getRelatedReports()
diff --git a/plugins/Actions/Reports/GetPageTitles.php b/plugins/Actions/Reports/GetPageTitles.php
index de4a71e056..06a02debe2 100644
--- a/plugins/Actions/Reports/GetPageTitles.php
+++ b/plugins/Actions/Reports/GetPageTitles.php
@@ -40,8 +40,8 @@ class GetPageTitles extends Base
);
$this->actionToLoadSubTables = $this->action;
-
$this->subcategoryId = 'Actions_SubmenuPageTitles';
+ $this->hasGoalMetrics = true;
}
public function getMetrics()
@@ -80,6 +80,8 @@ class GetPageTitles extends Base
$this->addPageDisplayProperties($view);
$this->addBaseDisplayProperties($view);
+
+ $view->config->show_goals = true;
}
public function getRelatedReports()
diff --git a/plugins/Actions/Reports/GetPageUrls.php b/plugins/Actions/Reports/GetPageUrls.php
index 794848a8a5..58d60415fd 100644
--- a/plugins/Actions/Reports/GetPageUrls.php
+++ b/plugins/Actions/Reports/GetPageUrls.php
@@ -42,6 +42,7 @@ class GetPageUrls extends Base
);
$this->subcategoryId = 'General_Pages';
+ $this->hasGoalMetrics = true;
}
public function configureWidgets(WidgetsList $widgetsList, ReportWidgetFactory $factory)
@@ -79,6 +80,8 @@ class GetPageUrls extends Base
$this->addPageDisplayProperties($view);
$this->addBaseDisplayProperties($view);
+ $view->config->show_goals = true;
+
// related reports are only shown on performance page
if ($view->requestConfig->getRequestParam('performance') !== '1') {
$view->config->related_reports = [];
diff --git a/plugins/CoreHome/javascripts/dataTable.js b/plugins/CoreHome/javascripts/dataTable.js
index f8a9ae5408..4287092033 100644
--- a/plugins/CoreHome/javascripts/dataTable.js
+++ b/plugins/CoreHome/javascripts/dataTable.js
@@ -1362,9 +1362,7 @@ $.extend(DataTable.prototype, UIControl.prototype, {
if (!iconHighlighted
&& !(self.param.viewDataTable == 'table'
|| self.param.viewDataTable == 'tableAllColumns'
- || self.param.viewDataTable == 'tableGoals'
- || self.param.viewDataTable == 'tableGoalsEntryPages'
- || self.param.viewDataTable == 'tableGoalsPages')) {
+ || self.param.viewDataTable == 'tableGoals')) {
hideConfigurationIcon();
return;
}
@@ -1979,9 +1977,7 @@ $.extend(DataTable.prototype, UIControl.prototype, {
if (domElem.prev().is('h2')) {
h2 = domElem.prev();
}
- else if (this.param.viewDataTable == 'tableGoals'
- || this.param.viewDataTable == 'tableGoalsEntryPages'
- || this.param.viewDataTable == 'tableGoalsPages') {
+ else if (this.param.viewDataTable == 'tableGoals') {
h2 = $('#titleGoalsByDimension');
}
else if ($('h2', domElem)) {
@@ -2030,8 +2026,6 @@ var switchToEcommerceView = function (dataTable, viewDataTable) {
DataTable.registerFooterIconHandler('table', switchToHtmlTable);
DataTable.registerFooterIconHandler('tableAllColumns', switchToHtmlTable);
DataTable.registerFooterIconHandler('tableGoals', switchToHtmlTable);
-DataTable.registerFooterIconHandler('tableGoalsEntryPages', switchToHtmlTable);
-DataTable.registerFooterIconHandler('tableGoalsPages', switchToHtmlTable);
DataTable.registerFooterIconHandler('ecommerceOrder', switchToEcommerceView);
DataTable.registerFooterIconHandler('ecommerceAbandonedCart', switchToEcommerceView);
diff --git a/plugins/CoreHome/javascripts/dataTable_rowactions.js b/plugins/CoreHome/javascripts/dataTable_rowactions.js
index f271ac1daa..1ca1cbdf3b 100644
--- a/plugins/CoreHome/javascripts/dataTable_rowactions.js
+++ b/plugins/CoreHome/javascripts/dataTable_rowactions.js
@@ -326,8 +326,7 @@ DataTable_RowActions_RowEvolution.prototype.performAction = function (label, tr,
}
});
- if (this.dataTable && (this.dataTable.jsViewDataTable === 'tableGoals' || this.dataTable.jsViewDataTable === 'tableGoalsEntryPages'
- || this.dataTable.jsViewDataTable === 'tableGoalsPages')) {
+ if (this.dataTable && (this.dataTable.jsViewDataTable === 'tableGoals')) {
// When there is a idGoal parameter available, the user is currently viewing a Goal or Ecommerce page
// In this case we want to show the specific goal metrics in the row evolution
if (extraParams['idGoal']) {
diff --git a/plugins/Dashboard/javascripts/dashboardWidget.js b/plugins/Dashboard/javascripts/dashboardWidget.js
index 9d217ab568..890eb7ef28 100644
--- a/plugins/Dashboard/javascripts/dashboardWidget.js
+++ b/plugins/Dashboard/javascripts/dashboardWidget.js
@@ -37,7 +37,7 @@
onRefresh: null,
onMaximise: null,
onMinimise: null,
- autoMaximiseVisualizations: ['tableAllColumns', 'tableGoals', 'tableGoalsEntryPages', 'tableGoalsPages']
+ autoMaximiseVisualizations: ['tableAllColumns', 'tableGoals']
},
/**
diff --git a/plugins/Goals/API.php b/plugins/Goals/API.php
index d3dd615509..c361ab323e 100644
--- a/plugins/Goals/API.php
+++ b/plugins/Goals/API.php
@@ -778,136 +778,6 @@ class API extends \Piwik\Plugin\API
}
/**
- * Gets a DataTable that maps pages to the count of conversions that occurred on visits
- * where the page was viewed before conversion for the specified site, date range, segment and goal.
- *
- * @param int $idSite The site to select data from.
- * @param string $period The period type.
- * @param string $date The date type.
- * @param string|bool $segment The segment.
- * @param int|bool $idGoal The id of the goal to get data for. If this is set to false,
- * data for every goal that belongs to $idSite is returned.
- *
- * @return bool|DataTable
- */
- public function getPagesUrl($idSite, $period, $date, $segment = false, $idGoal = false)
- {
- Piwik::checkUserHasViewAccess($idSite);
- $dataTable = Archive::createDataTableFromArchive('Actions_actions_url', $idSite, $period, $date, $segment);
- $this->applyPagesFilters($dataTable, $idGoal);
-
- return $dataTable;
- }
-
- /**
- * Gets a DataTable that maps page titles to the count of conversions that occurred on visits
- * where the page was viewed before conversion for the specified site, date range, segment and goal.
- *
- * @param int $idSite The site to select data from.
- * @param string $period The period type.
- * @param string $date The date type.
- * @param string|bool $segment The segment.
- * @param int|bool $idGoal The id of the goal to get data for. If this is set to false,
- * data for every goal that belongs to $idSite is returned.
- *
- * @return bool|DataTable
- */
- public function getPagesTitles($idSite, $period, $date, $segment = false, $idGoal = false)
- {
- Piwik::checkUserHasViewAccess($idSite);
- $dataTable = Archive::createDataTableFromArchive('Actions_actions', $idSite, $period, $date, $segment);
- $this->applyPagesFilters($dataTable, $idGoal);
-
- return $dataTable;
- }
-
- /**
- * Apply datatable filters for page reports
- *
- * @param $dataTable
- * @param $idGoal
- *
- * @return bool|DataTable
- */
- private function applyPagesFilters($dataTable, $idGoal)
- {
- if ($dataTable) {
- $dataTable->queueFilter('Piwik\Plugins\Goals\DataTable\Filter\CalculateConversionPageRate');
- $dataTable->queueFilter('ReplaceColumnNames');
- $dataTable->queueFilter('Piwik\Plugins\Goals\DataTable\Filter\RemoveUnusedGoalRevenueColumns');
- $colsToRemove = ['idaction', 'type', 'nb_conversions', 'revenue', 'nb_visits'];
- $dataTable->queueFilter('ColumnDelete', array($colsToRemove));
- $nestedColsToRemove = ['nb_conversions', 'nb_visits_converted', 'nb_conv_pages_before', 'nb_conversions_page_uniq'];
- $dataTable->queueFilter('ColumnDelete', array($nestedColsToRemove, [], false, true));
- }
-
- return $dataTable;
- }
-
- /**
- * Gets a DataTable that maps entry pages to the count of conversions that occurred on visits that started on
- * each entry page and resulted in a conversion, for the specified site, date range, segment and goal.
- *
- * @param int $idSite The site to select data from.
- * @param string $period The period type.
- * @param string $date The date type.
- * @param string|bool $segment The segment.
- * @param int|bool $idGoal The id of the goal to get data for. If this is set to false,
- * data for every goal that belongs to $idSite is returned.
- *
- * @return bool|DataTable
- */
- public function getPagesEntry($idSite, $period, $date, $segment = false, $idGoal = false)
- {
- Piwik::checkUserHasViewAccess($idSite);
- $dataTable = Archive::createDataTableFromArchive('Actions_actions_url', $idSite, $period, $date, $segment);
- $this->applyPagesEntryFilters($dataTable);
-
- return $dataTable;
- }
-
- /**
- * Gets a DataTable that maps entry pages by titles to the count of conversions that occurred on visits that started
- * on each entry page and resulted in a conversion, for the specified site, date range, segment and goal.
- *
- * @param int $idSite The site to select data from.
- * @param string $period The period type.
- * @param string $date The date type.
- * @param string|bool $segment The segment.
- * @param int|bool $idGoal The id of the goal to get data for. If this is set to false,
- * data for every goal that belongs to $idSite is returned.
- *
- * @return bool|DataTable
- */
- public function getPagesEntryTitles($idSite, $period, $date, $segment = false, $idGoal = false)
- {
- Piwik::checkUserHasViewAccess($idSite);
- $dataTable = Archive::createDataTableFromArchive('Actions_actions', $idSite, $period, $date, $segment);
- $this->applyPagesEntryFilters($dataTable);
-
- return $dataTable;
- }
-
- /**
- * Apply datatable filters for entry page reports
- *
- * @param $dataTable
- *
- * @return bool|DataTable
- */
- private function applyPagesEntryFilters($dataTable)
- {
- if ($dataTable) {
- $dataTable->queueFilter('ReplaceColumnNames');
- $dataTable->queueFilter('Piwik\Plugins\Goals\DataTable\Filter\RemoveUnusedGoalRevenueColumns');
- $dataTable->queueFilter('ColumnDelete',
- array($columnsToRemove = ['idaction', 'nb_visits', 'entry_nb_uniq_visitors', 'revenue', 'nb_conversions']));
- }
-
- return $dataTable;
- }
-
- /**
* Enhances the dataTable with Items attributes found in the Custom Variables report.
*
* @param $dataTable
diff --git a/plugins/Goals/Controller.php b/plugins/Goals/Controller.php
index 65496bad69..6a65135230 100644
--- a/plugins/Goals/Controller.php
+++ b/plugins/Goals/Controller.php
@@ -289,7 +289,7 @@ class Controller extends \Piwik\Plugin\Controller
}
$topDimensionsToLoad += array(
- 'entry_page' => 'Goals.getPagesEntry',
+ 'entry_page' => 'Actions.getEntryPageUrls',
);
$topDimensions = array();
@@ -301,7 +301,8 @@ class Controller extends \Piwik\Plugin\Controller
&filter_sort_order=desc
&filter_sort_column=$columnNbConversions" .
// 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));
+ "&filter_limit=" . (self::COUNT_TOP_ROWS_TO_DISPLAY + 2).
+ ($dimensionName == 'entry_page' ? '&$includeGoals=1' : ''));
$datatable = $request->process();
$topDimension = array();
$count = 0;
diff --git a/plugins/Goals/Goals.php b/plugins/Goals/Goals.php
index 446d4d258e..df653821f2 100644
--- a/plugins/Goals/Goals.php
+++ b/plugins/Goals/Goals.php
@@ -305,13 +305,10 @@ class Goals extends \Piwik\Plugin
'name' => $report->getName(),
'module' => $report->getModule(),
'action' => $report->getAction(),
- 'parameters' => $report->getParameters()
+ 'parameters' => $report->getParameters(),
+ 'order' => $report->getOrder()
);
- if ($report instanceof BasePages) {
- $r['viewDataTable'] = $report->getDefaultTypeViewDataTable();
- }
-
$reportsWithGoals[] = $r;
}
}
@@ -395,6 +392,6 @@ class Goals extends \Piwik\Plugin
$translationKeys[] = 'Goals_TimeInMinutes';
$translationKeys[] = 'Goals_Pattern';
$translationKeys[] = 'Goals_ClickToViewThisGoal';
- $translationKeys[] = 'Goals_CategoryTextPages';
+ $translationKeys[] = 'Goals_CategoryTextGeneral_Actions';
}
}
diff --git a/plugins/Goals/Pages.php b/plugins/Goals/Pages.php
index cb22954dda..cef5939b83 100644
--- a/plugins/Goals/Pages.php
+++ b/plugins/Goals/Pages.php
@@ -275,11 +275,12 @@ class Pages
$categoryText = $translationHelper->translateGoalMetricCategory($category);
}
- foreach ($reports as $report) {
+ // Sort reports in each category to respect the report order property
+ uasort($reports, function ($a, $b) {
+ return $a['order'] <=> $b['order'];
+ });
- if ($report['name'] === Piwik::translate('Goals_EntryPagesTitles')) {
- continue;
- }
+ foreach ($reports as $report) {
$order++;
@@ -329,7 +330,7 @@ class Pages
if (is_null($order)) {
$order = array(
'Referrers_Referrers',
- 'Pages',
+ 'General_Actions',
'General_Visit',
'General_Visitors',
'VisitsSummary_VisitsSummary',
diff --git a/plugins/Goals/Reports/BasePages.php b/plugins/Goals/Reports/BasePages.php
deleted file mode 100644
index 495e98498e..0000000000
--- a/plugins/Goals/Reports/BasePages.php
+++ /dev/null
@@ -1,49 +0,0 @@
-<?php
-/**
- * Matomo - free/libre analytics platform
- *
- * @link https://matomo.org
- * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- *
- */
-namespace Piwik\Plugins\Goals\Reports;
-
-use Piwik\Piwik;
-use Piwik\Plugin\ViewDataTable;
-use Piwik\Plugins\Actions\Columns\EntryPageUrl;
-use Piwik\Plugins\Goals\Visualizations\GoalsEntryPages;
-use Piwik\Plugin\ReportsProvider;
-use Piwik\Plugins\CoreVisualizations\Visualizations\HtmlTable;
-
-class BasePages extends Base
-{
-
- protected $defaultSortColumn = '';
-
- protected function init()
- {
- parent::init();
- $this->categoryId = 'Pages';
- $this->hasGoalMetrics = true;
- $this->parameters = null;
- $this->orderGoal = 51;
- }
-
- public function configureReportMetadata(&$availableReports, $infos)
- {
- if (!$this->isEnabled()) {
- return;
- }
-
- if (null !== $this->getIdSiteFromInfos($infos)) {
- parent::configureReportMetadata($availableReports, $infos);
- }
-
- $name = $this->name;
-
- $this->addReportMetadataForEachGoal($availableReports, $infos, function ($goal) use ($name) {
- return $goal['name'] . ' - ' . $name;
- });
- }
-
-}
diff --git a/plugins/Goals/Reports/GetPagesEntry.php b/plugins/Goals/Reports/GetPagesEntry.php
deleted file mode 100644
index 5ed0b766ba..0000000000
--- a/plugins/Goals/Reports/GetPagesEntry.php
+++ /dev/null
@@ -1,61 +0,0 @@
-<?php
-/**
- * Matomo - free/libre analytics platform
- *
- * @link https://matomo.org
- * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- *
- */
-namespace Piwik\Plugins\Goals\Reports;
-
-use Piwik\Piwik;
-use Piwik\Plugin\ViewDataTable;
-use Piwik\Plugins\Actions\Columns\EntryPageUrl;
-use Piwik\Plugins\Goals\Visualizations\GoalsEntryPages;
-use Piwik\Plugin\ReportsProvider;
-use Piwik\Plugins\CoreVisualizations\Visualizations\HtmlTable;
-
-class GetPagesEntry extends BasePages
-{
-
- protected function init()
- {
- parent::init();
- $this->name = Piwik::translate('Goals_EntryPages');
- $this->documentation = Piwik::translate('Goals_EntryPagesReportDocumentation');
- $this->dimension = new EntryPageUrl();
- $this->metrics = array( 'nb_conversions_entry', 'nb_visits_converted', 'revenue_entry', 'entry_nb_visits');
- $this->order = 2;
- }
-
- public function configureView(ViewDataTable $view)
- {
-
- $view->config->show_exclude_low_population = false;
-
- if ($view->isViewDataTableId(HtmlTable::ID)) {
- $view->config->disable_subtable_when_show_goals = true;
- }
-
- $view->requestConfig->filter_sort_column = 'entry_nb_visits';
- $view->requestConfig->filter_sort_order = 'asc';
- $view->requestConfig->filter_limit = 25;
-
- $view->config->addTranslations(array('label' => $this->dimension->getName(),
- 'entry_nb_visits' => Piwik::translate('General_ColumnEntrances')));
-
- }
-
- public function getDefaultTypeViewDataTable()
- {
- return GoalsEntryPages::ID;
- }
-
- public function getRelatedReports()
- {
- return array(
- ReportsProvider::factory('Goals', 'getPagesEntryTitles'),
- );
- }
-
-}
diff --git a/plugins/Goals/Reports/GetPagesEntryTitles.php b/plugins/Goals/Reports/GetPagesEntryTitles.php
deleted file mode 100644
index ecf637a5f7..0000000000
--- a/plugins/Goals/Reports/GetPagesEntryTitles.php
+++ /dev/null
@@ -1,61 +0,0 @@
-<?php
-/**
- * Matomo - free/libre analytics platform
- *
- * @link https://matomo.org
- * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- *
- */
-namespace Piwik\Plugins\Goals\Reports;
-
-use Piwik\Piwik;
-use Piwik\Plugin\ViewDataTable;
-use Piwik\Plugins\Actions\Columns\EntryPageUrl;
-use Piwik\Plugins\Goals\Visualizations\GoalsEntryPages;
-use Piwik\Plugin\ReportsProvider;
-use Piwik\Plugins\CoreVisualizations\Visualizations\HtmlTable;
-
-class GetPagesEntryTitles extends BasePages
-{
-
- protected function init()
- {
- parent::init();
- $this->name = Piwik::translate('Goals_EntryPagesTitles');
- $this->documentation = Piwik::translate('Goals_EntryPagesReportDocumentation');
- $this->dimension = new EntryPageUrl();
- $this->metrics = array( 'nb_conversions_entry', 'nb_visits_converted', 'revenue_entry', 'entry_nb_visits');
- $this->order = 4;
- }
-
- public function configureView(ViewDataTable $view)
- {
-
- $view->config->show_exclude_low_population = false;
-
- if ($view->isViewDataTableId(HtmlTable::ID)) {
- $view->config->disable_subtable_when_show_goals = true;
- }
-
- $view->requestConfig->filter_sort_column = 'entry_nb_visits';
- $view->requestConfig->filter_sort_order = 'asc';
- $view->requestConfig->filter_limit = 25;
-
- $view->config->addTranslations(array('label' => $this->dimension->getName(),
- 'entry_nb_visits' => Piwik::translate('General_ColumnEntrances')));
-
- }
-
- public function getDefaultTypeViewDataTable()
- {
- return GoalsEntryPages::ID;
- }
-
- public function getRelatedReports()
- {
- return array(
- ReportsProvider::factory('Goals', 'getPagesEntry'),
- );
- }
-
-}
diff --git a/plugins/Goals/Reports/GetPagesTitles.php b/plugins/Goals/Reports/GetPagesTitles.php
deleted file mode 100644
index c3f63d9d4b..0000000000
--- a/plugins/Goals/Reports/GetPagesTitles.php
+++ /dev/null
@@ -1,51 +0,0 @@
-<?php
-/**
- * Matomo - free/libre analytics platform
- *
- * @link https://matomo.org
- * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- *
- */
-namespace Piwik\Plugins\Goals\Reports;
-
-use Piwik\Piwik;
-use Piwik\Plugin\ViewDataTable;
-use Piwik\Plugins\Actions\Columns\PageTitle;
-use Piwik\Plugins\Goals\Visualizations\GoalsPages;
-use Piwik\Plugins\CoreVisualizations\Visualizations\HtmlTable;
-
-class GetPagesTitles extends BasePages
-{
-
- protected function init()
- {
- parent::init();
- $this->name = Piwik::translate('Goals_PageTitles');
- $this->documentation = Piwik::translate('Goals_PageTitlesReportDocumentation');
- $this->dimension = new PageTitle();
- $this->order = 3;
- }
-
- public function configureView(ViewDataTable $view)
- {
-
- $view->config->show_exclude_low_population = false;
-
- if ($view->isViewDataTableId(HtmlTable::ID)) {
- $view->config->disable_subtable_when_show_goals = true;
- }
-
- $view->requestConfig->filter_sort_column = 'nb_hits';
- $view->requestConfig->filter_sort_order = 'asc';
- $view->requestConfig->filter_limit = 25;
-
- $view->config->addTranslations(array('label' => $this->dimension->getName(),
- 'nb_hits' => Piwik::translate('General_ColumnUniquePageviews')));
- }
-
- public function getDefaultTypeViewDataTable()
- {
- return GoalsPages::ID;
- }
-
-}
diff --git a/plugins/Goals/Reports/GetPagesUrl.php b/plugins/Goals/Reports/GetPagesUrl.php
deleted file mode 100644
index bcbbf2a8c3..0000000000
--- a/plugins/Goals/Reports/GetPagesUrl.php
+++ /dev/null
@@ -1,51 +0,0 @@
-<?php
-/**
- * Matomo - free/libre analytics platform
- *
- * @link https://matomo.org
- * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- *
- */
-namespace Piwik\Plugins\Goals\Reports;
-
-use Piwik\Piwik;
-use Piwik\Plugin\ViewDataTable;
-use Piwik\Plugins\Actions\Columns\PageUrl;
-use Piwik\Plugins\CoreVisualizations\Visualizations\HtmlTable;
-use Piwik\Plugins\Goals\Visualizations\GoalsPages;
-
-class GetPagesUrl extends BasePages
-{
-
- protected function init()
- {
- parent::init();
- $this->name = Piwik::translate('General_Pages');
- $this->documentation = Piwik::translate('Goals_PagesReportDocumentation');
- $this->dimension = new PageUrl();
- $this->order = 1;
- }
-
- public function configureView(ViewDataTable $view)
- {
-
- $view->config->show_exclude_low_population = false;
-
- if ($view->isViewDataTableId(HtmlTable::ID)) {
- $view->config->disable_subtable_when_show_goals = true;
- }
-
- $view->requestConfig->filter_sort_column = 'nb_hits';
- $view->requestConfig->filter_sort_order = 'asc';
- $view->requestConfig->filter_limit = 25;
-
- $view->config->addTranslations(array('label' => $this->dimension->getName(),
- 'nb_hits' => Piwik::translate('General_ColumnUniquePageviews')));
- }
-
- public function getDefaultTypeViewDataTable()
- {
- return GoalsPages::ID;
- }
-
-}
diff --git a/plugins/Goals/Visualizations/Goals.php b/plugins/Goals/Visualizations/Goals.php
index cc49507d74..5d6ce9a5f8 100644
--- a/plugins/Goals/Visualizations/Goals.php
+++ b/plugins/Goals/Visualizations/Goals.php
@@ -30,8 +30,27 @@ class Goals extends HtmlTable
const FOOTER_ICON = 'icon-goal';
const FOOTER_ICON_TITLE = 'General_DisplayTableWithGoalMetrics';
+ const GOALS_DISPLAY_NORMAL = 0;
+ const GOALS_DISPLAY_PAGES = 1;
+ const GOALS_DISPLAY_ENTRY_PAGES = 2;
+
+ private $displayType = self::GOALS_DISPLAY_NORMAL;
+
public function beforeLoadDataTable()
{
+ // Check if one of the pages display types should be used
+ $requestMethod = $this->requestConfig->getApiModuleToRequest().'.'.$this->requestConfig->getApiMethodToRequest();
+ if (in_array($requestMethod, ['Actions.getPageUrls', 'Actions.getPageTitles'])) {
+ $this->displayType = self::GOALS_DISPLAY_PAGES;
+ $this->requestConfig->request_parameters_to_modify['includeGoals'] = true;
+ $this->requestConfig->request_parameters_to_modify['idGoal'] = -3;
+
+ } else if (in_array($requestMethod, ['Actions.getEntryPageUrls', 'Actions.getEntryPageTitles'])) {
+ $this->displayType = self::GOALS_DISPLAY_ENTRY_PAGES;
+ $this->requestConfig->request_parameters_to_modify['includeGoals'] = true;
+ $this->requestConfig->request_parameters_to_modify['idGoal'] = -4;
+ }
+
parent::beforeLoadDataTable();
$this->config->show_totals_row = false;
@@ -51,7 +70,6 @@ class Goals extends HtmlTable
$this->config->datatable_css_class = 'dataTableVizGoals';
$this->config->show_exclude_low_population = true;
- $this->config->metrics_documentation['nb_visits'] = Piwik::translate('Goals_ColumnVisits');
if (1 == Common::getRequestVar('documentationForGoalsPage', 0, 'int')) {
// TODO: should not use query parameter
@@ -59,6 +77,21 @@ class Goals extends HtmlTable
array('<br />', '<br />', '<a href="https://matomo.org/docs/tracking-goals-web-analytics/" rel="noreferrer noopener" target="_blank">', '</a>'));
}
+ if ($this->displayType == self::GOALS_DISPLAY_NORMAL) {
+ $this->config->metrics_documentation['nb_visits'] = Piwik::translate('Goals_ColumnVisits');
+ }
+
+ if ($this->displayType == self::GOALS_DISPLAY_PAGES) {
+ $this->removeExcludedColumns();
+ $this->config->addTranslation('nb_hits', Piwik::translate('General_ColumnUniquePageviews'));
+ $this->config->metrics_documentation['nb_hits'] = Piwik::translate('General_ColumnUniquePageviewsDocumentation');
+ }
+
+ if ($this->displayType == self::GOALS_DISPLAY_ENTRY_PAGES) {
+ $this->removeExcludedColumns();
+ $this->config->metrics_documentation['entry_nb_visits'] = Piwik::translate('General_ColumnEntrancesDocumentation');
+ }
+
parent::beforeRender();
}
@@ -119,46 +152,138 @@ class Goals extends HtmlTable
$allGoals = $this->getGoals($idSite);
// set view properties
- $this->config->columns_to_display = array('label', 'nb_visits');
+ if ($this->displayType == self::GOALS_DISPLAY_NORMAL) {
+ $this->config->columns_to_display = array('label', 'nb_visits');
- foreach ($allGoals as $goal) {
- $column = "goal_{$goal['idgoal']}_conversion_rate";
- $this->config->columns_to_display[] = $column;
+ foreach ($allGoals as $goal) {
+ $column = "goal_{$goal['idgoal']}_conversion_rate";
+ $this->config->columns_to_display[] = $column;
+ }
+
+ $this->config->columns_to_display[] = 'revenue_per_visit';
+ }
+
+ if ($this->displayType == self::GOALS_DISPLAY_PAGES) {
+ $this->config->columns_to_display = array('label', 'nb_hits');
+ $goalColumnTemplates = array(
+ 'goal_%s_nb_conversions_attrib',
+ 'goal_%s_revenue_attrib',
+ 'goal_%s_nb_conversions_page_rate',
+ );
+
+ // set columns to display (columns of same type but different goals will be next to each other,
+ // ie, goal_0_nb_conversions, goal_1_nb_conversions, etc.)
+ foreach ($allGoals as $goal) {
+ foreach ($goalColumnTemplates as $columnTemplate) {
+ $this->config->columns_to_display[] = sprintf($columnTemplate, $goal['idgoal']);
+ }
+ }
+ }
+
+ if ($this->displayType == self::GOALS_DISPLAY_ENTRY_PAGES) {
+ $this->config->columns_to_display = array('label', 'entry_nb_visits');
+
+ $goalColumnTemplates = array(
+ 'goal_%s_nb_conversions_entry',
+ 'goal_%s_nb_conversions_entry_rate',
+ 'goal_%s_revenue_entry',
+ 'goal_%s_revenue_per_entry',
+ );
+
+ // set columns to display (columns of same type but different goals will be next to each other,
+ // ie, goal_0_nb_conversions, goal_1_nb_conversions, etc.)
+ foreach ($allGoals as $goal) {
+ foreach ($goalColumnTemplates as $columnTemplate) {
+ $this->config->columns_to_display[] = sprintf($columnTemplate, $goal['idgoal']);
+ }
+ }
}
- $this->config->columns_to_display[] = 'revenue_per_visit';
}
protected function setPropertiesForGoals($idSite, $idGoals)
{
$allGoals = $this->getGoals($idSite);
- if ('all' == $idGoals) {
- $idGoals = array_keys($allGoals);
- } else {
- // only sort by a goal's conversions if not showing all goals (for FULL_REPORT)
- $this->requestConfig->filter_sort_column = 'goal_' . reset($idGoals) . '_nb_conversions';
- $this->requestConfig->filter_sort_order = 'desc';
+ if ($this->displayType == self::GOALS_DISPLAY_NORMAL) {
+ if ('all' == $idGoals) {
+ $idGoals = array_keys($allGoals);
+ } else {
+ // only sort by a goal's conversions if not showing all goals (for FULL_REPORT)
+ $this->requestConfig->filter_sort_column = 'goal_'.reset($idGoals).'_nb_conversions';
+ $this->requestConfig->filter_sort_order = 'desc';
+ }
+
+ $this->config->columns_to_display = array('label', 'nb_visits');
+
+ $goalColumnTemplates = array(
+ 'goal_%s_nb_conversions',
+ 'goal_%s_conversion_rate',
+ 'goal_%s_revenue',
+ 'goal_%s_revenue_per_visit',
+ );
+
+ // set columns to display (columns of same type but different goals will be next to each other,
+ // ie, goal_0_nb_conversions, goal_1_nb_conversions, etc.)
+ foreach ($goalColumnTemplates as $columnTemplate) {
+ foreach ($idGoals as $idGoal) {
+ $this->config->columns_to_display[] = sprintf($columnTemplate, $idGoal);
+ }
+ }
+
+ $this->config->columns_to_display[] = 'revenue_per_visit';
}
- $this->config->columns_to_display = array('label', 'nb_visits');
+ if ($this->displayType == self::GOALS_DISPLAY_PAGES) {
+ if ('all' === $idGoals) {
+ $idGoals = array_keys($allGoals);
+ $this->requestConfig->filter_sort_column = 'nb_hits';
+ } else {
+ // only sort by a goal's conversions if not showing all goals (for FULL_REPORT)
+ $this->requestConfig->filter_sort_column = 'goal_' . reset($idGoals) . '_nb_conversions_attrib';
+ }
+ $this->requestConfig->filter_sort_order = 'desc';
+
+ $this->config->columns_to_display = array('label', 'nb_hits');
+ $goalColumnTemplates = array(
+ 'goal_%s_nb_conversions_attrib',
+ 'goal_%s_revenue_attrib',
+ 'goal_%s_nb_conversions_page_rate',
+ );
- $goalColumnTemplates = array(
- 'goal_%s_nb_conversions',
- 'goal_%s_conversion_rate',
- 'goal_%s_revenue',
- 'goal_%s_revenue_per_visit',
- );
+ // set columns to display (columns of same type but different goals will be next to each other,
+ // ie, goal_0_nb_conversions, goal_1_nb_conversions, etc.)
+ foreach ($idGoals as $idGoal) {
+ foreach ($goalColumnTemplates as $columnTemplate) {
+ $this->config->columns_to_display[] = sprintf($columnTemplate, $idGoal);
+ }
+ }
+ }
+
+ if ($this->displayType == self::GOALS_DISPLAY_ENTRY_PAGES) {
+ if ('all' === $idGoals) {
+ $idGoals = array_keys($allGoals);
+ $this->requestConfig->filter_sort_column = 'entry_nb_visits';
+ } else {
+ // only sort by a goal's conversions if not showing all goals (for FULL_REPORT)
+ $this->requestConfig->filter_sort_column = 'goal_' . reset($idGoals) . '_nb_conversions_entry';
+ }
+ $this->requestConfig->filter_sort_order = 'desc';
+ $this->config->columns_to_display = array('label', 'entry_nb_visits');
+ $goalColumnTemplates = array(
+ 'goal_%s_nb_conversions_entry',
+ 'goal_%s_nb_conversions_entry_rate',
+ 'goal_%s_revenue_entry',
+ 'goal_%s_revenue_per_entry',
+ );
- // set columns to display (columns of same type but different goals will be next to each other,
- // ie, goal_0_nb_conversions, goal_1_nb_conversions, etc.)
- foreach ($goalColumnTemplates as $columnTemplate) {
foreach ($idGoals as $idGoal) {
- $this->config->columns_to_display[] = sprintf($columnTemplate, $idGoal);
+ foreach ($goalColumnTemplates as $columnTemplate) {
+ $this->config->columns_to_display[] = sprintf($columnTemplate, $idGoal);
+ }
}
}
- $this->config->columns_to_display[] = 'revenue_per_visit';
}
protected $goalsForCurrentSite = null;
diff --git a/plugins/Goals/Visualizations/GoalsEntryPages.php b/plugins/Goals/Visualizations/GoalsEntryPages.php
deleted file mode 100644
index 94817d4fa1..0000000000
--- a/plugins/Goals/Visualizations/GoalsEntryPages.php
+++ /dev/null
@@ -1,71 +0,0 @@
-<?php
-/**
- * Matomo - free/libre analytics platform
- *
- * @link https://matomo.org
- * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */
-
-namespace Piwik\Plugins\Goals\Visualizations;
-
-use Piwik\Piwik;
-
-/**
- * DataTable Visualization that derives from HtmlTable and sets shows goal columns for page entries
- */
-class GoalsEntryPages extends Goals
-{
- const ID = 'tableGoalsEntryPages';
-
- public function beforeRender()
- {
- $this->removeExcludedColumns();
- $this->config->metrics_documentation['entry_nb_visits'] = Piwik::translate('General_ColumnEntrancesDocumentation');
- parent::beforeRender();
- }
-
- protected function setPropertiesForGoalsOverview($idSite)
- {
- $allGoals = $this->getGoals($idSite);
-
- // set view properties
- $this->config->columns_to_display = array('label', 'entry_nb_visits');
-
- foreach ($allGoals as $goal) {
- $column = "goal_{$goal['idgoal']}_nb_conversions_entry_rate";
- $this->config->columns_to_display[] = $column;
- }
-
- $this->config->columns_to_display[] = 'revenue_per_entry';
- }
-
- protected function setPropertiesForGoals($idSite, $idGoals)
- {
- $allGoals = $this->getGoals($idSite);
-
- if ('all' === $idGoals) {
- $idGoals = array_keys($allGoals);
- $this->requestConfig->filter_sort_column = 'entry_nb_visits';
- } else {
- // only sort by a goal's conversions if not showing all goals (for FULL_REPORT)
- $this->requestConfig->filter_sort_column = 'goal_' . reset($idGoals) . '_nb_conversions_entry';
- }
- $this->requestConfig->filter_sort_order = 'desc';
-
- $this->config->columns_to_display = array('label', 'entry_nb_visits');
-
- $goalColumnTemplates = array(
- 'goal_%s_nb_conversions_entry',
- 'goal_%s_nb_conversions_entry_rate',
- 'goal_%s_revenue_entry',
- 'goal_%s_revenue_per_entry',
- );
-
- foreach ($idGoals as $idGoal) {
- foreach ($goalColumnTemplates as $columnTemplate) {
- $this->config->columns_to_display[] = sprintf($columnTemplate, $idGoal);
- }
- }
- }
-
-}
diff --git a/plugins/Goals/Visualizations/GoalsPages.php b/plugins/Goals/Visualizations/GoalsPages.php
deleted file mode 100644
index 38a3fc8fef..0000000000
--- a/plugins/Goals/Visualizations/GoalsPages.php
+++ /dev/null
@@ -1,74 +0,0 @@
-<?php
-/**
- * Matomo - free/libre analytics platform
- *
- * @link https://matomo.org
- * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */
-
-namespace Piwik\Plugins\Goals\Visualizations;
-
-use Piwik\Piwik;
-
-/**
- * DataTable Visualization that derives from HtmlTable and shows goals metrics for page conversions
- */
-class GoalsPages extends Goals
-{
- const ID = 'tableGoalsPages';
-
- public function beforeRender()
- {
- $this->removeExcludedColumns();
- $this->config->addTranslation('nb_hits', Piwik::translate('General_ColumnUniquePageviews'));
- $this->config->metrics_documentation['nb_hits'] = Piwik::translate('General_ColumnUniquePageviewsDocumentation');
- parent::beforeRender();
- }
-
- protected function setPropertiesForGoalsOverview($idSite)
- {
- $allGoals = $this->getGoals($idSite);
-
- // set view properties
- $this->config->columns_to_display = array('label', 'nb_hits');
-
- foreach ($allGoals as $goal) {
- $column = "goal_{$goal['idgoal']}_nb_conversions_page_rate";
- $this->config->columns_to_display[] = $column;
- }
-
- }
-
- protected function setPropertiesForGoals($idSite, $idGoals)
- {
-
- $allGoals = $this->getGoals($idSite);
-
- if ('all' === $idGoals) {
- $idGoals = array_keys($allGoals);
- $this->requestConfig->filter_sort_column = 'nb_hits';
- } else {
- // only sort by a goal's conversions if not showing all goals (for FULL_REPORT)
- $this->requestConfig->filter_sort_column = 'goal_' . reset($idGoals) . '_nb_conversions_attrib';
- }
- $this->requestConfig->filter_sort_order = 'desc';
-
- $this->config->columns_to_display = array('label', 'nb_hits');
-
- $goalColumnTemplates = array(
- 'goal_%s_nb_conversions_attrib',
- 'goal_%s_revenue_attrib',
- 'goal_%s_nb_conversions_page_rate',
- );
-
- // set columns to display (columns of same type but different goals will be next to each other,
- // ie, goal_0_nb_conversions, goal_1_nb_conversions, etc.)
- foreach ($idGoals as $idGoal) {
- foreach ($goalColumnTemplates as $columnTemplate) {
- $this->config->columns_to_display[] = sprintf($columnTemplate, $idGoal);
- }
- }
-
- }
-
-}
diff --git a/plugins/Goals/lang/en.json b/plugins/Goals/lang/en.json
index d7f7f83086..36b81f0b56 100644
--- a/plugins/Goals/lang/en.json
+++ b/plugins/Goals/lang/en.json
@@ -16,7 +16,7 @@
"CategoryTextReferrers_Referrers": "Referrers",
"CategoryTextVisitsSummary_VisitsSummary": "User attribute",
"CategoryTextDevicesDetection_DevicesDetection": "Devices",
- "CategoryTextPages": "Pages",
+ "CategoryTextGeneral_Actions": "Pages",
"CategoryTextGeneral_Visit": "engagement",
"ClickOutlink": "Click on a Link to an external website",
"SendEvent": "Send an event",
diff --git a/plugins/Goals/tests/System/TrackGoalsPagesTest.php b/plugins/Goals/tests/System/TrackGoalsPagesTest.php
index 916d77c4dd..63044fbcb5 100644
--- a/plugins/Goals/tests/System/TrackGoalsPagesTest.php
+++ b/plugins/Goals/tests/System/TrackGoalsPagesTest.php
@@ -34,12 +34,16 @@ class TrackGoalsPagesTest extends SystemTestCase
public function getApiForTesting()
{
return [
- ['Goals.getPagesUrl', ['idSite' => self::$fixture->idSite, 'date' => self::$fixture->dateTime, 'idGoal' => 1]],
- ['Goals.getPagesTitles', ['idSite' => self::$fixture->idSite, 'date' => self::$fixture->dateTime, 'idGoal' => 1]],
- ['Goals.getPagesEntry', ['idSite' => self::$fixture->idSite, 'date' => self::$fixture->dateTime, 'idGoal' => 1,
- 'otherRequestParameters' => ['filter_update_columns_when_show_all_goals' => 1]]],
- ['Goals.getPagesEntryTitles', ['idSite' => self::$fixture->idSite, 'date' => self::$fixture->dateTime, 'idGoal' => 1,
- 'otherRequestParameters' => ['filter_update_columns_when_show_all_goals' => 1]]]
+ ['Actions.getPageUrls', ['idSite' => self::$fixture->idSite, 'date' => self::$fixture->dateTime,
+ 'idGoal' => 1, 'includeGoals' => 1]],
+ ['Actions.getPageTitles', ['idSite' => self::$fixture->idSite, 'date' => self::$fixture->dateTime,
+ 'idGoal' => 1, 'includeGoals' => 1]],
+ ['Actions.getEntryPageUrls', ['idSite' => self::$fixture->idSite, 'date' => self::$fixture->dateTime,
+ 'idGoal' => 1, 'includeGoals' => 1, 'otherRequestParameters' =>
+ ['filter_update_columns_when_show_all_goals' => 1]]],
+ ['Actions.getEntryPageTitles', ['idSite' => self::$fixture->idSite, 'date' => self::$fixture->dateTime,
+ 'idGoal' => 1, 'includeGoals' => 1, 'otherRequestParameters' =>
+ ['filter_update_columns_when_show_all_goals' => 1]]]
];
}
diff --git a/plugins/Goals/tests/System/expected/test_trackGoals_pages__Actions.getEntryPageTitles_day.xml b/plugins/Goals/tests/System/expected/test_trackGoals_pages__Actions.getEntryPageTitles_day.xml
new file mode 100644
index 0000000000..37c54238f6
--- /dev/null
+++ b/plugins/Goals/tests/System/expected/test_trackGoals_pages__Actions.getEntryPageTitles_day.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<result>
+ <row>
+ <label> Page A</label>
+ <nb_visits>3</nb_visits>
+ <nb_uniq_visitors>3</nb_uniq_visitors>
+ <nb_hits>4</nb_hits>
+ <sum_time_spent>1440</sum_time_spent>
+ <sum_bandwidth>0</sum_bandwidth>
+ <nb_hits_with_bandwidth>0</nb_hits_with_bandwidth>
+ <min_bandwidth />
+ <max_bandwidth />
+ <entry_nb_uniq_visitors>3</entry_nb_uniq_visitors>
+ <entry_nb_visits>3</entry_nb_visits>
+ <entry_nb_actions>10</entry_nb_actions>
+ <entry_sum_visit_length>2525</entry_sum_visit_length>
+ <entry_bounce_count>0</entry_bounce_count>
+ <goals>
+ <row idgoal='1'>
+ <nb_conversions>3</nb_conversions>
+ <revenue>30</revenue>
+ <nb_conv_pages_before>6</nb_conv_pages_before>
+ <nb_conversions_attrib>1</nb_conversions_attrib>
+ <nb_conversions_page_rate>0</nb_conversions_page_rate>
+ <nb_conversions_page_uniq>2</nb_conversions_page_uniq>
+ <revenue_attrib>10</revenue_attrib>
+ <revenue_entry>20</revenue_entry>
+ <nb_conversions_entry_rate>0.667</nb_conversions_entry_rate>
+ <revenue_per_entry>6.667</revenue_per_entry>
+ <nb_conversions_entry>2</nb_conversions_entry>
+ </row>
+ </goals>
+ <avg_bandwidth>0</avg_bandwidth>
+ <avg_page_load_time>0</avg_page_load_time>
+ <avg_time_on_page>360</avg_time_on_page>
+ <bounce_rate>0%</bounce_rate>
+ <exit_rate>0%</exit_rate>
+ <segment>entryPageTitle==Page%2BA</segment>
+ </row>
+</result> \ No newline at end of file
diff --git a/plugins/Goals/tests/System/expected/test_trackGoals_pages__Actions.getEntryPageUrls_day.xml b/plugins/Goals/tests/System/expected/test_trackGoals_pages__Actions.getEntryPageUrls_day.xml
new file mode 100644
index 0000000000..9114308c5e
--- /dev/null
+++ b/plugins/Goals/tests/System/expected/test_trackGoals_pages__Actions.getEntryPageUrls_day.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<result>
+ <row>
+ <label>/page_A</label>
+ <nb_visits>3</nb_visits>
+ <nb_uniq_visitors>3</nb_uniq_visitors>
+ <nb_hits>4</nb_hits>
+ <sum_time_spent>1440</sum_time_spent>
+ <sum_bandwidth>0</sum_bandwidth>
+ <nb_hits_with_bandwidth>0</nb_hits_with_bandwidth>
+ <min_bandwidth />
+ <max_bandwidth />
+ <entry_nb_uniq_visitors>3</entry_nb_uniq_visitors>
+ <entry_nb_visits>3</entry_nb_visits>
+ <entry_nb_actions>10</entry_nb_actions>
+ <entry_sum_visit_length>2525</entry_sum_visit_length>
+ <entry_bounce_count>0</entry_bounce_count>
+ <goals>
+ <row idgoal='1'>
+ <nb_conversions>3</nb_conversions>
+ <revenue>30</revenue>
+ <nb_conv_pages_before>6</nb_conv_pages_before>
+ <nb_conversions_attrib>1</nb_conversions_attrib>
+ <nb_conversions_page_rate>0</nb_conversions_page_rate>
+ <nb_conversions_page_uniq>2</nb_conversions_page_uniq>
+ <revenue_attrib>10</revenue_attrib>
+ <revenue_entry>20</revenue_entry>
+ <nb_conversions_entry_rate>0.667</nb_conversions_entry_rate>
+ <revenue_per_entry>6.667</revenue_per_entry>
+ <nb_conversions_entry>2</nb_conversions_entry>
+ </row>
+ </goals>
+ <avg_bandwidth>0</avg_bandwidth>
+ <avg_page_load_time>0</avg_page_load_time>
+ <avg_time_on_page>360</avg_time_on_page>
+ <bounce_rate>0%</bounce_rate>
+ <exit_rate>0%</exit_rate>
+ <url>http://example.org/page_A</url>
+ <segment>entryPageUrl==http%253A%252F%252Fexample.org%252Fpage_A</segment>
+ </row>
+</result> \ No newline at end of file
diff --git a/plugins/Goals/tests/System/expected/test_trackGoals_pages__Actions.getPageTitles_day.xml b/plugins/Goals/tests/System/expected/test_trackGoals_pages__Actions.getPageTitles_day.xml
new file mode 100644
index 0000000000..96ad1c2c85
--- /dev/null
+++ b/plugins/Goals/tests/System/expected/test_trackGoals_pages__Actions.getPageTitles_day.xml
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<result>
+ <row>
+ <label> Page A</label>
+ <nb_visits>3</nb_visits>
+ <nb_uniq_visitors>3</nb_uniq_visitors>
+ <nb_hits>4</nb_hits>
+ <sum_time_spent>1440</sum_time_spent>
+ <sum_bandwidth>0</sum_bandwidth>
+ <nb_hits_with_bandwidth>0</nb_hits_with_bandwidth>
+ <min_bandwidth />
+ <max_bandwidth />
+ <entry_nb_uniq_visitors>3</entry_nb_uniq_visitors>
+ <entry_nb_visits>3</entry_nb_visits>
+ <entry_nb_actions>10</entry_nb_actions>
+ <entry_sum_visit_length>2525</entry_sum_visit_length>
+ <entry_bounce_count>0</entry_bounce_count>
+ <goals>
+ <row idgoal='1'>
+ <nb_conversions>3</nb_conversions>
+ <revenue>30</revenue>
+ <nb_conv_pages_before>6</nb_conv_pages_before>
+ <nb_conversions_attrib>1</nb_conversions_attrib>
+ <nb_conversions_page_rate>0</nb_conversions_page_rate>
+ <nb_conversions_page_uniq>2</nb_conversions_page_uniq>
+ <revenue_attrib>10</revenue_attrib>
+ <revenue_entry>20</revenue_entry>
+ <nb_conversions_entry_rate>0.667</nb_conversions_entry_rate>
+ <revenue_per_entry>6.667</revenue_per_entry>
+ <nb_conversions_entry>2</nb_conversions_entry>
+ </row>
+ </goals>
+ <avg_bandwidth>0</avg_bandwidth>
+ <avg_page_load_time>0</avg_page_load_time>
+ <avg_time_on_page>360</avg_time_on_page>
+ <bounce_rate>0%</bounce_rate>
+ <exit_rate>0%</exit_rate>
+ <segment>pageTitle==Page%2BA</segment>
+ </row>
+ <row>
+ <label> Page C</label>
+ <nb_visits>2</nb_visits>
+ <nb_uniq_visitors>2</nb_uniq_visitors>
+ <nb_hits>2</nb_hits>
+ <sum_time_spent>0</sum_time_spent>
+ <sum_bandwidth>0</sum_bandwidth>
+ <nb_hits_with_bandwidth>0</nb_hits_with_bandwidth>
+ <min_bandwidth />
+ <max_bandwidth />
+ <exit_nb_uniq_visitors>2</exit_nb_uniq_visitors>
+ <exit_nb_visits>2</exit_nb_visits>
+ <goals>
+ <row idgoal='1'>
+ <nb_conversions>2</nb_conversions>
+ <revenue>20</revenue>
+ <nb_conv_pages_before>6</nb_conv_pages_before>
+ <nb_conversions_attrib>0.75</nb_conversions_attrib>
+ <nb_conversions_page_rate>0</nb_conversions_page_rate>
+ <nb_conversions_page_uniq>2</nb_conversions_page_uniq>
+ <revenue_attrib>7.5</revenue_attrib>
+ </row>
+ </goals>
+ <avg_bandwidth>0</avg_bandwidth>
+ <avg_page_load_time>0</avg_page_load_time>
+ <avg_time_on_page>0</avg_time_on_page>
+ <bounce_rate>0%</bounce_rate>
+ <exit_rate>100%</exit_rate>
+ <segment>pageTitle==Page%2BC</segment>
+ </row>
+ <row>
+ <label> Page B</label>
+ <nb_visits>1</nb_visits>
+ <nb_uniq_visitors>1</nb_uniq_visitors>
+ <nb_hits>1</nb_hits>
+ <sum_time_spent>360</sum_time_spent>
+ <sum_bandwidth>0</sum_bandwidth>
+ <nb_hits_with_bandwidth>0</nb_hits_with_bandwidth>
+ <min_bandwidth />
+ <max_bandwidth />
+ <goals>
+ <row idgoal='1'>
+ <nb_conversions>1</nb_conversions>
+ <revenue>10</revenue>
+ <nb_conv_pages_before>4</nb_conv_pages_before>
+ <nb_conversions_attrib>0.25</nb_conversions_attrib>
+ <nb_conversions_page_rate>0</nb_conversions_page_rate>
+ <nb_conversions_page_uniq>1</nb_conversions_page_uniq>
+ <revenue_attrib>2.5</revenue_attrib>
+ </row>
+ </goals>
+ <avg_bandwidth>0</avg_bandwidth>
+ <avg_page_load_time>0</avg_page_load_time>
+ <avg_time_on_page>360</avg_time_on_page>
+ <bounce_rate>0%</bounce_rate>
+ <exit_rate>0%</exit_rate>
+ <segment>pageTitle==Page%2BB</segment>
+ </row>
+ <row>
+ <label> Page D</label>
+ <nb_visits>1</nb_visits>
+ <nb_uniq_visitors>1</nb_uniq_visitors>
+ <nb_hits>1</nb_hits>
+ <sum_time_spent>0</sum_time_spent>
+ <sum_bandwidth>0</sum_bandwidth>
+ <nb_hits_with_bandwidth>0</nb_hits_with_bandwidth>
+ <min_bandwidth />
+ <max_bandwidth />
+ <exit_nb_uniq_visitors>1</exit_nb_uniq_visitors>
+ <exit_nb_visits>1</exit_nb_visits>
+ <avg_bandwidth>0</avg_bandwidth>
+ <avg_page_load_time>0</avg_page_load_time>
+ <avg_time_on_page>0</avg_time_on_page>
+ <bounce_rate>0%</bounce_rate>
+ <exit_rate>100%</exit_rate>
+ <segment>pageTitle==Page%2BD</segment>
+ </row>
+</result> \ No newline at end of file
diff --git a/plugins/Goals/tests/System/expected/test_trackGoals_pages__Actions.getPageUrls_day.xml b/plugins/Goals/tests/System/expected/test_trackGoals_pages__Actions.getPageUrls_day.xml
new file mode 100644
index 0000000000..76810041d6
--- /dev/null
+++ b/plugins/Goals/tests/System/expected/test_trackGoals_pages__Actions.getPageUrls_day.xml
@@ -0,0 +1,121 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<result>
+ <row>
+ <label>/page_A</label>
+ <nb_visits>3</nb_visits>
+ <nb_uniq_visitors>3</nb_uniq_visitors>
+ <nb_hits>4</nb_hits>
+ <sum_time_spent>1440</sum_time_spent>
+ <sum_bandwidth>0</sum_bandwidth>
+ <nb_hits_with_bandwidth>0</nb_hits_with_bandwidth>
+ <min_bandwidth />
+ <max_bandwidth />
+ <entry_nb_uniq_visitors>3</entry_nb_uniq_visitors>
+ <entry_nb_visits>3</entry_nb_visits>
+ <entry_nb_actions>10</entry_nb_actions>
+ <entry_sum_visit_length>2525</entry_sum_visit_length>
+ <entry_bounce_count>0</entry_bounce_count>
+ <goals>
+ <row idgoal='1'>
+ <nb_conversions>3</nb_conversions>
+ <revenue>30</revenue>
+ <nb_conv_pages_before>6</nb_conv_pages_before>
+ <nb_conversions_attrib>1</nb_conversions_attrib>
+ <nb_conversions_page_rate>0</nb_conversions_page_rate>
+ <nb_conversions_page_uniq>2</nb_conversions_page_uniq>
+ <revenue_attrib>10</revenue_attrib>
+ <revenue_entry>20</revenue_entry>
+ <nb_conversions_entry_rate>0.667</nb_conversions_entry_rate>
+ <revenue_per_entry>6.667</revenue_per_entry>
+ <nb_conversions_entry>2</nb_conversions_entry>
+ </row>
+ </goals>
+ <avg_bandwidth>0</avg_bandwidth>
+ <avg_page_load_time>0</avg_page_load_time>
+ <avg_time_on_page>360</avg_time_on_page>
+ <bounce_rate>0%</bounce_rate>
+ <exit_rate>0%</exit_rate>
+ <url>http://example.org/page_A</url>
+ <segment>pageUrl==http%253A%252F%252Fexample.org%252Fpage_A</segment>
+ </row>
+ <row>
+ <label>/page_C</label>
+ <nb_visits>2</nb_visits>
+ <nb_uniq_visitors>2</nb_uniq_visitors>
+ <nb_hits>2</nb_hits>
+ <sum_time_spent>0</sum_time_spent>
+ <sum_bandwidth>0</sum_bandwidth>
+ <nb_hits_with_bandwidth>0</nb_hits_with_bandwidth>
+ <min_bandwidth />
+ <max_bandwidth />
+ <exit_nb_uniq_visitors>2</exit_nb_uniq_visitors>
+ <exit_nb_visits>2</exit_nb_visits>
+ <goals>
+ <row idgoal='1'>
+ <nb_conversions>2</nb_conversions>
+ <revenue>20</revenue>
+ <nb_conv_pages_before>6</nb_conv_pages_before>
+ <nb_conversions_attrib>0.75</nb_conversions_attrib>
+ <nb_conversions_page_rate>0</nb_conversions_page_rate>
+ <nb_conversions_page_uniq>2</nb_conversions_page_uniq>
+ <revenue_attrib>7.5</revenue_attrib>
+ </row>
+ </goals>
+ <avg_bandwidth>0</avg_bandwidth>
+ <avg_page_load_time>0</avg_page_load_time>
+ <avg_time_on_page>0</avg_time_on_page>
+ <bounce_rate>0%</bounce_rate>
+ <exit_rate>100%</exit_rate>
+ <url>http://example.org/page_C</url>
+ <segment>pageUrl==http%253A%252F%252Fexample.org%252Fpage_C</segment>
+ </row>
+ <row>
+ <label>/page_B</label>
+ <nb_visits>1</nb_visits>
+ <nb_uniq_visitors>1</nb_uniq_visitors>
+ <nb_hits>1</nb_hits>
+ <sum_time_spent>360</sum_time_spent>
+ <sum_bandwidth>0</sum_bandwidth>
+ <nb_hits_with_bandwidth>0</nb_hits_with_bandwidth>
+ <min_bandwidth />
+ <max_bandwidth />
+ <goals>
+ <row idgoal='1'>
+ <nb_conversions>1</nb_conversions>
+ <revenue>10</revenue>
+ <nb_conv_pages_before>4</nb_conv_pages_before>
+ <nb_conversions_attrib>0.25</nb_conversions_attrib>
+ <nb_conversions_page_rate>0</nb_conversions_page_rate>
+ <nb_conversions_page_uniq>1</nb_conversions_page_uniq>
+ <revenue_attrib>2.5</revenue_attrib>
+ </row>
+ </goals>
+ <avg_bandwidth>0</avg_bandwidth>
+ <avg_page_load_time>0</avg_page_load_time>
+ <avg_time_on_page>360</avg_time_on_page>
+ <bounce_rate>0%</bounce_rate>
+ <exit_rate>0%</exit_rate>
+ <url>http://example.org/page_B</url>
+ <segment>pageUrl==http%253A%252F%252Fexample.org%252Fpage_B</segment>
+ </row>
+ <row>
+ <label>/page_D</label>
+ <nb_visits>1</nb_visits>
+ <nb_uniq_visitors>1</nb_uniq_visitors>
+ <nb_hits>1</nb_hits>
+ <sum_time_spent>0</sum_time_spent>
+ <sum_bandwidth>0</sum_bandwidth>
+ <nb_hits_with_bandwidth>0</nb_hits_with_bandwidth>
+ <min_bandwidth />
+ <max_bandwidth />
+ <exit_nb_uniq_visitors>1</exit_nb_uniq_visitors>
+ <exit_nb_visits>1</exit_nb_visits>
+ <avg_bandwidth>0</avg_bandwidth>
+ <avg_page_load_time>0</avg_page_load_time>
+ <avg_time_on_page>0</avg_time_on_page>
+ <bounce_rate>0%</bounce_rate>
+ <exit_rate>100%</exit_rate>
+ <url>http://example.org/page_D</url>
+ <segment>pageUrl==http%253A%252F%252Fexample.org%252Fpage_D</segment>
+ </row>
+</result> \ No newline at end of file
diff --git a/plugins/Goals/tests/System/expected/test_trackGoals_pages__Goals.getPagesEntryTitles_day.xml b/plugins/Goals/tests/System/expected/test_trackGoals_pages__Goals.getPagesEntryTitles_day.xml
deleted file mode 100644
index 1fcc1b7037..0000000000
--- a/plugins/Goals/tests/System/expected/test_trackGoals_pages__Goals.getPagesEntryTitles_day.xml
+++ /dev/null
@@ -1,204 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<result>
- <row>
- <label> Page A</label>
- <nb_uniq_visitors>3</nb_uniq_visitors>
- <nb_hits>4</nb_hits>
- <sum_time_spent>1440</sum_time_spent>
- <sum_time_generation>0</sum_time_generation>
- <nb_hits_with_time_generation>0</nb_hits_with_time_generation>
- <min_time_generation />
- <max_time_generation />
- <sum_time_network>0.0000</sum_time_network>
- <nb_hits_with_time_network>0</nb_hits_with_time_network>
- <min_time_network />
- <max_time_network />
- <sum_time_server>0.0000</sum_time_server>
- <nb_hits_with_time_server>0</nb_hits_with_time_server>
- <min_time_server />
- <max_time_server />
- <sum_time_transfer>0.0000</sum_time_transfer>
- <nb_hits_with_time_transfer>0</nb_hits_with_time_transfer>
- <min_time_transfer />
- <max_time_transfer />
- <sum_time_dom_processing>0.0000</sum_time_dom_processing>
- <nb_hits_with_time_dom_processing>0</nb_hits_with_time_dom_processing>
- <min_time_dom_processing />
- <max_time_dom_processing />
- <sum_time_dom_completion>0.0000</sum_time_dom_completion>
- <nb_hits_with_time_dom_completion>0</nb_hits_with_time_dom_completion>
- <min_time_dom_completion />
- <max_time_dom_completion />
- <sum_time_on_load>0.0000</sum_time_on_load>
- <nb_hits_with_time_on_load>0</nb_hits_with_time_on_load>
- <min_time_on_load />
- <max_time_on_load />
- <sum_bandwidth>0</sum_bandwidth>
- <nb_hits_with_bandwidth>0</nb_hits_with_bandwidth>
- <min_bandwidth />
- <max_bandwidth />
- <entry_nb_visits>3</entry_nb_visits>
- <entry_nb_actions>10</entry_nb_actions>
- <entry_sum_visit_length>2525</entry_sum_visit_length>
- <entry_bounce_count>0</entry_bounce_count>
- <goals>
- <row idgoal='1'>
- <nb_conversions>3</nb_conversions>
- <revenue>30</revenue>
- <nb_conv_pages_before>6</nb_conv_pages_before>
- <nb_conversions_attrib>1</nb_conversions_attrib>
- <nb_conversions_page_rate>0</nb_conversions_page_rate>
- <nb_conversions_page_uniq>2</nb_conversions_page_uniq>
- <revenue_attrib>10</revenue_attrib>
- <revenue_entry>20</revenue_entry>
- <nb_conversions_entry_rate>0.667</nb_conversions_entry_rate>
- <revenue_per_entry>6.667</revenue_per_entry>
- <nb_conversions_entry>2</nb_conversions_entry>
- </row>
- </goals>
- <page_title_path>Page A</page_title_path>
- </row>
- <row>
- <label> Page C</label>
- <nb_uniq_visitors>2</nb_uniq_visitors>
- <nb_hits>2</nb_hits>
- <sum_time_spent>0</sum_time_spent>
- <sum_time_generation>0</sum_time_generation>
- <nb_hits_with_time_generation>0</nb_hits_with_time_generation>
- <min_time_generation />
- <max_time_generation />
- <sum_time_network>0.0000</sum_time_network>
- <nb_hits_with_time_network>0</nb_hits_with_time_network>
- <min_time_network />
- <max_time_network />
- <sum_time_server>0.0000</sum_time_server>
- <nb_hits_with_time_server>0</nb_hits_with_time_server>
- <min_time_server />
- <max_time_server />
- <sum_time_transfer>0.0000</sum_time_transfer>
- <nb_hits_with_time_transfer>0</nb_hits_with_time_transfer>
- <min_time_transfer />
- <max_time_transfer />
- <sum_time_dom_processing>0.0000</sum_time_dom_processing>
- <nb_hits_with_time_dom_processing>0</nb_hits_with_time_dom_processing>
- <min_time_dom_processing />
- <max_time_dom_processing />
- <sum_time_dom_completion>0.0000</sum_time_dom_completion>
- <nb_hits_with_time_dom_completion>0</nb_hits_with_time_dom_completion>
- <min_time_dom_completion />
- <max_time_dom_completion />
- <sum_time_on_load>0.0000</sum_time_on_load>
- <nb_hits_with_time_on_load>0</nb_hits_with_time_on_load>
- <min_time_on_load />
- <max_time_on_load />
- <sum_bandwidth>0</sum_bandwidth>
- <nb_hits_with_bandwidth>0</nb_hits_with_bandwidth>
- <min_bandwidth />
- <max_bandwidth />
- <exit_nb_uniq_visitors>2</exit_nb_uniq_visitors>
- <exit_nb_visits>2</exit_nb_visits>
- <goals>
- <row idgoal='1'>
- <nb_conversions>2</nb_conversions>
- <revenue>20</revenue>
- <nb_conv_pages_before>6</nb_conv_pages_before>
- <nb_conversions_attrib>0.75</nb_conversions_attrib>
- <nb_conversions_page_rate>0</nb_conversions_page_rate>
- <nb_conversions_page_uniq>2</nb_conversions_page_uniq>
- <revenue_attrib>7.5</revenue_attrib>
- </row>
- </goals>
- <page_title_path>Page C</page_title_path>
- </row>
- <row>
- <label> Page B</label>
- <nb_uniq_visitors>1</nb_uniq_visitors>
- <nb_hits>1</nb_hits>
- <sum_time_spent>360</sum_time_spent>
- <sum_time_generation>0</sum_time_generation>
- <nb_hits_with_time_generation>0</nb_hits_with_time_generation>
- <min_time_generation />
- <max_time_generation />
- <sum_time_network>0.0000</sum_time_network>
- <nb_hits_with_time_network>0</nb_hits_with_time_network>
- <min_time_network />
- <max_time_network />
- <sum_time_server>0.0000</sum_time_server>
- <nb_hits_with_time_server>0</nb_hits_with_time_server>
- <min_time_server />
- <max_time_server />
- <sum_time_transfer>0.0000</sum_time_transfer>
- <nb_hits_with_time_transfer>0</nb_hits_with_time_transfer>
- <min_time_transfer />
- <max_time_transfer />
- <sum_time_dom_processing>0.0000</sum_time_dom_processing>
- <nb_hits_with_time_dom_processing>0</nb_hits_with_time_dom_processing>
- <min_time_dom_processing />
- <max_time_dom_processing />
- <sum_time_dom_completion>0.0000</sum_time_dom_completion>
- <nb_hits_with_time_dom_completion>0</nb_hits_with_time_dom_completion>
- <min_time_dom_completion />
- <max_time_dom_completion />
- <sum_time_on_load>0.0000</sum_time_on_load>
- <nb_hits_with_time_on_load>0</nb_hits_with_time_on_load>
- <min_time_on_load />
- <max_time_on_load />
- <sum_bandwidth>0</sum_bandwidth>
- <nb_hits_with_bandwidth>0</nb_hits_with_bandwidth>
- <min_bandwidth />
- <max_bandwidth />
- <goals>
- <row idgoal='1'>
- <nb_conversions>1</nb_conversions>
- <revenue>10</revenue>
- <nb_conv_pages_before>4</nb_conv_pages_before>
- <nb_conversions_attrib>0.25</nb_conversions_attrib>
- <nb_conversions_page_rate>0</nb_conversions_page_rate>
- <nb_conversions_page_uniq>1</nb_conversions_page_uniq>
- <revenue_attrib>2.5</revenue_attrib>
- </row>
- </goals>
- <page_title_path>Page B</page_title_path>
- </row>
- <row>
- <label> Page D</label>
- <nb_uniq_visitors>1</nb_uniq_visitors>
- <nb_hits>1</nb_hits>
- <sum_time_spent>0</sum_time_spent>
- <sum_time_generation>0</sum_time_generation>
- <nb_hits_with_time_generation>0</nb_hits_with_time_generation>
- <min_time_generation />
- <max_time_generation />
- <sum_time_network>0.0000</sum_time_network>
- <nb_hits_with_time_network>0</nb_hits_with_time_network>
- <min_time_network />
- <max_time_network />
- <sum_time_server>0.0000</sum_time_server>
- <nb_hits_with_time_server>0</nb_hits_with_time_server>
- <min_time_server />
- <max_time_server />
- <sum_time_transfer>0.0000</sum_time_transfer>
- <nb_hits_with_time_transfer>0</nb_hits_with_time_transfer>
- <min_time_transfer />
- <max_time_transfer />
- <sum_time_dom_processing>0.0000</sum_time_dom_processing>
- <nb_hits_with_time_dom_processing>0</nb_hits_with_time_dom_processing>
- <min_time_dom_processing />
- <max_time_dom_processing />
- <sum_time_dom_completion>0.0000</sum_time_dom_completion>
- <nb_hits_with_time_dom_completion>0</nb_hits_with_time_dom_completion>
- <min_time_dom_completion />
- <max_time_dom_completion />
- <sum_time_on_load>0.0000</sum_time_on_load>
- <nb_hits_with_time_on_load>0</nb_hits_with_time_on_load>
- <min_time_on_load />
- <max_time_on_load />
- <sum_bandwidth>0</sum_bandwidth>
- <nb_hits_with_bandwidth>0</nb_hits_with_bandwidth>
- <min_bandwidth />
- <max_bandwidth />
- <exit_nb_uniq_visitors>1</exit_nb_uniq_visitors>
- <exit_nb_visits>1</exit_nb_visits>
- <page_title_path>Page D</page_title_path>
- </row>
-</result> \ No newline at end of file
diff --git a/plugins/Goals/tests/System/expected/test_trackGoals_pages__Goals.getPagesEntry_day.xml b/plugins/Goals/tests/System/expected/test_trackGoals_pages__Goals.getPagesEntry_day.xml
deleted file mode 100644
index 1af527fadc..0000000000
--- a/plugins/Goals/tests/System/expected/test_trackGoals_pages__Goals.getPagesEntry_day.xml
+++ /dev/null
@@ -1,204 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<result>
- <row>
- <label>/page_A</label>
- <nb_uniq_visitors>3</nb_uniq_visitors>
- <nb_hits>4</nb_hits>
- <sum_time_spent>1440</sum_time_spent>
- <sum_time_generation>0</sum_time_generation>
- <nb_hits_with_time_generation>0</nb_hits_with_time_generation>
- <min_time_generation />
- <max_time_generation />
- <sum_time_network>0.0000</sum_time_network>
- <nb_hits_with_time_network>0</nb_hits_with_time_network>
- <min_time_network />
- <max_time_network />
- <sum_time_server>0.0000</sum_time_server>
- <nb_hits_with_time_server>0</nb_hits_with_time_server>
- <min_time_server />
- <max_time_server />
- <sum_time_transfer>0.0000</sum_time_transfer>
- <nb_hits_with_time_transfer>0</nb_hits_with_time_transfer>
- <min_time_transfer />
- <max_time_transfer />
- <sum_time_dom_processing>0.0000</sum_time_dom_processing>
- <nb_hits_with_time_dom_processing>0</nb_hits_with_time_dom_processing>
- <min_time_dom_processing />
- <max_time_dom_processing />
- <sum_time_dom_completion>0.0000</sum_time_dom_completion>
- <nb_hits_with_time_dom_completion>0</nb_hits_with_time_dom_completion>
- <min_time_dom_completion />
- <max_time_dom_completion />
- <sum_time_on_load>0.0000</sum_time_on_load>
- <nb_hits_with_time_on_load>0</nb_hits_with_time_on_load>
- <min_time_on_load />
- <max_time_on_load />
- <sum_bandwidth>0</sum_bandwidth>
- <nb_hits_with_bandwidth>0</nb_hits_with_bandwidth>
- <min_bandwidth />
- <max_bandwidth />
- <entry_nb_visits>3</entry_nb_visits>
- <entry_nb_actions>10</entry_nb_actions>
- <entry_sum_visit_length>2525</entry_sum_visit_length>
- <entry_bounce_count>0</entry_bounce_count>
- <goals>
- <row idgoal='1'>
- <nb_conversions>3</nb_conversions>
- <revenue>30</revenue>
- <nb_conv_pages_before>6</nb_conv_pages_before>
- <nb_conversions_attrib>1</nb_conversions_attrib>
- <nb_conversions_page_rate>0</nb_conversions_page_rate>
- <nb_conversions_page_uniq>2</nb_conversions_page_uniq>
- <revenue_attrib>10</revenue_attrib>
- <revenue_entry>20</revenue_entry>
- <nb_conversions_entry_rate>0.667</nb_conversions_entry_rate>
- <revenue_per_entry>6.667</revenue_per_entry>
- <nb_conversions_entry>2</nb_conversions_entry>
- </row>
- </goals>
- <url>http://example.org/page_A</url>
- </row>
- <row>
- <label>/page_C</label>
- <nb_uniq_visitors>2</nb_uniq_visitors>
- <nb_hits>2</nb_hits>
- <sum_time_spent>0</sum_time_spent>
- <sum_time_generation>0</sum_time_generation>
- <nb_hits_with_time_generation>0</nb_hits_with_time_generation>
- <min_time_generation />
- <max_time_generation />
- <sum_time_network>0.0000</sum_time_network>
- <nb_hits_with_time_network>0</nb_hits_with_time_network>
- <min_time_network />
- <max_time_network />
- <sum_time_server>0.0000</sum_time_server>
- <nb_hits_with_time_server>0</nb_hits_with_time_server>
- <min_time_server />
- <max_time_server />
- <sum_time_transfer>0.0000</sum_time_transfer>
- <nb_hits_with_time_transfer>0</nb_hits_with_time_transfer>
- <min_time_transfer />
- <max_time_transfer />
- <sum_time_dom_processing>0.0000</sum_time_dom_processing>
- <nb_hits_with_time_dom_processing>0</nb_hits_with_time_dom_processing>
- <min_time_dom_processing />
- <max_time_dom_processing />
- <sum_time_dom_completion>0.0000</sum_time_dom_completion>
- <nb_hits_with_time_dom_completion>0</nb_hits_with_time_dom_completion>
- <min_time_dom_completion />
- <max_time_dom_completion />
- <sum_time_on_load>0.0000</sum_time_on_load>
- <nb_hits_with_time_on_load>0</nb_hits_with_time_on_load>
- <min_time_on_load />
- <max_time_on_load />
- <sum_bandwidth>0</sum_bandwidth>
- <nb_hits_with_bandwidth>0</nb_hits_with_bandwidth>
- <min_bandwidth />
- <max_bandwidth />
- <exit_nb_uniq_visitors>2</exit_nb_uniq_visitors>
- <exit_nb_visits>2</exit_nb_visits>
- <goals>
- <row idgoal='1'>
- <nb_conversions>2</nb_conversions>
- <revenue>20</revenue>
- <nb_conv_pages_before>6</nb_conv_pages_before>
- <nb_conversions_attrib>0.75</nb_conversions_attrib>
- <nb_conversions_page_rate>0</nb_conversions_page_rate>
- <nb_conversions_page_uniq>2</nb_conversions_page_uniq>
- <revenue_attrib>7.5</revenue_attrib>
- </row>
- </goals>
- <url>http://example.org/page_C</url>
- </row>
- <row>
- <label>/page_B</label>
- <nb_uniq_visitors>1</nb_uniq_visitors>
- <nb_hits>1</nb_hits>
- <sum_time_spent>360</sum_time_spent>
- <sum_time_generation>0</sum_time_generation>
- <nb_hits_with_time_generation>0</nb_hits_with_time_generation>
- <min_time_generation />
- <max_time_generation />
- <sum_time_network>0.0000</sum_time_network>
- <nb_hits_with_time_network>0</nb_hits_with_time_network>
- <min_time_network />
- <max_time_network />
- <sum_time_server>0.0000</sum_time_server>
- <nb_hits_with_time_server>0</nb_hits_with_time_server>
- <min_time_server />
- <max_time_server />
- <sum_time_transfer>0.0000</sum_time_transfer>
- <nb_hits_with_time_transfer>0</nb_hits_with_time_transfer>
- <min_time_transfer />
- <max_time_transfer />
- <sum_time_dom_processing>0.0000</sum_time_dom_processing>
- <nb_hits_with_time_dom_processing>0</nb_hits_with_time_dom_processing>
- <min_time_dom_processing />
- <max_time_dom_processing />
- <sum_time_dom_completion>0.0000</sum_time_dom_completion>
- <nb_hits_with_time_dom_completion>0</nb_hits_with_time_dom_completion>
- <min_time_dom_completion />
- <max_time_dom_completion />
- <sum_time_on_load>0.0000</sum_time_on_load>
- <nb_hits_with_time_on_load>0</nb_hits_with_time_on_load>
- <min_time_on_load />
- <max_time_on_load />
- <sum_bandwidth>0</sum_bandwidth>
- <nb_hits_with_bandwidth>0</nb_hits_with_bandwidth>
- <min_bandwidth />
- <max_bandwidth />
- <goals>
- <row idgoal='1'>
- <nb_conversions>1</nb_conversions>
- <revenue>10</revenue>
- <nb_conv_pages_before>4</nb_conv_pages_before>
- <nb_conversions_attrib>0.25</nb_conversions_attrib>
- <nb_conversions_page_rate>0</nb_conversions_page_rate>
- <nb_conversions_page_uniq>1</nb_conversions_page_uniq>
- <revenue_attrib>2.5</revenue_attrib>
- </row>
- </goals>
- <url>http://example.org/page_B</url>
- </row>
- <row>
- <label>/page_D</label>
- <nb_uniq_visitors>1</nb_uniq_visitors>
- <nb_hits>1</nb_hits>
- <sum_time_spent>0</sum_time_spent>
- <sum_time_generation>0</sum_time_generation>
- <nb_hits_with_time_generation>0</nb_hits_with_time_generation>
- <min_time_generation />
- <max_time_generation />
- <sum_time_network>0.0000</sum_time_network>
- <nb_hits_with_time_network>0</nb_hits_with_time_network>
- <min_time_network />
- <max_time_network />
- <sum_time_server>0.0000</sum_time_server>
- <nb_hits_with_time_server>0</nb_hits_with_time_server>
- <min_time_server />
- <max_time_server />
- <sum_time_transfer>0.0000</sum_time_transfer>
- <nb_hits_with_time_transfer>0</nb_hits_with_time_transfer>
- <min_time_transfer />
- <max_time_transfer />
- <sum_time_dom_processing>0.0000</sum_time_dom_processing>
- <nb_hits_with_time_dom_processing>0</nb_hits_with_time_dom_processing>
- <min_time_dom_processing />
- <max_time_dom_processing />
- <sum_time_dom_completion>0.0000</sum_time_dom_completion>
- <nb_hits_with_time_dom_completion>0</nb_hits_with_time_dom_completion>
- <min_time_dom_completion />
- <max_time_dom_completion />
- <sum_time_on_load>0.0000</sum_time_on_load>
- <nb_hits_with_time_on_load>0</nb_hits_with_time_on_load>
- <min_time_on_load />
- <max_time_on_load />
- <sum_bandwidth>0</sum_bandwidth>
- <nb_hits_with_bandwidth>0</nb_hits_with_bandwidth>
- <min_bandwidth />
- <max_bandwidth />
- <exit_nb_uniq_visitors>1</exit_nb_uniq_visitors>
- <exit_nb_visits>1</exit_nb_visits>
- <url>http://example.org/page_D</url>
- </row>
-</result> \ No newline at end of file
diff --git a/plugins/Goals/tests/System/expected/test_trackGoals_pages__Goals.getPagesTitles_day.xml b/plugins/Goals/tests/System/expected/test_trackGoals_pages__Goals.getPagesTitles_day.xml
deleted file mode 100644
index f9358cc8c7..0000000000
--- a/plugins/Goals/tests/System/expected/test_trackGoals_pages__Goals.getPagesTitles_day.xml
+++ /dev/null
@@ -1,199 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<result>
- <row>
- <label> Page A</label>
- <nb_uniq_visitors>3</nb_uniq_visitors>
- <nb_hits>4</nb_hits>
- <sum_time_spent>1440</sum_time_spent>
- <sum_time_generation>0</sum_time_generation>
- <nb_hits_with_time_generation>0</nb_hits_with_time_generation>
- <min_time_generation />
- <max_time_generation />
- <sum_time_network>0.0000</sum_time_network>
- <nb_hits_with_time_network>0</nb_hits_with_time_network>
- <min_time_network />
- <max_time_network />
- <sum_time_server>0.0000</sum_time_server>
- <nb_hits_with_time_server>0</nb_hits_with_time_server>
- <min_time_server />
- <max_time_server />
- <sum_time_transfer>0.0000</sum_time_transfer>
- <nb_hits_with_time_transfer>0</nb_hits_with_time_transfer>
- <min_time_transfer />
- <max_time_transfer />
- <sum_time_dom_processing>0.0000</sum_time_dom_processing>
- <nb_hits_with_time_dom_processing>0</nb_hits_with_time_dom_processing>
- <min_time_dom_processing />
- <max_time_dom_processing />
- <sum_time_dom_completion>0.0000</sum_time_dom_completion>
- <nb_hits_with_time_dom_completion>0</nb_hits_with_time_dom_completion>
- <min_time_dom_completion />
- <max_time_dom_completion />
- <sum_time_on_load>0.0000</sum_time_on_load>
- <nb_hits_with_time_on_load>0</nb_hits_with_time_on_load>
- <min_time_on_load />
- <max_time_on_load />
- <sum_bandwidth>0</sum_bandwidth>
- <nb_hits_with_bandwidth>0</nb_hits_with_bandwidth>
- <min_bandwidth />
- <max_bandwidth />
- <entry_nb_uniq_visitors>3</entry_nb_uniq_visitors>
- <entry_nb_visits>3</entry_nb_visits>
- <entry_nb_actions>10</entry_nb_actions>
- <entry_sum_visit_length>2525</entry_sum_visit_length>
- <entry_bounce_count>0</entry_bounce_count>
- <goals>
- <row idgoal='1'>
- <revenue>30</revenue>
- <nb_conversions_attrib>1</nb_conversions_attrib>
- <nb_conversions_page_rate>1</nb_conversions_page_rate>
- <revenue_attrib>10</revenue_attrib>
- <revenue_entry>20</revenue_entry>
- <nb_conversions_entry_rate>0.667</nb_conversions_entry_rate>
- <revenue_per_entry>6.667</revenue_per_entry>
- <nb_conversions_entry>2</nb_conversions_entry>
- </row>
- </goals>
- <goal_1_nb_conversions_page_rate>1</goal_1_nb_conversions_page_rate>
- <page_title_path>Page A</page_title_path>
- </row>
- <row>
- <label> Page C</label>
- <nb_uniq_visitors>2</nb_uniq_visitors>
- <nb_hits>2</nb_hits>
- <sum_time_spent>0</sum_time_spent>
- <sum_time_generation>0</sum_time_generation>
- <nb_hits_with_time_generation>0</nb_hits_with_time_generation>
- <min_time_generation />
- <max_time_generation />
- <sum_time_network>0.0000</sum_time_network>
- <nb_hits_with_time_network>0</nb_hits_with_time_network>
- <min_time_network />
- <max_time_network />
- <sum_time_server>0.0000</sum_time_server>
- <nb_hits_with_time_server>0</nb_hits_with_time_server>
- <min_time_server />
- <max_time_server />
- <sum_time_transfer>0.0000</sum_time_transfer>
- <nb_hits_with_time_transfer>0</nb_hits_with_time_transfer>
- <min_time_transfer />
- <max_time_transfer />
- <sum_time_dom_processing>0.0000</sum_time_dom_processing>
- <nb_hits_with_time_dom_processing>0</nb_hits_with_time_dom_processing>
- <min_time_dom_processing />
- <max_time_dom_processing />
- <sum_time_dom_completion>0.0000</sum_time_dom_completion>
- <nb_hits_with_time_dom_completion>0</nb_hits_with_time_dom_completion>
- <min_time_dom_completion />
- <max_time_dom_completion />
- <sum_time_on_load>0.0000</sum_time_on_load>
- <nb_hits_with_time_on_load>0</nb_hits_with_time_on_load>
- <min_time_on_load />
- <max_time_on_load />
- <sum_bandwidth>0</sum_bandwidth>
- <nb_hits_with_bandwidth>0</nb_hits_with_bandwidth>
- <min_bandwidth />
- <max_bandwidth />
- <exit_nb_uniq_visitors>2</exit_nb_uniq_visitors>
- <exit_nb_visits>2</exit_nb_visits>
- <goals>
- <row idgoal='1'>
- <revenue>20</revenue>
- <nb_conversions_attrib>0.75</nb_conversions_attrib>
- <nb_conversions_page_rate>1</nb_conversions_page_rate>
- <revenue_attrib>7.5</revenue_attrib>
- </row>
- </goals>
- <goal_1_nb_conversions_page_rate>1</goal_1_nb_conversions_page_rate>
- <page_title_path>Page C</page_title_path>
- </row>
- <row>
- <label> Page B</label>
- <nb_uniq_visitors>1</nb_uniq_visitors>
- <nb_hits>1</nb_hits>
- <sum_time_spent>360</sum_time_spent>
- <sum_time_generation>0</sum_time_generation>
- <nb_hits_with_time_generation>0</nb_hits_with_time_generation>
- <min_time_generation />
- <max_time_generation />
- <sum_time_network>0.0000</sum_time_network>
- <nb_hits_with_time_network>0</nb_hits_with_time_network>
- <min_time_network />
- <max_time_network />
- <sum_time_server>0.0000</sum_time_server>
- <nb_hits_with_time_server>0</nb_hits_with_time_server>
- <min_time_server />
- <max_time_server />
- <sum_time_transfer>0.0000</sum_time_transfer>
- <nb_hits_with_time_transfer>0</nb_hits_with_time_transfer>
- <min_time_transfer />
- <max_time_transfer />
- <sum_time_dom_processing>0.0000</sum_time_dom_processing>
- <nb_hits_with_time_dom_processing>0</nb_hits_with_time_dom_processing>
- <min_time_dom_processing />
- <max_time_dom_processing />
- <sum_time_dom_completion>0.0000</sum_time_dom_completion>
- <nb_hits_with_time_dom_completion>0</nb_hits_with_time_dom_completion>
- <min_time_dom_completion />
- <max_time_dom_completion />
- <sum_time_on_load>0.0000</sum_time_on_load>
- <nb_hits_with_time_on_load>0</nb_hits_with_time_on_load>
- <min_time_on_load />
- <max_time_on_load />
- <sum_bandwidth>0</sum_bandwidth>
- <nb_hits_with_bandwidth>0</nb_hits_with_bandwidth>
- <min_bandwidth />
- <max_bandwidth />
- <goals>
- <row idgoal='1'>
- <revenue>10</revenue>
- <nb_conversions_attrib>0.25</nb_conversions_attrib>
- <nb_conversions_page_rate>0.5</nb_conversions_page_rate>
- <revenue_attrib>2.5</revenue_attrib>
- </row>
- </goals>
- <goal_1_nb_conversions_page_rate>0.5</goal_1_nb_conversions_page_rate>
- <page_title_path>Page B</page_title_path>
- </row>
- <row>
- <label> Page D</label>
- <nb_uniq_visitors>1</nb_uniq_visitors>
- <nb_hits>1</nb_hits>
- <sum_time_spent>0</sum_time_spent>
- <sum_time_generation>0</sum_time_generation>
- <nb_hits_with_time_generation>0</nb_hits_with_time_generation>
- <min_time_generation />
- <max_time_generation />
- <sum_time_network>0.0000</sum_time_network>
- <nb_hits_with_time_network>0</nb_hits_with_time_network>
- <min_time_network />
- <max_time_network />
- <sum_time_server>0.0000</sum_time_server>
- <nb_hits_with_time_server>0</nb_hits_with_time_server>
- <min_time_server />
- <max_time_server />
- <sum_time_transfer>0.0000</sum_time_transfer>
- <nb_hits_with_time_transfer>0</nb_hits_with_time_transfer>
- <min_time_transfer />
- <max_time_transfer />
- <sum_time_dom_processing>0.0000</sum_time_dom_processing>
- <nb_hits_with_time_dom_processing>0</nb_hits_with_time_dom_processing>
- <min_time_dom_processing />
- <max_time_dom_processing />
- <sum_time_dom_completion>0.0000</sum_time_dom_completion>
- <nb_hits_with_time_dom_completion>0</nb_hits_with_time_dom_completion>
- <min_time_dom_completion />
- <max_time_dom_completion />
- <sum_time_on_load>0.0000</sum_time_on_load>
- <nb_hits_with_time_on_load>0</nb_hits_with_time_on_load>
- <min_time_on_load />
- <max_time_on_load />
- <sum_bandwidth>0</sum_bandwidth>
- <nb_hits_with_bandwidth>0</nb_hits_with_bandwidth>
- <min_bandwidth />
- <max_bandwidth />
- <exit_nb_uniq_visitors>1</exit_nb_uniq_visitors>
- <exit_nb_visits>1</exit_nb_visits>
- <page_title_path>Page D</page_title_path>
- </row>
-</result> \ No newline at end of file
diff --git a/plugins/Goals/tests/System/expected/test_trackGoals_pages__Goals.getPagesUrl_day.xml b/plugins/Goals/tests/System/expected/test_trackGoals_pages__Goals.getPagesUrl_day.xml
deleted file mode 100644
index be95cd7749..0000000000
--- a/plugins/Goals/tests/System/expected/test_trackGoals_pages__Goals.getPagesUrl_day.xml
+++ /dev/null
@@ -1,199 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<result>
- <row>
- <label>/page_A</label>
- <nb_uniq_visitors>3</nb_uniq_visitors>
- <nb_hits>4</nb_hits>
- <sum_time_spent>1440</sum_time_spent>
- <sum_time_generation>0</sum_time_generation>
- <nb_hits_with_time_generation>0</nb_hits_with_time_generation>
- <min_time_generation />
- <max_time_generation />
- <sum_time_network>0.0000</sum_time_network>
- <nb_hits_with_time_network>0</nb_hits_with_time_network>
- <min_time_network />
- <max_time_network />
- <sum_time_server>0.0000</sum_time_server>
- <nb_hits_with_time_server>0</nb_hits_with_time_server>
- <min_time_server />
- <max_time_server />
- <sum_time_transfer>0.0000</sum_time_transfer>
- <nb_hits_with_time_transfer>0</nb_hits_with_time_transfer>
- <min_time_transfer />
- <max_time_transfer />
- <sum_time_dom_processing>0.0000</sum_time_dom_processing>
- <nb_hits_with_time_dom_processing>0</nb_hits_with_time_dom_processing>
- <min_time_dom_processing />
- <max_time_dom_processing />
- <sum_time_dom_completion>0.0000</sum_time_dom_completion>
- <nb_hits_with_time_dom_completion>0</nb_hits_with_time_dom_completion>
- <min_time_dom_completion />
- <max_time_dom_completion />
- <sum_time_on_load>0.0000</sum_time_on_load>
- <nb_hits_with_time_on_load>0</nb_hits_with_time_on_load>
- <min_time_on_load />
- <max_time_on_load />
- <sum_bandwidth>0</sum_bandwidth>
- <nb_hits_with_bandwidth>0</nb_hits_with_bandwidth>
- <min_bandwidth />
- <max_bandwidth />
- <entry_nb_uniq_visitors>3</entry_nb_uniq_visitors>
- <entry_nb_visits>3</entry_nb_visits>
- <entry_nb_actions>10</entry_nb_actions>
- <entry_sum_visit_length>2525</entry_sum_visit_length>
- <entry_bounce_count>0</entry_bounce_count>
- <goals>
- <row idgoal='1'>
- <revenue>30</revenue>
- <nb_conversions_attrib>1</nb_conversions_attrib>
- <nb_conversions_page_rate>1</nb_conversions_page_rate>
- <revenue_attrib>10</revenue_attrib>
- <revenue_entry>20</revenue_entry>
- <nb_conversions_entry_rate>0.667</nb_conversions_entry_rate>
- <revenue_per_entry>6.667</revenue_per_entry>
- <nb_conversions_entry>2</nb_conversions_entry>
- </row>
- </goals>
- <goal_1_nb_conversions_page_rate>1</goal_1_nb_conversions_page_rate>
- <url>http://example.org/page_A</url>
- </row>
- <row>
- <label>/page_C</label>
- <nb_uniq_visitors>2</nb_uniq_visitors>
- <nb_hits>2</nb_hits>
- <sum_time_spent>0</sum_time_spent>
- <sum_time_generation>0</sum_time_generation>
- <nb_hits_with_time_generation>0</nb_hits_with_time_generation>
- <min_time_generation />
- <max_time_generation />
- <sum_time_network>0.0000</sum_time_network>
- <nb_hits_with_time_network>0</nb_hits_with_time_network>
- <min_time_network />
- <max_time_network />
- <sum_time_server>0.0000</sum_time_server>
- <nb_hits_with_time_server>0</nb_hits_with_time_server>
- <min_time_server />
- <max_time_server />
- <sum_time_transfer>0.0000</sum_time_transfer>
- <nb_hits_with_time_transfer>0</nb_hits_with_time_transfer>
- <min_time_transfer />
- <max_time_transfer />
- <sum_time_dom_processing>0.0000</sum_time_dom_processing>
- <nb_hits_with_time_dom_processing>0</nb_hits_with_time_dom_processing>
- <min_time_dom_processing />
- <max_time_dom_processing />
- <sum_time_dom_completion>0.0000</sum_time_dom_completion>
- <nb_hits_with_time_dom_completion>0</nb_hits_with_time_dom_completion>
- <min_time_dom_completion />
- <max_time_dom_completion />
- <sum_time_on_load>0.0000</sum_time_on_load>
- <nb_hits_with_time_on_load>0</nb_hits_with_time_on_load>
- <min_time_on_load />
- <max_time_on_load />
- <sum_bandwidth>0</sum_bandwidth>
- <nb_hits_with_bandwidth>0</nb_hits_with_bandwidth>
- <min_bandwidth />
- <max_bandwidth />
- <exit_nb_uniq_visitors>2</exit_nb_uniq_visitors>
- <exit_nb_visits>2</exit_nb_visits>
- <goals>
- <row idgoal='1'>
- <revenue>20</revenue>
- <nb_conversions_attrib>0.75</nb_conversions_attrib>
- <nb_conversions_page_rate>1</nb_conversions_page_rate>
- <revenue_attrib>7.5</revenue_attrib>
- </row>
- </goals>
- <goal_1_nb_conversions_page_rate>1</goal_1_nb_conversions_page_rate>
- <url>http://example.org/page_C</url>
- </row>
- <row>
- <label>/page_B</label>
- <nb_uniq_visitors>1</nb_uniq_visitors>
- <nb_hits>1</nb_hits>
- <sum_time_spent>360</sum_time_spent>
- <sum_time_generation>0</sum_time_generation>
- <nb_hits_with_time_generation>0</nb_hits_with_time_generation>
- <min_time_generation />
- <max_time_generation />
- <sum_time_network>0.0000</sum_time_network>
- <nb_hits_with_time_network>0</nb_hits_with_time_network>
- <min_time_network />
- <max_time_network />
- <sum_time_server>0.0000</sum_time_server>
- <nb_hits_with_time_server>0</nb_hits_with_time_server>
- <min_time_server />
- <max_time_server />
- <sum_time_transfer>0.0000</sum_time_transfer>
- <nb_hits_with_time_transfer>0</nb_hits_with_time_transfer>
- <min_time_transfer />
- <max_time_transfer />
- <sum_time_dom_processing>0.0000</sum_time_dom_processing>
- <nb_hits_with_time_dom_processing>0</nb_hits_with_time_dom_processing>
- <min_time_dom_processing />
- <max_time_dom_processing />
- <sum_time_dom_completion>0.0000</sum_time_dom_completion>
- <nb_hits_with_time_dom_completion>0</nb_hits_with_time_dom_completion>
- <min_time_dom_completion />
- <max_time_dom_completion />
- <sum_time_on_load>0.0000</sum_time_on_load>
- <nb_hits_with_time_on_load>0</nb_hits_with_time_on_load>
- <min_time_on_load />
- <max_time_on_load />
- <sum_bandwidth>0</sum_bandwidth>
- <nb_hits_with_bandwidth>0</nb_hits_with_bandwidth>
- <min_bandwidth />
- <max_bandwidth />
- <goals>
- <row idgoal='1'>
- <revenue>10</revenue>
- <nb_conversions_attrib>0.25</nb_conversions_attrib>
- <nb_conversions_page_rate>0.5</nb_conversions_page_rate>
- <revenue_attrib>2.5</revenue_attrib>
- </row>
- </goals>
- <goal_1_nb_conversions_page_rate>0.5</goal_1_nb_conversions_page_rate>
- <url>http://example.org/page_B</url>
- </row>
- <row>
- <label>/page_D</label>
- <nb_uniq_visitors>1</nb_uniq_visitors>
- <nb_hits>1</nb_hits>
- <sum_time_spent>0</sum_time_spent>
- <sum_time_generation>0</sum_time_generation>
- <nb_hits_with_time_generation>0</nb_hits_with_time_generation>
- <min_time_generation />
- <max_time_generation />
- <sum_time_network>0.0000</sum_time_network>
- <nb_hits_with_time_network>0</nb_hits_with_time_network>
- <min_time_network />
- <max_time_network />
- <sum_time_server>0.0000</sum_time_server>
- <nb_hits_with_time_server>0</nb_hits_with_time_server>
- <min_time_server />
- <max_time_server />
- <sum_time_transfer>0.0000</sum_time_transfer>
- <nb_hits_with_time_transfer>0</nb_hits_with_time_transfer>
- <min_time_transfer />
- <max_time_transfer />
- <sum_time_dom_processing>0.0000</sum_time_dom_processing>
- <nb_hits_with_time_dom_processing>0</nb_hits_with_time_dom_processing>
- <min_time_dom_processing />
- <max_time_dom_processing />
- <sum_time_dom_completion>0.0000</sum_time_dom_completion>
- <nb_hits_with_time_dom_completion>0</nb_hits_with_time_dom_completion>
- <min_time_dom_completion />
- <max_time_dom_completion />
- <sum_time_on_load>0.0000</sum_time_on_load>
- <nb_hits_with_time_on_load>0</nb_hits_with_time_on_load>
- <min_time_on_load />
- <max_time_on_load />
- <sum_bandwidth>0</sum_bandwidth>
- <nb_hits_with_bandwidth>0</nb_hits_with_bandwidth>
- <min_bandwidth />
- <max_bandwidth />
- <exit_nb_uniq_visitors>1</exit_nb_uniq_visitors>
- <exit_nb_visits>1</exit_nb_visits>
- <url>http://example.org/page_D</url>
- </row>
-</result> \ No newline at end of file
diff --git a/plugins/Goals/tests/UI/Goals_spec.js b/plugins/Goals/tests/UI/Goals_spec.js
index dd1ab7e3cd..6b25a29237 100644
--- a/plugins/Goals/tests/UI/Goals_spec.js
+++ b/plugins/Goals/tests/UI/Goals_spec.js
@@ -23,7 +23,7 @@ describe("Goals", function () {
it('should show goals by page', async function() {
await page.evaluate(function(){
- $('div.dimensionCategory:nth-child(2) > ul:nth-child(1) > li:nth-child(2)').click();
+ $('div.dimensionCategory:nth-child(2) > ul:nth-child(1) > li:nth-child(1)').click();
});
await page.waitForSelector('.dimensionReport');
@@ -36,7 +36,7 @@ describe("Goals", function () {
it('should show goals by page titles', async function() {
await page.evaluate(function(){
- $('div.dimensionCategory:nth-child(2) > ul:nth-child(1) > li:nth-child(4)').click();
+ $('div.dimensionCategory:nth-child(2) > ul:nth-child(1) > li:nth-child(3)').click();
});
await page.waitForSelector('.dimensionReport');
@@ -49,7 +49,7 @@ describe("Goals", function () {
it('should show goals by entry page', async function() {
await page.evaluate(function(){
- $('div.dimensionCategory:nth-child(2) > ul:nth-child(1) > li:nth-child(3)').click();
+ $('div.dimensionCategory:nth-child(2) > ul:nth-child(1) > li:nth-child(2)').click();
});
await page.waitForSelector('.dimensionReport');
@@ -62,7 +62,7 @@ describe("Goals", function () {
it('should show goals by entry page titles', async function() {
await page.evaluate(function(){
- $('.datatableRelatedReports > ul:nth-child(1) > li:nth-child(2) > span:nth-child(1)').click();
+ $('.div.dimensionCategory:nth-child(2) > ul:nth-child(1) > li:nth-child(4)').click();
});
await page.waitForSelector('.dimensionReport');
diff --git a/tests/PHPUnit/Framework/TestRequest/ApiTestConfig.php b/tests/PHPUnit/Framework/TestRequest/ApiTestConfig.php
index 9e1d50efdc..7c95279f6e 100644
--- a/tests/PHPUnit/Framework/TestRequest/ApiTestConfig.php
+++ b/tests/PHPUnit/Framework/TestRequest/ApiTestConfig.php
@@ -93,6 +93,13 @@ class ApiTestConfig
public $idGoal = false;
/**
+ * The value to use for the idGoal query parameter.
+ *
+ * @var int|bool
+ */
+ public $includeGoals = false;
+
+ /**
* The value to use for the apiModule query parameter.
*
* @var string|false