diff options
author | Thomas Steur <tsteur@users.noreply.github.com> | 2018-12-07 05:28:25 +0300 |
---|---|---|
committer | diosmosis <diosmosis@users.noreply.github.com> | 2018-12-07 05:28:25 +0300 |
commit | 53c4d95a4b60ee099400db8c36ac64a68ffa37a3 (patch) | |
tree | 1a6918e045fb9d5a6fe35531854be98faafeb86f | |
parent | 6eb10a35e6388c62b88d77edc5055daa519de32d (diff) |
Some work on report totals (#13555)
* some work on totals
* fix graphs
* tweak rendering of totals row
* disable evolution for totals row
* let plugins configure totals row visibility
* remove metadata
* more tweaks and make it configurable
* improve code and performance
* fix some tests
* lots of improvements
* support bandwidth and other plugins
* fix tests
* add screenshot test
* also fix existing test
* add new method supportsTotalRow
* various fixes
* Updating some expected test files.
65 files changed, 695 insertions, 100 deletions
diff --git a/core/API/DataTableManipulator/Flattener.php b/core/API/DataTableManipulator/Flattener.php index 90aa4775bb..5a6bf534b1 100644 --- a/core/API/DataTableManipulator/Flattener.php +++ b/core/API/DataTableManipulator/Flattener.php @@ -62,6 +62,9 @@ class Flattener extends DataTableManipulator protected function manipulateDataTable($dataTable) { $newDataTable = $dataTable->getEmptyClone($keepFilters = true); + if ($dataTable->getTotalsRow()) { + $newDataTable->setTotalsRow($dataTable->getTotalsRow()); + } // this recursive filter will be applied to subtables $dataTable->filter('ReplaceSummaryRowLabel'); diff --git a/core/API/DataTableManipulator/ReportTotalsCalculator.php b/core/API/DataTableManipulator/ReportTotalsCalculator.php index 08dbfdb0df..dd6076834c 100644 --- a/core/API/DataTableManipulator/ReportTotalsCalculator.php +++ b/core/API/DataTableManipulator/ReportTotalsCalculator.php @@ -9,9 +9,12 @@ namespace Piwik\API\DataTableManipulator; use Piwik\API\DataTableManipulator; +use Piwik\API\DataTablePostProcessor; +use Piwik\Common; use Piwik\DataTable; use Piwik\Metrics; use Piwik\Period; +use Piwik\Piwik; use Piwik\Plugin\Report; use Piwik\Plugin\ReportsProvider; @@ -23,12 +26,6 @@ use Piwik\Plugin\ReportsProvider; class ReportTotalsCalculator extends DataTableManipulator { /** - * Array [readableMetric] => [summed value] - * @var array - */ - private $totals = array(); - - /** * @var Report */ private $report; @@ -83,30 +80,76 @@ class ReportTotalsCalculator extends DataTableManipulator return $dataTable; } - $this->totals = array(); - $firstLevelTable = $this->makeSureToWorkOnFirstLevelDataTable($dataTable); - $metricsToCalculate = Metrics::getMetricIdsToProcessReportTotal(); + if (1 != Common::getRequestVar('totals', 1, 'integer', $this->request)) { + return $dataTable; + } + + $firstLevelTable = $this->makeSureToWorkOnFirstLevelDataTable($dataTable); - $metricNames = array(); - foreach ($metricsToCalculate as $metricId) { - $metricNames[$metricId] = Metrics::getReadableColumnName($metricId); + if (!$firstLevelTable->getRowsCount()) { + return $dataTable; } - if (!empty($this->report)) { - $reportMetrics = $this->report->getMetricNamesToProcessReportTotals(); - foreach ($reportMetrics as $metricId => $metricName) { - $metricNames[$metricId] = $metricName; + // keeping queued filters would not only add various metadata but also break the totals calculator for some reports + // eg when needed metadata is missing to get site information (multisites.getall) etc + $clone = $firstLevelTable->getEmptyClone($keepFilters = false); + foreach ($firstLevelTable->getQueuedFilters() as $queuedFilter) { + if (is_array($queuedFilter) && 'ReplaceColumnNames' === $queuedFilter['className']) { + $clone->queueFilter($queuedFilter['className'], $queuedFilter['parameters']); } } + $tableMeta = $firstLevelTable->getMetadata(DataTable::COLUMN_AGGREGATION_OPS_METADATA_NAME); + /** @var DataTable\Row $totalRow */ + $totalRow = null; foreach ($firstLevelTable->getRows() as $row) { - $columns = $row->getColumns(); - foreach ($metricNames as $metricId => $metricName) { - $this->sumColumnValueToTotal($columns, $metricId, $metricName); + if (!isset($totalRow)) { + $columns = $row->getColumns(); + $columns['label'] = DataTable::LABEL_TOTALS_ROW; + $totalRow = new DataTable\Row(array(DataTable\Row::COLUMNS => $columns)); + } else { + $totalRow->sumRow($row, $copyMetadata = false, $tableMeta); } } + $clone->addRow($totalRow); - $dataTable->setMetadata('totals', $this->totals); + if ($this->report + && $this->report->getProcessedMetrics() + && array_keys($this->report->getProcessedMetrics()) === array('nb_actions_per_visit', 'avg_time_on_site', 'bounce_rate', 'conversion_rate')) { + // hack for AllColumns table or default processed metrics + $clone->filter('AddColumnsProcessedMetrics', array($deleteRowsWithNoVisit = false)); + } + + $processor = new DataTablePostProcessor($this->apiModule, $this->apiMethod, $this->request); + $processor->applyComputeProcessedMetrics($clone); + $clone = $processor->applyQueuedFilters($clone); + $clone = $processor->applyMetricsFormatting($clone); + + $totalRow = null; + foreach ($clone->getRows() as $row) { + /** * @var DataTable\Row $row */ + if ($row->getColumn('label') === DataTable::LABEL_TOTALS_ROW) { + $totalRow = $row; + break; + } + } + + if (!isset($totalRow) && $clone->getRowsCount() === 1) { + // if for some reason the processor renamed the totals row, + $totalRow = $clone->getFirstRow(); + } + + if (isset($totalRow)) { + $totals = $row->getColumns(); + unset($totals['label']); + $dataTable->setMetadata('totals', $totals); + + if (1 === Common::getRequestVar('keep_totals_row', 0, 'integer', $this->request)) { + $row->deleteMetadata(false); + $row->setColumn('label', Piwik::translate('General_Totals')); + $dataTable->setTotalsRow($row); + } + } return $dataTable; } @@ -154,42 +197,6 @@ class ReportTotalsCalculator extends DataTableManipulator return $table; } - private function sumColumnValueToTotal($columns, $metricId, $metricName) - { - $value = false; - if (array_key_exists($metricId, $columns)) { - $value = $columns[$metricId]; - } - - if ($value === false) { - // we do not add $metricId to $possibleMetricNames for a small performance improvement since in most cases - // $metricId should be present in $columns so we avoid this foreach loop - $possibleMetricNames = array( - $metricName, - // TODO: this and below is a hack to get report totals to work correctly w/ MultiSites.getAll. can be corrected - // when all metrics are described by Metadata classes & internal naming quirks are handled by core system. - 'Goal_' . $metricName, - 'Actions_' . $metricName - ); - foreach ($possibleMetricNames as $possibleMetricName) { - if (array_key_exists($possibleMetricName, $columns)) { - $value = $columns[$possibleMetricName]; - break; - } - } - - if ($value === false) { - return; - } - } - - if (array_key_exists($metricName, $this->totals)) { - $this->totals[$metricName] += $value; - } else { - $this->totals[$metricName] = $value; - } - } - /** * Make sure to get all rows of the first level table. * diff --git a/core/DataTable.php b/core/DataTable.php index b14281938c..2f546d2905 100644 --- a/core/DataTable.php +++ b/core/DataTable.php @@ -197,6 +197,7 @@ class DataTable implements DataTableInterface, \IteratorAggregate, \ArrayAccess /** The original label of the Summary Row. */ const LABEL_SUMMARY_ROW = -1; + const LABEL_TOTALS_ROW = -2; /** * Name for metadata that contains extra {@link Piwik\Plugin\ProcessedMetric}s for a DataTable. @@ -302,6 +303,11 @@ class DataTable implements DataTableInterface, \IteratorAggregate, \ArrayAccess protected $summaryRow = null; /** + * @var \Piwik\DataTable\Row + */ + protected $totalsRow = null; + + /** * Table metadata. Read [this](#class-desc-the-basics) to learn more. * * Any data that describes the data held in the table's rows should go here. @@ -402,6 +408,16 @@ class DataTable implements DataTableInterface, \IteratorAggregate, \ArrayAccess } } + public function setTotalsRow(Row $totalsRow) + { + $this->totalsRow = $totalsRow; + } + + public function getTotalsRow() + { + return $this->totalsRow; + } + /** * Returns the name of the column this table was sorted by (if any). * @@ -1868,6 +1884,11 @@ class DataTable implements DataTableInterface, \IteratorAggregate, \ArrayAccess $this->queuedFilters = array(); } + public function getQueuedFilters() + { + return $this->queuedFilters; + } + /** * @return \ArrayIterator|Row[] */ diff --git a/core/Plugin/Visualization.php b/core/Plugin/Visualization.php index 4a895df666..71c9eca248 100644 --- a/core/Plugin/Visualization.php +++ b/core/Plugin/Visualization.php @@ -21,11 +21,9 @@ use Piwik\Log; use Piwik\Metrics\Formatter\Html as HtmlFormatter; use Piwik\NoAccessException; use Piwik\Option; -use Piwik\Period; use Piwik\Piwik; use Piwik\Plugins\API\API as ApiApi; use Piwik\Plugins\PrivacyManager\PrivacyManager; -use Piwik\Plugin\ReportsProvider; use Piwik\View; use Piwik\ViewDataTable\Manager as ViewDataTableManager; use Piwik\Plugin\Manager as PluginManager; diff --git a/core/ViewDataTable/Request.php b/core/ViewDataTable/Request.php index 8eff081179..11cb0625a2 100644 --- a/core/ViewDataTable/Request.php +++ b/core/ViewDataTable/Request.php @@ -62,6 +62,7 @@ class Request $toSetEventually = array( 'filter_limit', + 'keep_totals_row', 'keep_summary_row', 'filter_sort_column', 'filter_sort_order', diff --git a/core/ViewDataTable/RequestConfig.php b/core/ViewDataTable/RequestConfig.php index 9be2476f78..2c54377dc2 100644 --- a/core/ViewDataTable/RequestConfig.php +++ b/core/ViewDataTable/RequestConfig.php @@ -90,6 +90,7 @@ class RequestConfig 'filter_column', 'filter_offset', 'flat', + 'totals', 'expanded', 'pivotBy', 'pivotByColumn', @@ -111,6 +112,7 @@ class RequestConfig 'disable_generic_filters', 'disable_queued_filters', 'flat', + 'totals', 'expanded', 'pivotBy', 'pivotByColumn', @@ -149,6 +151,14 @@ class RequestConfig public $flat = false; /** + * If set to true, the report may calculate totals information and show percentage values for each row in relative + * to the total value. + * + * Default value: false + */ + public $totals = true; + + /** * If set to true, the returned data will contain the first level results, as well as all sub-tables. * * Default value: false diff --git a/lang/en.json b/lang/en.json index 7444d0f1ed..c7ab56eacf 100644 --- a/lang/en.json +++ b/lang/en.json @@ -413,6 +413,7 @@ "ToDeleteAllDirectoriesRunThisCommand": "To delete all these directories at once, you can run this command:", "ToDeleteAllFilesRunThisCommand": "To delete all these files at once, you can run this command:", "Total": "Total", + "Totals": "Totals", "TotalRatioTooltip": "This is %1$s of all %2$s %3$s.", "TotalRevenue": "Total Revenue", "TotalVisitsPageviewsActionsRevenue": "(Total: %1$s visits, %2$s pageviews, %3$s actions, %4$s revenue)", diff --git a/plugins/Contents/tests/System/expected/test_Contents_Contents.getContentNames_lastN__API.getProcessedReport_day.xml b/plugins/Contents/tests/System/expected/test_Contents_Contents.getContentNames_lastN__API.getProcessedReport_day.xml index 4af125d6bb..3626338034 100644 --- a/plugins/Contents/tests/System/expected/test_Contents_Contents.getContentNames_lastN__API.getProcessedReport_day.xml +++ b/plugins/Contents/tests/System/expected/test_Contents_Contents.getContentNames_lastN__API.getProcessedReport_day.xml @@ -86,7 +86,10 @@ <result prettyDate="Saturday, January 9, 2010" /> </reportMetadata> <reportTotal> - <nb_visits>16</nb_visits> <nb_uniq_visitors>16</nb_uniq_visitors> + <nb_visits>16</nb_visits> + <nb_impressions>18</nb_impressions> + <nb_interactions>6</nb_interactions> + <interaction_rate>33.33%</interaction_rate> </reportTotal> </result>
\ No newline at end of file diff --git a/plugins/Contents/tests/System/expected/test_Contents_Contents.getContentPieces_lastN__API.getProcessedReport_day.xml b/plugins/Contents/tests/System/expected/test_Contents_Contents.getContentPieces_lastN__API.getProcessedReport_day.xml index 3372acc13f..06ba5b5797 100644 --- a/plugins/Contents/tests/System/expected/test_Contents_Contents.getContentPieces_lastN__API.getProcessedReport_day.xml +++ b/plugins/Contents/tests/System/expected/test_Contents_Contents.getContentPieces_lastN__API.getProcessedReport_day.xml @@ -129,7 +129,10 @@ <result prettyDate="Saturday, January 9, 2010" /> </reportMetadata> <reportTotal> - <nb_visits>16</nb_visits> <nb_uniq_visitors>16</nb_uniq_visitors> + <nb_visits>16</nb_visits> + <nb_impressions>18</nb_impressions> + <nb_interactions>6</nb_interactions> + <interaction_rate>33.33%</interaction_rate> </reportTotal> </result>
\ No newline at end of file diff --git a/plugins/CoreHome/CoreHome.php b/plugins/CoreHome/CoreHome.php index ab11a468eb..f952b8508b 100644 --- a/plugins/CoreHome/CoreHome.php +++ b/plugins/CoreHome/CoreHome.php @@ -336,6 +336,8 @@ class CoreHome extends \Piwik\Plugin $translationKeys[] = 'CoreHome_ExternalHelp'; $translationKeys[] = 'CoreHome_ClickToEditX'; $translationKeys[] = 'CoreHome_Menu'; + $translationKeys[] = 'CoreHome_AddTotalsRowDataTable'; + $translationKeys[] = 'CoreHome_RemoveTotalsRowDataTable'; $translationKeys[] = 'SitesManager_NotFound'; $translationKeys[] = 'Annotations_ViewAndAddAnnotations'; $translationKeys[] = 'General_RowEvolutionRowActionTooltipTitle'; diff --git a/plugins/CoreHome/javascripts/dataTable.js b/plugins/CoreHome/javascripts/dataTable.js index 2570e24987..71852530a5 100644 --- a/plugins/CoreHome/javascripts/dataTable.js +++ b/plugins/CoreHome/javascripts/dataTable.js @@ -1294,6 +1294,13 @@ $.extend(DataTable.prototype, UIControl.prototype, { }) .click(generateClickCallback('flat')); + // handle flatten + $('.dataTableShowTotalsRow', domElem) + .each(function () { + setText(this, 'keep_totals_row', 'CoreHome_RemoveTotalsRowDataTable', 'CoreHome_AddTotalsRowDataTable'); + }) + .click(generateClickCallback('keep_totals_row')); + $('.dataTableIncludeAggregateRows', domElem) .each(function () { setText(this, 'include_aggregate_rows', 'CoreHome_DataTableExcludeAggregateRows', @@ -1975,6 +1982,7 @@ DataTable.registerFooterIconHandler('ecommerceAbandonedCart', switchToEcommerceV DataTable.switchToGraph = function (dataTable, viewDataTable) { var filters = dataTable.resetAllFilters(); dataTable.param.flat = filters.flat; + dataTable.param.keep_totals_row = filters.keep_totals_row; dataTable.param.columns = filters.columns; dataTable.param.viewDataTable = viewDataTable; diff --git a/plugins/CoreHome/javascripts/dataTable_rowactions.js b/plugins/CoreHome/javascripts/dataTable_rowactions.js index b937979cdf..7354f8ad1b 100644 --- a/plugins/CoreHome/javascripts/dataTable_rowactions.js +++ b/plugins/CoreHome/javascripts/dataTable_rowactions.js @@ -104,7 +104,7 @@ DataTable_RowActions_Registry.register({ }, isAvailableOnRow: function (dataTableParams, tr) { - return true; + return !tr.hasClass('totalsRow'); } }); diff --git a/plugins/CoreHome/lang/en.json b/plugins/CoreHome/lang/en.json index a74da65e9a..e0c8367cad 100644 --- a/plugins/CoreHome/lang/en.json +++ b/plugins/CoreHome/lang/en.json @@ -68,6 +68,8 @@ "TableNoData": "No data for this table.", "ThereIsNoDataForThisReport": "There is no data for this report.", "UnFlattenDataTable": "The report is flat %s Make it hierarchical", + "RemoveTotalsRowDataTable": "The report is showing the totals row %s Remove totals row", + "AddTotalsRowDataTable": "The report is not showing the totals row %s Show totals row", "ViewAllPiwikVideoTutorials": "View all Matomo Video Tutorials", "WebAnalyticsReports": "Web Analytics Reports", "YouAreUsingTheLatestVersion": "You are using the latest version of Matomo!", diff --git a/plugins/CoreHome/stylesheets/dataTable/_dataTable.less b/plugins/CoreHome/stylesheets/dataTable/_dataTable.less index a74d62b875..d15b3017a0 100644 --- a/plugins/CoreHome/stylesheets/dataTable/_dataTable.less +++ b/plugins/CoreHome/stylesheets/dataTable/_dataTable.less @@ -20,6 +20,13 @@ } } +table.dataTable .totalsRow { + font-weight: bold; + .ratio { + display: none; + } +} + table.dataTable td.label, table.subDataTable td.label { width: 100%; diff --git a/plugins/CoreHome/templates/_dataTableActions.twig b/plugins/CoreHome/templates/_dataTableActions.twig index 6ffed68619..3dc6c628be 100644 --- a/plugins/CoreHome/templates/_dataTableActions.twig +++ b/plugins/CoreHome/templates/_dataTableActions.twig @@ -114,6 +114,11 @@ <div class="configItem dataTableFlatten"></div> </li> {% endif %} + {% if not isDataTableEmpty and properties.show_totals_row|default(0) %} + <li> + <div class="configItem dataTableShowTotalsRow"></div> + </li> + {% endif %} {% if properties.show_exclude_low_population %} <li> <div class="configItem dataTableExcludeLowPopulation"></div> diff --git a/plugins/CoreHome/templates/_dataTableCell.twig b/plugins/CoreHome/templates/_dataTableCell.twig index d82a7bb851..a1b1c2c59a 100644 --- a/plugins/CoreHome/templates/_dataTableCell.twig +++ b/plugins/CoreHome/templates/_dataTableCell.twig @@ -12,7 +12,7 @@ {% endif %} {% set totals = dataTable.getMetadata('totals') %} -{% if column in totals|keys -%} +{% if column in properties.report_ratio_columns and column in totals|keys -%} {% set labelColumn = columns_to_display|first %} {% set reportTotal = totals[column] %} {% if siteSummary is defined and siteSummary is not empty and siteSummary.getFirstRow %} diff --git a/plugins/CoreVisualizations/Visualizations/HtmlTable.php b/plugins/CoreVisualizations/Visualizations/HtmlTable.php index 65866c8edf..adcf8e2bda 100644 --- a/plugins/CoreVisualizations/Visualizations/HtmlTable.php +++ b/plugins/CoreVisualizations/Visualizations/HtmlTable.php @@ -10,9 +10,9 @@ namespace Piwik\Plugins\CoreVisualizations\Visualizations; use Piwik\API\Request as ApiRequest; use Piwik\Common; +use Piwik\Metrics; use Piwik\Period; use Piwik\Plugin\Visualization; -use Piwik\View; /** * DataTable visualization that shows DataTable data in an HTML table. @@ -44,6 +44,19 @@ class HtmlTable extends Visualization $this->config->show_visualization_only = true; } + if ($this->requestConfig->idSubtable) { + $this->config->show_totals_row = false; + } + + foreach (Metrics::getMetricIdsToProcessReportTotal() as $metricId) { + $this->config->report_ratio_columns[] = Metrics::getReadableColumnName($metricId); + } + if (!empty($this->report)) { + foreach ($this->report->getMetricNamesToProcessReportTotals() as $metricName) { + $this->config->report_ratio_columns[] = $metricName; + } + } + // we do not want to get a datatable\map $period = Common::getRequestVar('period', 'day', 'string'); if (Period\Range::parseDateRange($period)) { diff --git a/plugins/CoreVisualizations/Visualizations/HtmlTable/Config.php b/plugins/CoreVisualizations/Visualizations/HtmlTable/Config.php index 9fa8163a6f..266a71e1b4 100644 --- a/plugins/CoreVisualizations/Visualizations/HtmlTable/Config.php +++ b/plugins/CoreVisualizations/Visualizations/HtmlTable/Config.php @@ -87,6 +87,19 @@ class Config extends VisualizationConfig */ public $highlight_summary_row = false; + /** + * If true, the totals row will be hidden + * + * Default value: false + */ + public $show_totals_row = true; + + /** + * A list of columns that support showing the ratio percentage on hover + * @var array + */ + public $report_ratio_columns = array(); + public function __construct() { parent::__construct(); diff --git a/plugins/CoreVisualizations/Visualizations/HtmlTable/RequestConfig.php b/plugins/CoreVisualizations/Visualizations/HtmlTable/RequestConfig.php index 2f674a5872..696569c618 100644 --- a/plugins/CoreVisualizations/Visualizations/HtmlTable/RequestConfig.php +++ b/plugins/CoreVisualizations/Visualizations/HtmlTable/RequestConfig.php @@ -29,6 +29,13 @@ class RequestConfig extends VisualizationRequestConfig */ public $keep_summary_row = false; + /** + * Controls whether the totals row is displayed on every page of the datatable view or not. + * + * Default value: false + */ + public $keep_totals_row = false; + public function __construct() { $this->filter_limit = PiwikConfig::getInstance()->General['datatable_default_limit']; @@ -49,11 +56,13 @@ class RequestConfig extends VisualizationRequestConfig 'filter_offset', 'filter_sort_column', 'filter_sort_order', - 'keep_summary_row' + 'keep_summary_row', + 'keep_totals_row' )); $this->addPropertiesThatCanBeOverwrittenByQueryParams(array( 'keep_summary_row', + 'keep_totals_row', )); } diff --git a/plugins/CoreVisualizations/templates/_dataTableViz_htmlTable.twig b/plugins/CoreVisualizations/templates/_dataTableViz_htmlTable.twig index a85ee66852..2d4a25e950 100644 --- a/plugins/CoreVisualizations/templates/_dataTableViz_htmlTable.twig +++ b/plugins/CoreVisualizations/templates/_dataTableViz_htmlTable.twig @@ -50,6 +50,18 @@ {% include "@CoreVisualizations/_dataTableViz_htmlTable.twig" with {'dataTable': row.getSubtable(), 'idSubtable': rowSubtableId} %} {% endif %} {%- endfor -%} + {% if dataTable.getTotalsRow and properties.show_totals_row %} + {% set row = dataTable.getTotalsRow %} + {% set rowId = 'totalsRow' %} + <tr class="{{ row.getMetadata('css_class') }} totalsRow" + title="Total values for this table"> + {% for column in properties.columns_to_display %} + <td> + {% include "@CoreHome/_dataTableCell.twig" with properties %} + </td> + {% endfor %} + </tr> + {% endif %} {% endif %} {%- if not showingEmbeddedSubtable -%} </tbody> diff --git a/plugins/Ecommerce/tests/System/expected/test_ecommerceOrderWithItems_Metadata_ItemsCategory__API.getProcessedReport_day.xml b/plugins/Ecommerce/tests/System/expected/test_ecommerceOrderWithItems_Metadata_ItemsCategory__API.getProcessedReport_day.xml index 697e009693..4937b4866b 100644 --- a/plugins/Ecommerce/tests/System/expected/test_ecommerceOrderWithItems_Metadata_ItemsCategory__API.getProcessedReport_day.xml +++ b/plugins/Ecommerce/tests/System/expected/test_ecommerceOrderWithItems_Metadata_ItemsCategory__API.getProcessedReport_day.xml @@ -108,8 +108,15 @@ </reportData> <reportMetadata /> <reportTotal> - <nb_visits>12</nb_visits> + <revenue>7111.22</revenue> + <quantity>18</quantity> + <price>4111.22</price> + <orders>8</orders> <nb_uniq_visitors>8</nb_uniq_visitors> + <nb_visits>12</nb_visits> <nb_actions>17</nb_actions> + <avg_price>513.9</avg_price> + <avg_quantity>2.3</avg_quantity> + <conversion_rate>66.67%</conversion_rate> </reportTotal> </result>
\ No newline at end of file diff --git a/plugins/Ecommerce/tests/System/expected/test_ecommerceOrderWithItems_Metadata_ItemsSku__API.getProcessedReport_day.xml b/plugins/Ecommerce/tests/System/expected/test_ecommerceOrderWithItems_Metadata_ItemsSku__API.getProcessedReport_day.xml index 7ec412b5c4..25b5f5768c 100644 --- a/plugins/Ecommerce/tests/System/expected/test_ecommerceOrderWithItems_Metadata_ItemsSku__API.getProcessedReport_day.xml +++ b/plugins/Ecommerce/tests/System/expected/test_ecommerceOrderWithItems_Metadata_ItemsSku__API.getProcessedReport_day.xml @@ -78,8 +78,15 @@ </reportData> <reportMetadata /> <reportTotal> - <nb_visits>6</nb_visits> + <revenue>3111.22</revenue> + <quantity>10</quantity> + <price>2111.22</price> + <orders>4</orders> <nb_uniq_visitors>3</nb_uniq_visitors> + <nb_visits>6</nb_visits> <nb_actions>11</nb_actions> + <avg_price>527.81</avg_price> + <avg_quantity>2.5</avg_quantity> + <conversion_rate>66.67%</conversion_rate> </reportTotal> </result>
\ No newline at end of file diff --git a/plugins/Ecommerce/tests/System/expected/test_ecommerceOrderWithItems_Metadata_VisitTime.getVisitInformationPerServerTime__API.getProcessedReport_day.xml b/plugins/Ecommerce/tests/System/expected/test_ecommerceOrderWithItems_Metadata_VisitTime.getVisitInformationPerServerTime__API.getProcessedReport_day.xml index f4fea49b13..1f571c5f87 100644 --- a/plugins/Ecommerce/tests/System/expected/test_ecommerceOrderWithItems_Metadata_VisitTime.getVisitInformationPerServerTime__API.getProcessedReport_day.xml +++ b/plugins/Ecommerce/tests/System/expected/test_ecommerceOrderWithItems_Metadata_VisitTime.getVisitInformationPerServerTime__API.getProcessedReport_day.xml @@ -394,12 +394,42 @@ </row> </reportMetadata> <reportTotal> - <nb_visits>3</nb_visits> <nb_uniq_visitors>3</nb_uniq_visitors> + <nb_visits>3</nb_visits> <nb_actions>13</nb_actions> - <nb_conversions>3</nb_conversions> + <nb_users>0</nb_users> + <max_actions>6</max_actions> + <sum_visit_length>5403</sum_visit_length> <bounce_count>0</bounce_count> + <goals> + <row idgoal="1"> + <nb_conversions>1</nb_conversions> + <nb_visits_converted>1</nb_visits_converted> + <revenue>10</revenue> + </row> + <row idgoal="ecommerceAbandonedCart"> + <nb_conversions>2</nb_conversions> + <nb_visits_converted>2</nb_visits_converted> + <revenue>5020.22</revenue> + <items>8</items> + </row> + <row idgoal="ecommerceOrder"> + <nb_conversions>2</nb_conversions> + <nb_visits_converted>1</nb_visits_converted> + <revenue>3111.11</revenue> + <revenue_subtotal>2500</revenue_subtotal> + <revenue_tax>511</revenue_tax> + <revenue_shipping>100.11</revenue_shipping> + <revenue_discount>666</revenue_discount> + <items>10</items> + </row> + </goals> + <nb_conversions>3</nb_conversions> <revenue>3121.11</revenue> <nb_visits_converted>0</nb_visits_converted> + <conversion_rate>0%</conversion_rate> + <nb_actions_per_visit>4.3</nb_actions_per_visit> + <avg_time_on_site>1801</avg_time_on_site> + <bounce_rate>0%</bounce_rate> </reportTotal> </result>
\ No newline at end of file diff --git a/plugins/Ecommerce/tests/System/expected/test_ecommerceOrderWithItems__API.getProcessedReport_day.xml b/plugins/Ecommerce/tests/System/expected/test_ecommerceOrderWithItems__API.getProcessedReport_day.xml index 8019f8be6b..5cdd1dbbc3 100644 --- a/plugins/Ecommerce/tests/System/expected/test_ecommerceOrderWithItems__API.getProcessedReport_day.xml +++ b/plugins/Ecommerce/tests/System/expected/test_ecommerceOrderWithItems__API.getProcessedReport_day.xml @@ -87,11 +87,41 @@ </row> </reportMetadata> <reportTotal> - <nb_visits>3</nb_visits> <nb_uniq_visitors>2</nb_uniq_visitors> + <nb_visits>3</nb_visits> <nb_actions>13</nb_actions> - <nb_conversions>3</nb_conversions> + <nb_users>0</nb_users> + <max_actions>6</max_actions> + <sum_visit_length>5403</sum_visit_length> <bounce_count>0</bounce_count> + <goals> + <row idgoal="1"> + <nb_conversions>1</nb_conversions> + <nb_visits_converted>1</nb_visits_converted> + <revenue>10</revenue> + </row> + <row idgoal="ecommerceAbandonedCart"> + <nb_conversions>2</nb_conversions> + <nb_visits_converted>2</nb_visits_converted> + <revenue>5020.22</revenue> + <items>8</items> + </row> + <row idgoal="ecommerceOrder"> + <nb_conversions>2</nb_conversions> + <nb_visits_converted>1</nb_visits_converted> + <revenue>3111.11</revenue> + <revenue_subtotal>2500</revenue_subtotal> + <revenue_tax>511</revenue_tax> + <revenue_shipping>100.11</revenue_shipping> + <revenue_discount>666</revenue_discount> + <items>10</items> + </row> + </goals> + <nb_conversions>3</nb_conversions> <revenue>3121.11</revenue> + <conversion_rate>0%</conversion_rate> + <nb_actions_per_visit>4.3</nb_actions_per_visit> + <avg_time_on_site>1801</avg_time_on_site> + <bounce_rate>0%</bounce_rate> </reportTotal> </result>
\ No newline at end of file diff --git a/plugins/Goals/Visualizations/Goals.php b/plugins/Goals/Visualizations/Goals.php index 4453b2f352..2fd5a35200 100644 --- a/plugins/Goals/Visualizations/Goals.php +++ b/plugins/Goals/Visualizations/Goals.php @@ -8,8 +8,10 @@ namespace Piwik\Plugins\Goals\Visualizations; +use Piwik\API\DataTablePostProcessor; use Piwik\API\Request; use Piwik\Common; +use Piwik\DataTable; use Piwik\DataTable\Filter\AddColumnsProcessedMetricsGoal; use Piwik\Piwik; use Piwik\Plugins\CoreVisualizations\Visualizations\HtmlTable; @@ -32,6 +34,8 @@ class Goals extends HtmlTable { parent::beforeLoadDataTable(); + $this->config->show_totals_row = false; + if ($this->config->disable_subtable_when_show_goals) { $this->config->subtable_controller_action = null; } @@ -41,6 +45,7 @@ class Goals extends HtmlTable public function beforeRender() { + $this->config->show_totals_row = false; $this->config->show_goals = true; $this->config->show_goals_columns = true; $this->config->datatable_css_class = 'dataTableVizGoals'; diff --git a/plugins/Referrers/tests/System/expected/test_Referrers_getReferrerType__API.getProcessedReport_day.xml b/plugins/Referrers/tests/System/expected/test_Referrers_getReferrerType__API.getProcessedReport_day.xml index 899efa34f5..fd8d54cdbc 100644 --- a/plugins/Referrers/tests/System/expected/test_Referrers_getReferrerType__API.getProcessedReport_day.xml +++ b/plugins/Referrers/tests/System/expected/test_Referrers_getReferrerType__API.getProcessedReport_day.xml @@ -1189,12 +1189,31 @@ <result prettyDate="Wednesday, March 10, 2010" /> </reportMetadata> <reportTotal> - <nb_visits>62</nb_visits> <nb_uniq_visitors>62</nb_uniq_visitors> + <nb_visits>62</nb_visits> <nb_actions>62</nb_actions> - <nb_visits_converted>0</nb_visits_converted> + <nb_users>0</nb_users> + <max_actions>31</max_actions> + <sum_visit_length>11315</sum_visit_length> <bounce_count>62</bounce_count> + <nb_visits_converted>0</nb_visits_converted> + <goals> + <row idgoal="1"> + <nb_conversions>1</nb_conversions> + <nb_visits_converted>1</nb_visits_converted> + <revenue>0</revenue> + </row> + <row idgoal="2"> + <nb_conversions>2</nb_conversions> + <nb_visits_converted>1</nb_visits_converted> + <revenue>0</revenue> + </row> + </goals> <nb_conversions>93</nb_conversions> <revenue>0</revenue> + <conversion_rate>0</conversion_rate> + <nb_actions_per_visit>31</nb_actions_per_visit> + <avg_time_on_site>5673</avg_time_on_site> + <bounce_rate>3100</bounce_rate> </reportTotal> </result>
\ No newline at end of file diff --git a/plugins/Referrers/tests/System/expected/test_phpSerialized__Referrers.getReferrerType_year.original b/plugins/Referrers/tests/System/expected/test_phpSerialized__Referrers.getReferrerType_year.original Binary files differindex b032811929..a40b85791c 100644 --- a/plugins/Referrers/tests/System/expected/test_phpSerialized__Referrers.getReferrerType_year.original +++ b/plugins/Referrers/tests/System/expected/test_phpSerialized__Referrers.getReferrerType_year.original diff --git a/tests/PHPUnit/System/expected/test_CustomEvents_Events.getAction_flat__API.getProcessedReport_day.xml b/tests/PHPUnit/System/expected/test_CustomEvents_Events.getAction_flat__API.getProcessedReport_day.xml index d169d91daa..cf0e827c52 100644 --- a/tests/PHPUnit/System/expected/test_CustomEvents_Events.getAction_flat__API.getProcessedReport_day.xml +++ b/tests/PHPUnit/System/expected/test_CustomEvents_Events.getAction_flat__API.getProcessedReport_day.xml @@ -413,7 +413,13 @@ <result prettyDate="Saturday, January 9, 2010" /> </reportMetadata> <reportTotal> - <nb_visits>64</nb_visits> <nb_uniq_visitors>61</nb_uniq_visitors> + <nb_visits>64</nb_visits> + <nb_events>69</nb_events> + <nb_events_with_value>14</nb_events_with_value> + <sum_event_value>137.96</sum_event_value> + <min_event_value>37.32</min_event_value> + <max_event_value>62.32</max_event_value> + <avg_event_value>19.54</avg_event_value> </reportTotal> </result>
\ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_CustomEvents_Events.getAction_lastN__API.getProcessedReport_day.xml b/tests/PHPUnit/System/expected/test_CustomEvents_Events.getAction_lastN__API.getProcessedReport_day.xml index ffdb80de71..7af37b01b1 100644 --- a/tests/PHPUnit/System/expected/test_CustomEvents_Events.getAction_lastN__API.getProcessedReport_day.xml +++ b/tests/PHPUnit/System/expected/test_CustomEvents_Events.getAction_lastN__API.getProcessedReport_day.xml @@ -408,7 +408,13 @@ <result prettyDate="Saturday, January 9, 2010" /> </reportMetadata> <reportTotal> - <nb_visits>64</nb_visits> <nb_uniq_visitors>61</nb_uniq_visitors> + <nb_visits>64</nb_visits> + <nb_events>69</nb_events> + <nb_events_with_value>14</nb_events_with_value> + <sum_event_value>137.96</sum_event_value> + <min_event_value>37.32</min_event_value> + <max_event_value>62.32</max_event_value> + <avg_event_value>19.54</avg_event_value> </reportTotal> </result>
\ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_CustomEvents_Events.getCategory_flat__API.getProcessedReport_day.xml b/tests/PHPUnit/System/expected/test_CustomEvents_Events.getCategory_flat__API.getProcessedReport_day.xml index 98eff27176..f425fd16b4 100644 --- a/tests/PHPUnit/System/expected/test_CustomEvents_Events.getCategory_flat__API.getProcessedReport_day.xml +++ b/tests/PHPUnit/System/expected/test_CustomEvents_Events.getCategory_flat__API.getProcessedReport_day.xml @@ -377,7 +377,13 @@ <result prettyDate="Saturday, January 9, 2010" /> </reportMetadata> <reportTotal> - <nb_visits>64</nb_visits> <nb_uniq_visitors>61</nb_uniq_visitors> + <nb_visits>64</nb_visits> + <nb_events>69</nb_events> + <nb_events_with_value>14</nb_events_with_value> + <sum_event_value>137.96</sum_event_value> + <min_event_value>19.32</min_event_value> + <max_event_value>81.64</max_event_value> + <avg_event_value>19.54</avg_event_value> </reportTotal> </result>
\ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_CustomEvents_Events.getCategory_lastN__API.getProcessedReport_day.xml b/tests/PHPUnit/System/expected/test_CustomEvents_Events.getCategory_lastN__API.getProcessedReport_day.xml index 1583015bc0..f6cbcdcd8a 100644 --- a/tests/PHPUnit/System/expected/test_CustomEvents_Events.getCategory_lastN__API.getProcessedReport_day.xml +++ b/tests/PHPUnit/System/expected/test_CustomEvents_Events.getCategory_lastN__API.getProcessedReport_day.xml @@ -162,7 +162,13 @@ <result prettyDate="Saturday, January 9, 2010" /> </reportMetadata> <reportTotal> - <nb_visits>64</nb_visits> <nb_uniq_visitors>61</nb_uniq_visitors> + <nb_visits>64</nb_visits> + <nb_events>69</nb_events> + <nb_events_with_value>14</nb_events_with_value> + <sum_event_value>137.96</sum_event_value> + <min_event_value>19.32</min_event_value> + <max_event_value>81.64</max_event_value> + <avg_event_value>19.54</avg_event_value> </reportTotal> </result>
\ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_CustomEvents_Events.getName_flat__API.getProcessedReport_day.xml b/tests/PHPUnit/System/expected/test_CustomEvents_Events.getName_flat__API.getProcessedReport_day.xml index 72332a955f..bf571635a4 100644 --- a/tests/PHPUnit/System/expected/test_CustomEvents_Events.getName_flat__API.getProcessedReport_day.xml +++ b/tests/PHPUnit/System/expected/test_CustomEvents_Events.getName_flat__API.getProcessedReport_day.xml @@ -431,7 +431,13 @@ <result prettyDate="Saturday, January 9, 2010" /> </reportMetadata> <reportTotal> - <nb_visits>64</nb_visits> <nb_uniq_visitors>61</nb_uniq_visitors> + <nb_visits>64</nb_visits> + <nb_events>69</nb_events> + <nb_events_with_value>14</nb_events_with_value> + <sum_event_value>137.96</sum_event_value> + <min_event_value>19.32</min_event_value> + <max_event_value>81.64</max_event_value> + <avg_event_value>19.54</avg_event_value> </reportTotal> </result>
\ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_CustomEvents_Events.getName_lastN__API.getProcessedReport_day.xml b/tests/PHPUnit/System/expected/test_CustomEvents_Events.getName_lastN__API.getProcessedReport_day.xml index 8fcfa7f9ef..2af9910b1f 100644 --- a/tests/PHPUnit/System/expected/test_CustomEvents_Events.getName_lastN__API.getProcessedReport_day.xml +++ b/tests/PHPUnit/System/expected/test_CustomEvents_Events.getName_lastN__API.getProcessedReport_day.xml @@ -258,7 +258,13 @@ <result prettyDate="Saturday, January 9, 2010" /> </reportMetadata> <reportTotal> - <nb_visits>64</nb_visits> <nb_uniq_visitors>61</nb_uniq_visitors> + <nb_visits>64</nb_visits> + <nb_events>69</nb_events> + <nb_events_with_value>14</nb_events_with_value> + <sum_event_value>137.96</sum_event_value> + <min_event_value>19.32</min_event_value> + <max_event_value>81.64</max_event_value> + <avg_event_value>19.54</avg_event_value> </reportTotal> </result>
\ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_ManyVisitorsOneWebsiteTest_sortByProcessedMetric__API.getProcessedReport_day.xml b/tests/PHPUnit/System/expected/test_ManyVisitorsOneWebsiteTest_sortByProcessedMetric__API.getProcessedReport_day.xml index 13e9116aa2..988e96feab 100644 --- a/tests/PHPUnit/System/expected/test_ManyVisitorsOneWebsiteTest_sortByProcessedMetric__API.getProcessedReport_day.xml +++ b/tests/PHPUnit/System/expected/test_ManyVisitorsOneWebsiteTest_sortByProcessedMetric__API.getProcessedReport_day.xml @@ -71,9 +71,19 @@ <reportTotal> <nb_visits>8</nb_visits> <nb_hits>8</nb_hits> - <entry_bounce_count>4</entry_bounce_count> + <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_visits>8</entry_nb_visits> <entry_nb_actions>24</entry_nb_actions> + <entry_sum_visit_length>6484</entry_sum_visit_length> + <entry_bounce_count>4</entry_bounce_count> <exit_nb_visits>4</exit_nb_visits> + <avg_bandwidth>0</avg_bandwidth> + <avg_time_on_page>180</avg_time_on_page> + <bounce_rate>50%</bounce_rate> + <exit_rate>50%</exit_rate> </reportTotal> </result>
\ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_ManyVisitorsOneWebsiteTest_sortByProcessedMetric_constantRowsCountShouldKeepEmptyRows__API.getProcessedReport_day.xml b/tests/PHPUnit/System/expected/test_ManyVisitorsOneWebsiteTest_sortByProcessedMetric_constantRowsCountShouldKeepEmptyRows__API.getProcessedReport_day.xml index 66b9eb6bd3..1097494274 100644 --- a/tests/PHPUnit/System/expected/test_ManyVisitorsOneWebsiteTest_sortByProcessedMetric_constantRowsCountShouldKeepEmptyRows__API.getProcessedReport_day.xml +++ b/tests/PHPUnit/System/expected/test_ManyVisitorsOneWebsiteTest_sortByProcessedMetric_constantRowsCountShouldKeepEmptyRows__API.getProcessedReport_day.xml @@ -394,12 +394,31 @@ </row> </reportMetadata> <reportTotal> - <nb_visits>8</nb_visits> <nb_uniq_visitors>8</nb_uniq_visitors> + <nb_visits>8</nb_visits> <nb_actions>24</nb_actions> - <nb_visits_converted>0</nb_visits_converted> + <nb_users>0</nb_users> + <max_actions>5</max_actions> + <sum_visit_length>6484</sum_visit_length> <bounce_count>4</bounce_count> + <nb_visits_converted>0</nb_visits_converted> + <goals> + <row idgoal="1"> + <nb_conversions>8</nb_conversions> + <nb_visits_converted>8</nb_visits_converted> + <revenue>40</revenue> + </row> + <row idgoal="2"> + <nb_conversions>4</nb_conversions> + <nb_visits_converted>4</nb_visits_converted> + <revenue>20</revenue> + </row> + </goals> <nb_conversions>12</nb_conversions> <revenue>60</revenue> + <conversion_rate>0%</conversion_rate> + <nb_actions_per_visit>3</nb_actions_per_visit> + <avg_time_on_site>811</avg_time_on_site> + <bounce_rate>50%</bounce_rate> </reportTotal> </result>
\ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_OneVisitorTwoVisits__subtable__API.getProcessedReport_week.xml b/tests/PHPUnit/System/expected/test_OneVisitorTwoVisits__subtable__API.getProcessedReport_week.xml index 451f2f890b..303d5ed408 100644 --- a/tests/PHPUnit/System/expected/test_OneVisitorTwoVisits__subtable__API.getProcessedReport_week.xml +++ b/tests/PHPUnit/System/expected/test_OneVisitorTwoVisits__subtable__API.getProcessedReport_week.xml @@ -62,9 +62,29 @@ <reportTotal> <nb_visits>4</nb_visits> <nb_hits>4</nb_hits> + <sum_time_spent>1080</sum_time_spent> + <nb_hits_with_time_generation>4</nb_hits_with_time_generation> + <min_time_generation>0.615</min_time_generation> + <max_time_generation>0.615</max_time_generation> + <sum_bandwidth>0</sum_bandwidth> + <nb_hits_with_bandwidth>0</nb_hits_with_bandwidth> + <min_bandwidth /> + <max_bandwidth /> + <sum_daily_nb_uniq_visitors>3</sum_daily_nb_uniq_visitors> + <avg_bandwidth>0</avg_bandwidth> + <conversion_rate>0%</conversion_rate> + <nb_actions_per_visit>0</nb_actions_per_visit> + <avg_time_on_site>0</avg_time_on_site> + <bounce_rate>100%</bounce_rate> + <avg_time_on_page>1080</avg_time_on_page> + <exit_rate>200%</exit_rate> + <avg_time_generation>0.615</avg_time_generation> <exit_nb_visits>2</exit_nb_visits> - <entry_bounce_count>1</entry_bounce_count> + <sum_daily_exit_nb_uniq_visitors>1</sum_daily_exit_nb_uniq_visitors> <entry_nb_visits>2</entry_nb_visits> <entry_nb_actions>8</entry_nb_actions> + <entry_sum_visit_length>1621</entry_sum_visit_length> + <entry_bounce_count>1</entry_bounce_count> + <sum_daily_entry_nb_uniq_visitors>1</sum_daily_entry_nb_uniq_visitors> </reportTotal> </result>
\ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_OneVisitorTwoVisits_hideColumns___API.getProcessedReport_day.xml b/tests/PHPUnit/System/expected/test_OneVisitorTwoVisits_hideColumns___API.getProcessedReport_day.xml index fd3a09c9d7..097092bdbf 100644 --- a/tests/PHPUnit/System/expected/test_OneVisitorTwoVisits_hideColumns___API.getProcessedReport_day.xml +++ b/tests/PHPUnit/System/expected/test_OneVisitorTwoVisits_hideColumns___API.getProcessedReport_day.xml @@ -68,10 +68,22 @@ </row> </reportMetadata> <reportTotal> - <entry_bounce_count>1</entry_bounce_count> + <sum_time_spent>1080</sum_time_spent> + <sum_time_generation>0.615</sum_time_generation> + <min_time_generation>0.615</min_time_generation> + <max_time_generation>0.615</max_time_generation> + <sum_bandwidth>0</sum_bandwidth> + <nb_hits_with_bandwidth>0</nb_hits_with_bandwidth> + <min_bandwidth /> + <max_bandwidth /> <entry_nb_actions>8</entry_nb_actions> + <entry_sum_visit_length>1621</entry_sum_visit_length> + <entry_bounce_count>1</entry_bounce_count> <exit_nb_visits>2</exit_nb_visits> <nb_uniq_visitors>3</nb_uniq_visitors> + <entry_nb_uniq_visitors>1</entry_nb_uniq_visitors> <exit_nb_uniq_visitors>1</exit_nb_uniq_visitors> + <avg_bandwidth>0</avg_bandwidth> + <exit_rate>50%</exit_rate> </reportTotal> </result>
\ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_OneVisitorTwoVisits_showColumns___API.getProcessedReport_day.xml b/tests/PHPUnit/System/expected/test_OneVisitorTwoVisits_showColumns___API.getProcessedReport_day.xml index 64e2375288..b474a1535f 100644 --- a/tests/PHPUnit/System/expected/test_OneVisitorTwoVisits_showColumns___API.getProcessedReport_day.xml +++ b/tests/PHPUnit/System/expected/test_OneVisitorTwoVisits_showColumns___API.getProcessedReport_day.xml @@ -79,5 +79,6 @@ <reportTotal> <nb_hits>4</nb_hits> <entry_nb_visits>2</entry_nb_visits> + <bounce_rate>50%</bounce_rate> </reportTotal> </result>
\ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_SiteSearch_Actions.getPageTitlesFollowingSiteSearch_firstSite_lastN__API.getProcessedReport_day.xml b/tests/PHPUnit/System/expected/test_SiteSearch_Actions.getPageTitlesFollowingSiteSearch_firstSite_lastN__API.getProcessedReport_day.xml index d048175221..8f0ad8844a 100644 --- a/tests/PHPUnit/System/expected/test_SiteSearch_Actions.getPageTitlesFollowingSiteSearch_firstSite_lastN__API.getProcessedReport_day.xml +++ b/tests/PHPUnit/System/expected/test_SiteSearch_Actions.getPageTitlesFollowingSiteSearch_firstSite_lastN__API.getProcessedReport_day.xml @@ -67,5 +67,15 @@ <nb_visits>2</nb_visits> <nb_uniq_visitors>2</nb_uniq_visitors> <nb_hits>3</nb_hits> + <sum_time_spent>252</sum_time_spent> + <nb_hits_following_search>2</nb_hits_following_search> + <sum_bandwidth>0</sum_bandwidth> + <nb_hits_with_bandwidth>0</nb_hits_with_bandwidth> + <min_bandwidth /> + <max_bandwidth /> + <avg_bandwidth>0</avg_bandwidth> + <avg_time_on_page>84</avg_time_on_page> + <bounce_rate>0%</bounce_rate> + <exit_rate>0%</exit_rate> </reportTotal> </result>
\ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_SiteSearch_Actions.getPageTitlesFollowingSiteSearch_firstSite_lastN__API.getProcessedReport_month.xml b/tests/PHPUnit/System/expected/test_SiteSearch_Actions.getPageTitlesFollowingSiteSearch_firstSite_lastN__API.getProcessedReport_month.xml index 35641112b6..4eb0dd484c 100644 --- a/tests/PHPUnit/System/expected/test_SiteSearch_Actions.getPageTitlesFollowingSiteSearch_firstSite_lastN__API.getProcessedReport_month.xml +++ b/tests/PHPUnit/System/expected/test_SiteSearch_Actions.getPageTitlesFollowingSiteSearch_firstSite_lastN__API.getProcessedReport_month.xml @@ -66,5 +66,16 @@ <reportTotal> <nb_visits>2</nb_visits> <nb_hits>3</nb_hits> + <sum_time_spent>252</sum_time_spent> + <nb_hits_following_search>2</nb_hits_following_search> + <sum_bandwidth>0</sum_bandwidth> + <nb_hits_with_bandwidth>0</nb_hits_with_bandwidth> + <min_bandwidth /> + <max_bandwidth /> + <sum_daily_nb_uniq_visitors>2</sum_daily_nb_uniq_visitors> + <avg_bandwidth>0</avg_bandwidth> + <avg_time_on_page>84</avg_time_on_page> + <bounce_rate>0%</bounce_rate> + <exit_rate>0%</exit_rate> </reportTotal> </result>
\ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_SiteSearch_Actions.getPageTitles_firstSite_lastN__API.getProcessedReport_day.xml b/tests/PHPUnit/System/expected/test_SiteSearch_Actions.getPageTitles_firstSite_lastN__API.getProcessedReport_day.xml index 3703d608e0..81a782c8ff 100644 --- a/tests/PHPUnit/System/expected/test_SiteSearch_Actions.getPageTitles_firstSite_lastN__API.getProcessedReport_day.xml +++ b/tests/PHPUnit/System/expected/test_SiteSearch_Actions.getPageTitles_firstSite_lastN__API.getProcessedReport_day.xml @@ -99,7 +99,17 @@ <nb_visits>3</nb_visits> <nb_uniq_visitors>3</nb_uniq_visitors> <nb_hits>4</nb_hits> - <exit_nb_visits>1</exit_nb_visits> + <sum_time_spent>252</sum_time_spent> + <nb_hits_following_search>2</nb_hits_following_search> + <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_time_on_page>63</avg_time_on_page> + <bounce_rate>0%</bounce_rate> + <exit_rate>33%</exit_rate> </reportTotal> </result>
\ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_SiteSearch_Actions.getPageTitles_firstSite_lastN__API.getProcessedReport_month.xml b/tests/PHPUnit/System/expected/test_SiteSearch_Actions.getPageTitles_firstSite_lastN__API.getProcessedReport_month.xml index 11417c9f5e..d8c48ef6ff 100644 --- a/tests/PHPUnit/System/expected/test_SiteSearch_Actions.getPageTitles_firstSite_lastN__API.getProcessedReport_month.xml +++ b/tests/PHPUnit/System/expected/test_SiteSearch_Actions.getPageTitles_firstSite_lastN__API.getProcessedReport_month.xml @@ -98,6 +98,18 @@ <reportTotal> <nb_visits>3</nb_visits> <nb_hits>4</nb_hits> + <sum_time_spent>252</sum_time_spent> + <nb_hits_following_search>2</nb_hits_following_search> + <sum_bandwidth>0</sum_bandwidth> + <nb_hits_with_bandwidth>0</nb_hits_with_bandwidth> + <min_bandwidth /> + <max_bandwidth /> + <sum_daily_nb_uniq_visitors>3</sum_daily_nb_uniq_visitors> <exit_nb_visits>1</exit_nb_visits> + <sum_daily_exit_nb_uniq_visitors>1</sum_daily_exit_nb_uniq_visitors> + <avg_bandwidth>0</avg_bandwidth> + <avg_time_on_page>63</avg_time_on_page> + <bounce_rate>0%</bounce_rate> + <exit_rate>33%</exit_rate> </reportTotal> </result>
\ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_SiteSearch_Actions.getPageUrlsFollowingSiteSearch_firstSite_lastN__API.getProcessedReport_day.xml b/tests/PHPUnit/System/expected/test_SiteSearch_Actions.getPageUrlsFollowingSiteSearch_firstSite_lastN__API.getProcessedReport_day.xml index 5fb4da0f20..b307069eef 100644 --- a/tests/PHPUnit/System/expected/test_SiteSearch_Actions.getPageUrlsFollowingSiteSearch_firstSite_lastN__API.getProcessedReport_day.xml +++ b/tests/PHPUnit/System/expected/test_SiteSearch_Actions.getPageUrlsFollowingSiteSearch_firstSite_lastN__API.getProcessedReport_day.xml @@ -74,5 +74,15 @@ <nb_visits>2</nb_visits> <nb_uniq_visitors>2</nb_uniq_visitors> <nb_hits>3</nb_hits> + <sum_time_spent>252</sum_time_spent> + <nb_hits_following_search>2</nb_hits_following_search> + <sum_bandwidth>0</sum_bandwidth> + <nb_hits_with_bandwidth>0</nb_hits_with_bandwidth> + <min_bandwidth /> + <max_bandwidth /> + <avg_bandwidth>0</avg_bandwidth> + <avg_time_on_page>84</avg_time_on_page> + <bounce_rate>0%</bounce_rate> + <exit_rate>0%</exit_rate> </reportTotal> </result>
\ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_SiteSearch_Actions.getPageUrlsFollowingSiteSearch_firstSite_lastN__API.getProcessedReport_month.xml b/tests/PHPUnit/System/expected/test_SiteSearch_Actions.getPageUrlsFollowingSiteSearch_firstSite_lastN__API.getProcessedReport_month.xml index f4293bfba9..4e529b4249 100644 --- a/tests/PHPUnit/System/expected/test_SiteSearch_Actions.getPageUrlsFollowingSiteSearch_firstSite_lastN__API.getProcessedReport_month.xml +++ b/tests/PHPUnit/System/expected/test_SiteSearch_Actions.getPageUrlsFollowingSiteSearch_firstSite_lastN__API.getProcessedReport_month.xml @@ -73,5 +73,16 @@ <reportTotal> <nb_visits>2</nb_visits> <nb_hits>3</nb_hits> + <sum_time_spent>252</sum_time_spent> + <nb_hits_following_search>2</nb_hits_following_search> + <sum_bandwidth>0</sum_bandwidth> + <nb_hits_with_bandwidth>0</nb_hits_with_bandwidth> + <min_bandwidth /> + <max_bandwidth /> + <sum_daily_nb_uniq_visitors>2</sum_daily_nb_uniq_visitors> + <avg_bandwidth>0</avg_bandwidth> + <avg_time_on_page>84</avg_time_on_page> + <bounce_rate>0%</bounce_rate> + <exit_rate>0%</exit_rate> </reportTotal> </result>
\ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_SiteSearch_Actions.getPageUrls_firstSite_lastN__API.getProcessedReport_day.xml b/tests/PHPUnit/System/expected/test_SiteSearch_Actions.getPageUrls_firstSite_lastN__API.getProcessedReport_day.xml index 9987853e36..dd2624036a 100644 --- a/tests/PHPUnit/System/expected/test_SiteSearch_Actions.getPageUrls_firstSite_lastN__API.getProcessedReport_day.xml +++ b/tests/PHPUnit/System/expected/test_SiteSearch_Actions.getPageUrls_firstSite_lastN__API.getProcessedReport_day.xml @@ -100,7 +100,17 @@ <nb_visits>3</nb_visits> <nb_uniq_visitors>3</nb_uniq_visitors> <nb_hits>4</nb_hits> - <exit_nb_visits>1</exit_nb_visits> + <sum_time_spent>252</sum_time_spent> + <nb_hits_following_search>2</nb_hits_following_search> + <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_time_on_page>63</avg_time_on_page> + <bounce_rate>0%</bounce_rate> + <exit_rate>33%</exit_rate> </reportTotal> </result>
\ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_SiteSearch_Actions.getPageUrls_firstSite_lastN__API.getProcessedReport_month.xml b/tests/PHPUnit/System/expected/test_SiteSearch_Actions.getPageUrls_firstSite_lastN__API.getProcessedReport_month.xml index 062f55e0fd..2bf6bd6f7a 100644 --- a/tests/PHPUnit/System/expected/test_SiteSearch_Actions.getPageUrls_firstSite_lastN__API.getProcessedReport_month.xml +++ b/tests/PHPUnit/System/expected/test_SiteSearch_Actions.getPageUrls_firstSite_lastN__API.getProcessedReport_month.xml @@ -99,6 +99,18 @@ <reportTotal> <nb_visits>3</nb_visits> <nb_hits>4</nb_hits> + <sum_time_spent>252</sum_time_spent> + <nb_hits_following_search>2</nb_hits_following_search> + <sum_bandwidth>0</sum_bandwidth> + <nb_hits_with_bandwidth>0</nb_hits_with_bandwidth> + <min_bandwidth /> + <max_bandwidth /> + <sum_daily_nb_uniq_visitors>3</sum_daily_nb_uniq_visitors> <exit_nb_visits>1</exit_nb_visits> + <sum_daily_exit_nb_uniq_visitors>1</sum_daily_exit_nb_uniq_visitors> + <avg_bandwidth>0</avg_bandwidth> + <avg_time_on_page>63</avg_time_on_page> + <bounce_rate>0%</bounce_rate> + <exit_rate>33%</exit_rate> </reportTotal> </result>
\ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_SiteSearch_Actions.getSiteSearchCategories_firstSite_lastN__API.getProcessedReport_day.xml b/tests/PHPUnit/System/expected/test_SiteSearch_Actions.getSiteSearchCategories_firstSite_lastN__API.getProcessedReport_day.xml index cc02efba3e..85c6c29538 100644 --- a/tests/PHPUnit/System/expected/test_SiteSearch_Actions.getSiteSearchCategories_firstSite_lastN__API.getProcessedReport_day.xml +++ b/tests/PHPUnit/System/expected/test_SiteSearch_Actions.getSiteSearchCategories_firstSite_lastN__API.getProcessedReport_day.xml @@ -59,8 +59,9 @@ <result prettyDate="Monday, January 4, 2010" /> </reportMetadata> <reportTotal> - <nb_visits>4</nb_visits> <nb_uniq_visitors>4</nb_uniq_visitors> + <nb_visits>4</nb_visits> <nb_actions>5</nb_actions> + <nb_pages_per_search>3.5</nb_pages_per_search> </reportTotal> </result>
\ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_SiteSearch_Actions.getSiteSearchCategories_firstSite_lastN__API.getProcessedReport_month.xml b/tests/PHPUnit/System/expected/test_SiteSearch_Actions.getSiteSearchCategories_firstSite_lastN__API.getProcessedReport_month.xml index d43e4fca7c..4ccb3a99a5 100644 --- a/tests/PHPUnit/System/expected/test_SiteSearch_Actions.getSiteSearchCategories_firstSite_lastN__API.getProcessedReport_month.xml +++ b/tests/PHPUnit/System/expected/test_SiteSearch_Actions.getSiteSearchCategories_firstSite_lastN__API.getProcessedReport_month.xml @@ -58,5 +58,7 @@ <reportTotal> <nb_visits>4</nb_visits> <nb_actions>5</nb_actions> + <sum_daily_nb_uniq_visitors>4</sum_daily_nb_uniq_visitors> + <nb_pages_per_search>3.5</nb_pages_per_search> </reportTotal> </result>
\ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_SiteSearch_Actions.getSiteSearchKeywords_firstSite_lastN__API.getProcessedReport_day.xml b/tests/PHPUnit/System/expected/test_SiteSearch_Actions.getSiteSearchKeywords_firstSite_lastN__API.getProcessedReport_day.xml index 1759f4fc29..ac4e5f65f0 100644 --- a/tests/PHPUnit/System/expected/test_SiteSearch_Actions.getSiteSearchKeywords_firstSite_lastN__API.getProcessedReport_day.xml +++ b/tests/PHPUnit/System/expected/test_SiteSearch_Actions.getSiteSearchKeywords_firstSite_lastN__API.getProcessedReport_day.xml @@ -91,6 +91,16 @@ <reportTotal> <nb_visits>8</nb_visits> <nb_hits>13</nb_hits> + <sum_time_spent>882</sum_time_spent> + <sum_bandwidth>0</sum_bandwidth> + <nb_hits_with_bandwidth>0</nb_hits_with_bandwidth> + <min_bandwidth>0</min_bandwidth> + <max_bandwidth>0</max_bandwidth> + <nb_pages_per_search>9</nb_pages_per_search> <exit_nb_visits>2</exit_nb_visits> + <avg_bandwidth>0</avg_bandwidth> + <avg_time_on_page>141</avg_time_on_page> + <bounce_rate>0</bounce_rate> + <exit_rate>53</exit_rate> </reportTotal> </result>
\ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_SiteSearch_Actions.getSiteSearchKeywords_firstSite_lastN__API.getProcessedReport_month.xml b/tests/PHPUnit/System/expected/test_SiteSearch_Actions.getSiteSearchKeywords_firstSite_lastN__API.getProcessedReport_month.xml index eb3c2cb750..e8c8bb6176 100644 --- a/tests/PHPUnit/System/expected/test_SiteSearch_Actions.getSiteSearchKeywords_firstSite_lastN__API.getProcessedReport_month.xml +++ b/tests/PHPUnit/System/expected/test_SiteSearch_Actions.getSiteSearchKeywords_firstSite_lastN__API.getProcessedReport_month.xml @@ -84,6 +84,16 @@ <reportTotal> <nb_visits>8</nb_visits> <nb_hits>13</nb_hits> + <sum_time_spent>882</sum_time_spent> + <sum_bandwidth>0</sum_bandwidth> + <nb_hits_with_bandwidth>0</nb_hits_with_bandwidth> + <min_bandwidth /> + <max_bandwidth /> + <nb_pages_per_search>8</nb_pages_per_search> <exit_nb_visits>2</exit_nb_visits> + <avg_bandwidth>0</avg_bandwidth> + <avg_time_on_page>68</avg_time_on_page> + <bounce_rate>0%</bounce_rate> + <exit_rate>25%</exit_rate> </reportTotal> </result>
\ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_SiteSearch_Actions.getSiteSearchNoResultKeywords_firstSite_lastN__API.getProcessedReport_day.xml b/tests/PHPUnit/System/expected/test_SiteSearch_Actions.getSiteSearchNoResultKeywords_firstSite_lastN__API.getProcessedReport_day.xml index 916fcf2306..722ad90be9 100644 --- a/tests/PHPUnit/System/expected/test_SiteSearch_Actions.getSiteSearchNoResultKeywords_firstSite_lastN__API.getProcessedReport_day.xml +++ b/tests/PHPUnit/System/expected/test_SiteSearch_Actions.getSiteSearchNoResultKeywords_firstSite_lastN__API.getProcessedReport_day.xml @@ -62,5 +62,15 @@ <reportTotal> <nb_visits>2</nb_visits> <nb_hits>2</nb_hits> + <sum_time_spent>288</sum_time_spent> + <sum_bandwidth>0</sum_bandwidth> + <nb_hits_with_bandwidth>0</nb_hits_with_bandwidth> + <min_bandwidth>0</min_bandwidth> + <max_bandwidth>0</max_bandwidth> + <nb_pages_per_search>2</nb_pages_per_search> + <avg_bandwidth>0</avg_bandwidth> + <avg_time_on_page>288</avg_time_on_page> + <bounce_rate>0</bounce_rate> + <exit_rate>0</exit_rate> </reportTotal> </result>
\ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_SiteSearch_Actions.getSiteSearchNoResultKeywords_firstSite_lastN__API.getProcessedReport_month.xml b/tests/PHPUnit/System/expected/test_SiteSearch_Actions.getSiteSearchNoResultKeywords_firstSite_lastN__API.getProcessedReport_month.xml index 5037355b29..75ed730d0f 100644 --- a/tests/PHPUnit/System/expected/test_SiteSearch_Actions.getSiteSearchNoResultKeywords_firstSite_lastN__API.getProcessedReport_month.xml +++ b/tests/PHPUnit/System/expected/test_SiteSearch_Actions.getSiteSearchNoResultKeywords_firstSite_lastN__API.getProcessedReport_month.xml @@ -56,5 +56,15 @@ <reportTotal> <nb_visits>2</nb_visits> <nb_hits>2</nb_hits> + <sum_time_spent>288</sum_time_spent> + <sum_bandwidth>0</sum_bandwidth> + <nb_hits_with_bandwidth>0</nb_hits_with_bandwidth> + <min_bandwidth /> + <max_bandwidth /> + <nb_pages_per_search>1</nb_pages_per_search> + <avg_bandwidth>0</avg_bandwidth> + <avg_time_on_page>144</avg_time_on_page> + <bounce_rate>0%</bounce_rate> + <exit_rate>0%</exit_rate> </reportTotal> </result>
\ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_SiteSearch_CustomVariables.getCustomVariables_firstSite_lastN__API.getProcessedReport_day.xml b/tests/PHPUnit/System/expected/test_SiteSearch_CustomVariables.getCustomVariables_firstSite_lastN__API.getProcessedReport_day.xml index cc4087c2fc..dc4d4c8509 100644 --- a/tests/PHPUnit/System/expected/test_SiteSearch_CustomVariables.getCustomVariables_firstSite_lastN__API.getProcessedReport_day.xml +++ b/tests/PHPUnit/System/expected/test_SiteSearch_CustomVariables.getCustomVariables_firstSite_lastN__API.getProcessedReport_day.xml @@ -165,8 +165,12 @@ <result prettyDate="Saturday, January 9, 2010" /> </reportMetadata> <reportTotal> - <nb_visits>11</nb_visits> <nb_uniq_visitors>11</nb_uniq_visitors> + <nb_visits>11</nb_visits> <nb_actions>14</nb_actions> + <conversion_rate>0</conversion_rate> + <nb_actions_per_visit>2.5</nb_actions_per_visit> + <avg_time_on_site>0</avg_time_on_site> + <bounce_rate>0</bounce_rate> </reportTotal> </result>
\ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_SiteSearch_CustomVariables.getCustomVariables_firstSite_lastN__API.getProcessedReport_month.xml b/tests/PHPUnit/System/expected/test_SiteSearch_CustomVariables.getCustomVariables_firstSite_lastN__API.getProcessedReport_month.xml index 9750447674..f275693ce7 100644 --- a/tests/PHPUnit/System/expected/test_SiteSearch_CustomVariables.getCustomVariables_firstSite_lastN__API.getProcessedReport_month.xml +++ b/tests/PHPUnit/System/expected/test_SiteSearch_CustomVariables.getCustomVariables_firstSite_lastN__API.getProcessedReport_month.xml @@ -113,5 +113,10 @@ <reportTotal> <nb_visits>11</nb_visits> <nb_actions>14</nb_actions> + <sum_daily_nb_uniq_visitors>11</sum_daily_nb_uniq_visitors> + <conversion_rate>0%</conversion_rate> + <nb_actions_per_visit>1.3</nb_actions_per_visit> + <avg_time_on_site>0</avg_time_on_site> + <bounce_rate>0%</bounce_rate> </reportTotal> </result>
\ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_TwoVisitors_twoWebsites_differentDays_Actions.getPageTitles_firstSite_lastN__API.getProcessedReport_day.xml b/tests/PHPUnit/System/expected/test_TwoVisitors_twoWebsites_differentDays_Actions.getPageTitles_firstSite_lastN__API.getProcessedReport_day.xml index 5a45603177..882aa4e70f 100644 --- a/tests/PHPUnit/System/expected/test_TwoVisitors_twoWebsites_differentDays_Actions.getPageTitles_firstSite_lastN__API.getProcessedReport_day.xml +++ b/tests/PHPUnit/System/expected/test_TwoVisitors_twoWebsites_differentDays_Actions.getPageTitles_firstSite_lastN__API.getProcessedReport_day.xml @@ -236,10 +236,26 @@ <nb_visits>18</nb_visits> <nb_uniq_visitors>18</nb_uniq_visitors> <nb_hits>18</nb_hits> - <entry_bounce_count>2</entry_bounce_count> + <sum_time_spent>4500</sum_time_spent> + <sum_time_generation>5.239</sum_time_generation> + <nb_hits_with_time_generation>18</nb_hits_with_time_generation> + <min_time_generation>5.086</min_time_generation> + <max_time_generation>5.116</max_time_generation> + <sum_bandwidth>0</sum_bandwidth> + <nb_hits_with_bandwidth>0</nb_hits_with_bandwidth> + <min_bandwidth>0</min_bandwidth> + <max_bandwidth>0</max_bandwidth> + <entry_nb_uniq_visitors>7</entry_nb_uniq_visitors> <entry_nb_visits>7</entry_nb_visits> <entry_nb_actions>27</entry_nb_actions> - <exit_nb_visits>7</exit_nb_visits> + <entry_sum_visit_length>4505</entry_sum_visit_length> + <entry_bounce_count>2</entry_bounce_count> <exit_nb_uniq_visitors>7</exit_nb_uniq_visitors> + <exit_nb_visits>7</exit_nb_visits> + <avg_bandwidth>0</avg_bandwidth> + <avg_time_on_page>1500</avg_time_on_page> + <bounce_rate>100</bounce_rate> + <exit_rate>265</exit_rate> + <avg_time_generation>1.941</avg_time_generation> </reportTotal> </result>
\ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_TwoVisitors_twoWebsites_differentDays_Actions.getPageUrls_firstSite_lastN__API.getProcessedReport_day.xml b/tests/PHPUnit/System/expected/test_TwoVisitors_twoWebsites_differentDays_Actions.getPageUrls_firstSite_lastN__API.getProcessedReport_day.xml index 58ddaf23b7..460a7781cd 100644 --- a/tests/PHPUnit/System/expected/test_TwoVisitors_twoWebsites_differentDays_Actions.getPageUrls_firstSite_lastN__API.getProcessedReport_day.xml +++ b/tests/PHPUnit/System/expected/test_TwoVisitors_twoWebsites_differentDays_Actions.getPageUrls_firstSite_lastN__API.getProcessedReport_day.xml @@ -306,10 +306,26 @@ <nb_visits>18</nb_visits> <nb_uniq_visitors>18</nb_uniq_visitors> <nb_hits>28</nb_hits> - <entry_bounce_count>2</entry_bounce_count> + <sum_time_spent>4500</sum_time_spent> + <sum_time_generation>5.239</sum_time_generation> + <nb_hits_with_time_generation>18</nb_hits_with_time_generation> + <min_time_generation>2.979</min_time_generation> + <max_time_generation>4.374</max_time_generation> + <sum_bandwidth>0</sum_bandwidth> + <nb_hits_with_bandwidth>0</nb_hits_with_bandwidth> + <min_bandwidth>0</min_bandwidth> + <max_bandwidth>0</max_bandwidth> + <entry_nb_uniq_visitors>7</entry_nb_uniq_visitors> <entry_nb_visits>7</entry_nb_visits> <entry_nb_actions>27</entry_nb_actions> - <exit_nb_visits>7</exit_nb_visits> + <entry_sum_visit_length>4505</entry_sum_visit_length> + <entry_bounce_count>2</entry_bounce_count> <exit_nb_uniq_visitors>7</exit_nb_uniq_visitors> + <exit_nb_visits>7</exit_nb_visits> + <avg_bandwidth>0</avg_bandwidth> + <avg_time_on_page>900</avg_time_on_page> + <bounce_rate>100</bounce_rate> + <exit_rate>265</exit_rate> + <avg_time_generation>1.941</avg_time_generation> </reportTotal> </result>
\ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_MultiSites.getAll_firstSite_lastN__API.getProcessedReport_day.xml b/tests/PHPUnit/System/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_MultiSites.getAll_firstSite_lastN__API.getProcessedReport_day.xml index 8c16c382ce..3e5a7a0a41 100644 --- a/tests/PHPUnit/System/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_MultiSites.getAll_firstSite_lastN__API.getProcessedReport_day.xml +++ b/tests/PHPUnit/System/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_MultiSites.getAll_firstSite_lastN__API.getProcessedReport_day.xml @@ -263,6 +263,11 @@ <reportTotal> <nb_visits>9</nb_visits> <nb_actions>31</nb_actions> + <nb_pageviews>31</nb_pageviews> <revenue>35</revenue> + <visits_evolution>700</visits_evolution> + <actions_evolution>700</actions_evolution> + <pageviews_evolution>700</pageviews_evolution> + <revenue_evolution>600</revenue_evolution> </reportTotal> </result>
\ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_TwoVisitors_twoWebsites_differentDays_Referrers.getWebsites_firstSite_lastN__API.getProcessedReport_day.xml b/tests/PHPUnit/System/expected/test_TwoVisitors_twoWebsites_differentDays_Referrers.getWebsites_firstSite_lastN__API.getProcessedReport_day.xml index df26f7fb77..c40ede0cb8 100644 --- a/tests/PHPUnit/System/expected/test_TwoVisitors_twoWebsites_differentDays_Referrers.getWebsites_firstSite_lastN__API.getProcessedReport_day.xml +++ b/tests/PHPUnit/System/expected/test_TwoVisitors_twoWebsites_differentDays_Referrers.getWebsites_firstSite_lastN__API.getProcessedReport_day.xml @@ -145,10 +145,17 @@ </result> </reportMetadata> <reportTotal> - <nb_visits>4</nb_visits> <nb_uniq_visitors>4</nb_uniq_visitors> + <nb_visits>4</nb_visits> <nb_actions>12</nb_actions> - <nb_visits_converted>0</nb_visits_converted> + <nb_users>0</nb_users> + <max_actions>12</max_actions> + <sum_visit_length>1802</sum_visit_length> <bounce_count>2</bounce_count> + <nb_visits_converted>0</nb_visits_converted> + <conversion_rate>0</conversion_rate> + <nb_actions_per_visit>12</nb_actions_per_visit> + <avg_time_on_site>1802</avg_time_on_site> + <bounce_rate>200</bounce_rate> </reportTotal> </result>
\ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_apiGetReportMetadata__API.getProcessedReport_day.xml b/tests/PHPUnit/System/expected/test_apiGetReportMetadata__API.getProcessedReport_day.xml index 406af740bc..8725d5eb1e 100644 --- a/tests/PHPUnit/System/expected/test_apiGetReportMetadata__API.getProcessedReport_day.xml +++ b/tests/PHPUnit/System/expected/test_apiGetReportMetadata__API.getProcessedReport_day.xml @@ -71,11 +71,25 @@ </row> </reportMetadata> <reportTotal> - <nb_visits>1</nb_visits> <nb_uniq_visitors>1</nb_uniq_visitors> + <nb_visits>1</nb_visits> <nb_actions>1</nb_actions> - <nb_conversions>1</nb_conversions> + <nb_users>0</nb_users> + <max_actions>1</max_actions> + <sum_visit_length>1086</sum_visit_length> <bounce_count>1</bounce_count> + <goals> + <row idgoal="3"> + <nb_conversions>1</nb_conversions> + <nb_visits_converted>1</nb_visits_converted> + <revenue>42.26</revenue> + </row> + </goals> + <nb_conversions>1</nb_conversions> <revenue>42.26</revenue> + <conversion_rate>0%</conversion_rate> + <nb_actions_per_visit>1</nb_actions_per_visit> + <avg_time_on_site>1086</avg_time_on_site> + <bounce_rate>100%</bounce_rate> </reportTotal> </result>
\ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_apiGetReportMetadata_showRawMetrics__API.getProcessedReport_day.xml b/tests/PHPUnit/System/expected/test_apiGetReportMetadata_showRawMetrics__API.getProcessedReport_day.xml index 8fac78a731..8afd633f7e 100644 --- a/tests/PHPUnit/System/expected/test_apiGetReportMetadata_showRawMetrics__API.getProcessedReport_day.xml +++ b/tests/PHPUnit/System/expected/test_apiGetReportMetadata_showRawMetrics__API.getProcessedReport_day.xml @@ -84,11 +84,25 @@ </row> </reportMetadata> <reportTotal> - <nb_visits>1</nb_visits> <nb_uniq_visitors>1</nb_uniq_visitors> + <nb_visits>1</nb_visits> <nb_actions>1</nb_actions> - <nb_conversions>1</nb_conversions> + <nb_users>0</nb_users> + <max_actions>1</max_actions> + <sum_visit_length>1086</sum_visit_length> <bounce_count>1</bounce_count> + <goals> + <row idgoal="3"> + <nb_conversions>1</nb_conversions> + <nb_visits_converted>1</nb_visits_converted> + <revenue>42.26</revenue> + </row> + </goals> + <nb_conversions>1</nb_conversions> <revenue>42.26</revenue> + <conversion_rate>0%</conversion_rate> + <nb_actions_per_visit>1</nb_actions_per_visit> + <avg_time_on_site>1086</avg_time_on_site> + <bounce_rate>100%</bounce_rate> </reportTotal> </result>
\ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_periodIsRange_dateIsLastN_MetadataAndNormalAPI__API.getProcessedReport_range.xml b/tests/PHPUnit/System/expected/test_periodIsRange_dateIsLastN_MetadataAndNormalAPI__API.getProcessedReport_range.xml index fc0189404c..e2308b3831 100644 --- a/tests/PHPUnit/System/expected/test_periodIsRange_dateIsLastN_MetadataAndNormalAPI__API.getProcessedReport_range.xml +++ b/tests/PHPUnit/System/expected/test_periodIsRange_dateIsLastN_MetadataAndNormalAPI__API.getProcessedReport_range.xml @@ -70,8 +70,28 @@ <reportTotal> <nb_visits>3</nb_visits> <nb_actions>5</nb_actions> - <nb_conversions>3</nb_conversions> + <max_actions>3</max_actions> + <sum_visit_length>725</sum_visit_length> <bounce_count>2</bounce_count> + <goals> + <row idgoal="1"> + <nb_conversions>2</nb_conversions> + <nb_visits_converted>2</nb_visits_converted> + <revenue>1000</revenue> + </row> + <row idgoal="2"> + <nb_conversions>1</nb_conversions> + <nb_visits_converted>1</nb_visits_converted> + <revenue>0</revenue> + </row> + </goals> + <nb_conversions>3</nb_conversions> <revenue>1000</revenue> + <sum_daily_nb_uniq_visitors>2</sum_daily_nb_uniq_visitors> + <sum_daily_nb_users>0</sum_daily_nb_users> + <conversion_rate>0%</conversion_rate> + <nb_actions_per_visit>1.7</nb_actions_per_visit> + <avg_time_on_site>242</avg_time_on_site> + <bounce_rate>67%</bounce_rate> </reportTotal> </result>
\ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_periodIsRange_dateIsLastN_MetadataAndNormalAPI_pagesegment__API.getProcessedReport_range.xml b/tests/PHPUnit/System/expected/test_periodIsRange_dateIsLastN_MetadataAndNormalAPI_pagesegment__API.getProcessedReport_range.xml index fc0189404c..e2308b3831 100644 --- a/tests/PHPUnit/System/expected/test_periodIsRange_dateIsLastN_MetadataAndNormalAPI_pagesegment__API.getProcessedReport_range.xml +++ b/tests/PHPUnit/System/expected/test_periodIsRange_dateIsLastN_MetadataAndNormalAPI_pagesegment__API.getProcessedReport_range.xml @@ -70,8 +70,28 @@ <reportTotal> <nb_visits>3</nb_visits> <nb_actions>5</nb_actions> - <nb_conversions>3</nb_conversions> + <max_actions>3</max_actions> + <sum_visit_length>725</sum_visit_length> <bounce_count>2</bounce_count> + <goals> + <row idgoal="1"> + <nb_conversions>2</nb_conversions> + <nb_visits_converted>2</nb_visits_converted> + <revenue>1000</revenue> + </row> + <row idgoal="2"> + <nb_conversions>1</nb_conversions> + <nb_visits_converted>1</nb_visits_converted> + <revenue>0</revenue> + </row> + </goals> + <nb_conversions>3</nb_conversions> <revenue>1000</revenue> + <sum_daily_nb_uniq_visitors>2</sum_daily_nb_uniq_visitors> + <sum_daily_nb_users>0</sum_daily_nb_users> + <conversion_rate>0%</conversion_rate> + <nb_actions_per_visit>1.7</nb_actions_per_visit> + <avg_time_on_site>242</avg_time_on_site> + <bounce_rate>67%</bounce_rate> </reportTotal> </result>
\ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_twoVisitsWithCustomVariables__subtable__API.getProcessedReport_day.xml b/tests/PHPUnit/System/expected/test_twoVisitsWithCustomVariables__subtable__API.getProcessedReport_day.xml index 4eff74437d..15872ebe0f 100644 --- a/tests/PHPUnit/System/expected/test_twoVisitsWithCustomVariables__subtable__API.getProcessedReport_day.xml +++ b/tests/PHPUnit/System/expected/test_twoVisitsWithCustomVariables__subtable__API.getProcessedReport_day.xml @@ -75,8 +75,27 @@ <reportTotal> <nb_visits>7</nb_visits> <nb_actions>24</nb_actions> - <nb_conversions>6</nb_conversions> + <nb_users>0</nb_users> + <max_actions>13</max_actions> + <sum_visit_length>1805</sum_visit_length> <bounce_count>4</bounce_count> + <goals> + <row idgoal="1"> + <nb_conversions>5</nb_conversions> + <nb_visits_converted>5</nb_visits_converted> + <revenue>2000</revenue> + </row> + <row idgoal="2"> + <nb_conversions>1</nb_conversions> + <nb_visits_converted>1</nb_visits_converted> + <revenue>0</revenue> + </row> + </goals> + <nb_conversions>6</nb_conversions> <revenue>2000</revenue> + <conversion_rate>0%</conversion_rate> + <nb_actions_per_visit>11</nb_actions_per_visit> + <avg_time_on_site>1144</avg_time_on_site> + <bounce_rate>167%</bounce_rate> </reportTotal> </result>
\ No newline at end of file diff --git a/tests/UI/expected-screenshots/ViewDataTableTest_totals_row.png b/tests/UI/expected-screenshots/ViewDataTableTest_totals_row.png new file mode 100644 index 0000000000..6d95fae280 --- /dev/null +++ b/tests/UI/expected-screenshots/ViewDataTableTest_totals_row.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5d0ec7a07c484886af0f4e783cb4c2eeb7ac6cd908d09895008ef70c1e239b1e +size 45754 diff --git a/tests/UI/specs/ViewDataTable_spec.js b/tests/UI/specs/ViewDataTable_spec.js index 9342f04d5b..e1f7a32e2c 100644 --- a/tests/UI/specs/ViewDataTable_spec.js +++ b/tests/UI/specs/ViewDataTable_spec.js @@ -142,6 +142,15 @@ describe("ViewDataTableTest", function () { // TODO: should remove Test suffix f }, done); }); + it("should show the totals row when the config link is clicked", function (done) { + expect.screenshot('totals_row').to.be.capture(function (page) { + page.load(url); + page.click('.dropdownConfigureIcon'); + page.click('.dataTableShowTotalsRow'); + }, done); + }); + + it("should display a related report when related report link is clicked", function (done) { expect.screenshot('related_report_click').to.be.capture(function (page) { var newReportUrl = url.replace("=Referrers", "=DevicesDetection").replace("=getKeywords", "=getOsFamilies"); |