diff options
Diffstat (limited to 'plugins')
17 files changed, 1394 insertions, 234 deletions
diff --git a/plugins/API/tests/System/expected/test_AutoSuggestAPITest_revenueAbandonedCart__API.getSuggestedValuesForSegment.xml b/plugins/API/tests/System/expected/test_AutoSuggestAPITest_revenueAbandonedCart__API.getSuggestedValuesForSegment.xml index addecb936b..c234bed59e 100644 --- a/plugins/API/tests/System/expected/test_AutoSuggestAPITest_revenueAbandonedCart__API.getSuggestedValuesForSegment.xml +++ b/plugins/API/tests/System/expected/test_AutoSuggestAPITest_revenueAbandonedCart__API.getSuggestedValuesForSegment.xml @@ -1,2 +1,2 @@ <?xml version="1.0" encoding="utf-8" ?> -<result/>
\ No newline at end of file +<result />
\ No newline at end of file diff --git a/plugins/API/tests/System/expected/test_AutoSuggestAPITest_revenueOrder__API.getSuggestedValuesForSegment.xml b/plugins/API/tests/System/expected/test_AutoSuggestAPITest_revenueOrder__API.getSuggestedValuesForSegment.xml index addecb936b..c234bed59e 100644 --- a/plugins/API/tests/System/expected/test_AutoSuggestAPITest_revenueOrder__API.getSuggestedValuesForSegment.xml +++ b/plugins/API/tests/System/expected/test_AutoSuggestAPITest_revenueOrder__API.getSuggestedValuesForSegment.xml @@ -1,2 +1,2 @@ <?xml version="1.0" encoding="utf-8" ?> -<result/>
\ No newline at end of file +<result />
\ No newline at end of file diff --git a/plugins/Ecommerce/tests/System/expected/test_ecommerceOrderWithItems_SegmentCartRevenueOrder__Goals.get_day.xml b/plugins/Ecommerce/tests/System/expected/test_ecommerceOrderWithItems_SegmentCartRevenueOrder__Goals.get_day.xml index 7c67098eb9..0401f9f52e 100644 --- a/plugins/Ecommerce/tests/System/expected/test_ecommerceOrderWithItems_SegmentCartRevenueOrder__Goals.get_day.xml +++ b/plugins/Ecommerce/tests/System/expected/test_ecommerceOrderWithItems_SegmentCartRevenueOrder__Goals.get_day.xml @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="utf-8" ?> <result> - <nb_conversions>2</nb_conversions> - <nb_visits_converted>1</nb_visits_converted> - <revenue>3111.11</revenue> - <conversion_rate>50%</conversion_rate> - <nb_conversions_new_visit>0</nb_conversions_new_visit> - <nb_visits_converted_new_visit>0</nb_visits_converted_new_visit> - <revenue_new_visit>0</revenue_new_visit> - <conversion_rate_new_visit>0%</conversion_rate_new_visit> - <nb_conversions_returning_visit>2</nb_conversions_returning_visit> - <nb_visits_converted_returning_visit>1</nb_visits_converted_returning_visit> - <revenue_returning_visit>3111.11</revenue_returning_visit> - <conversion_rate_returning_visit>50%</conversion_rate_returning_visit> -</result> + <nb_conversions>2</nb_conversions> + <nb_visits_converted>1</nb_visits_converted> + <revenue>3111.11</revenue> + <conversion_rate>50%</conversion_rate> + <nb_conversions_new_visit>0</nb_conversions_new_visit> + <nb_visits_converted_new_visit>0</nb_visits_converted_new_visit> + <revenue_new_visit>0</revenue_new_visit> + <conversion_rate_new_visit>0%</conversion_rate_new_visit> + <nb_conversions_returning_visit>2</nb_conversions_returning_visit> + <nb_visits_converted_returning_visit>1</nb_visits_converted_returning_visit> + <revenue_returning_visit>3111.11</revenue_returning_visit> + <conversion_rate_returning_visit>50%</conversion_rate_returning_visit> +</result>
\ No newline at end of file diff --git a/plugins/Ecommerce/tests/System/expected/test_ecommerceOrderWithItems_SegmentRevenueOrder__Goals.get_day.xml b/plugins/Ecommerce/tests/System/expected/test_ecommerceOrderWithItems_SegmentRevenueOrder__Goals.get_day.xml index 0fbef44420..f1ad070ccc 100644 --- a/plugins/Ecommerce/tests/System/expected/test_ecommerceOrderWithItems_SegmentRevenueOrder__Goals.get_day.xml +++ b/plugins/Ecommerce/tests/System/expected/test_ecommerceOrderWithItems_SegmentRevenueOrder__Goals.get_day.xml @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="utf-8" ?> <result> - <nb_conversions>2</nb_conversions> - <nb_visits_converted>1</nb_visits_converted> - <revenue>3111.11</revenue> - <conversion_rate>100%</conversion_rate> - <nb_conversions_new_visit>0</nb_conversions_new_visit> - <nb_visits_converted_new_visit>0</nb_visits_converted_new_visit> - <revenue_new_visit>0</revenue_new_visit> - <conversion_rate_new_visit>0%</conversion_rate_new_visit> - <nb_conversions_returning_visit>2</nb_conversions_returning_visit> - <nb_visits_converted_returning_visit>1</nb_visits_converted_returning_visit> - <revenue_returning_visit>3111.11</revenue_returning_visit> - <conversion_rate_returning_visit>100%</conversion_rate_returning_visit> -</result> + <nb_conversions>2</nb_conversions> + <nb_visits_converted>1</nb_visits_converted> + <revenue>3111.11</revenue> + <conversion_rate>100%</conversion_rate> + <nb_conversions_new_visit>0</nb_conversions_new_visit> + <nb_visits_converted_new_visit>0</nb_visits_converted_new_visit> + <revenue_new_visit>0</revenue_new_visit> + <conversion_rate_new_visit>0%</conversion_rate_new_visit> + <nb_conversions_returning_visit>2</nb_conversions_returning_visit> + <nb_visits_converted_returning_visit>1</nb_visits_converted_returning_visit> + <revenue_returning_visit>3111.11</revenue_returning_visit> + <conversion_rate_returning_visit>100%</conversion_rate_returning_visit> +</result>
\ No newline at end of file diff --git a/plugins/MultiSites/API.php b/plugins/MultiSites/API.php index 097725bd84..575964ec30 100644 --- a/plugins/MultiSites/API.php +++ b/plugins/MultiSites/API.php @@ -15,6 +15,7 @@ use Piwik\Common; use Piwik\Container\StaticContainer; use Piwik\DataTable; use Piwik\DataTable\Row; +use Piwik\Period; use Piwik\Period\Range; use Piwik\Piwik; use Piwik\Plugins\Goals\Archiver; @@ -190,6 +191,42 @@ class API extends \Piwik\Plugin\API ); } + /** + * @param null|string $period + * @param null|string $date + * @param false|string $segment + * @param string $pattern + * @param int $filter_limit + * @return array + * @throws Exception + */ + public function getAllWithGroups($period = null, $date = null, $segment = false, $pattern = '', $filter_limit = 0) + { + Piwik::checkUserHasSomeViewAccess(); + + if (Period::isMultiplePeriod($date, $period)) { + throw new Exception('Multiple periods are not supported'); + } + + $segment = $segment ?: false; + $request = $_GET + $_POST; + + $dashboard = new Dashboard($period, $date, $segment); + + if ($pattern !== '') { + $dashboard->search(strtolower($pattern)); + } + + $response = [ + 'numSites' => $dashboard->getNumSites(), + 'totals' => $dashboard->getTotals(), + 'lastDate' => $dashboard->getLastDate(), + 'sites' => $dashboard->getSites($request, $filter_limit) + ]; + + return $response; + } + private function getSiteFromId($idSite) { $idSite = (int) $idSite; @@ -242,7 +279,7 @@ class API extends \Piwik\Plugin\API // if the period isn't a range & a lastN/previousN date isn't used, we get the same // data for the last period to show the evolution of visits/actions/revenue - list($strLastDate, $lastPeriod) = Range::getLastDate($date, $period); + [$strLastDate, $lastPeriod] = Range::getLastDate($date, $period); if ($strLastDate !== false) { diff --git a/plugins/MultiSites/Controller.php b/plugins/MultiSites/Controller.php index bc66edd022..607655f462 100644 --- a/plugins/MultiSites/Controller.php +++ b/plugins/MultiSites/Controller.php @@ -39,34 +39,6 @@ class Controller extends \Piwik\Plugin\Controller return $this->getSitesInfo($isWidgetized = true); } - public function getAllWithGroups() - { - Piwik::checkUserHasSomeViewAccess(); - - $period = Common::getRequestVar('period', null, 'string'); - $date = Common::getRequestVar('date', null, 'string'); - $segment = Common::getRequestVar('segment', false, 'string'); - $pattern = Common::getRequestVar('pattern', '', 'string'); - $limit = Common::getRequestVar('filter_limit', 0, 'int'); - $segment = $segment ?: false; - $request = $_GET + $_POST; - - $dashboard = new Dashboard($period, $date, $segment); - - if ($pattern !== '') { - $dashboard->search(strtolower($pattern)); - } - - $response = array( - 'numSites' => $dashboard->getNumSites(), - 'totals' => $dashboard->getTotals(), - 'lastDate' => $dashboard->getLastDate(), - 'sites' => $dashboard->getSites($request, $limit) - ); - - return json_encode($response); - } - /** * @throws \Piwik\NoAccessException */ diff --git a/plugins/MultiSites/Dashboard.php b/plugins/MultiSites/Dashboard.php index 614a7c7e92..79bc4b29f2 100644 --- a/plugins/MultiSites/Dashboard.php +++ b/plugins/MultiSites/Dashboard.php @@ -1,4 +1,5 @@ <?php + /** * Matomo - free/libre analytics platform * @@ -6,6 +7,7 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later * */ + namespace Piwik\Plugins\MultiSites; use Piwik\API\DataTablePostProcessor; @@ -34,7 +36,7 @@ class Dashboard * Array of metrics that will be displayed and will be number formatted * @var array */ - private $displayedMetricColumns = array('nb_visits', 'nb_pageviews', 'nb_actions', 'revenue'); + private $displayedMetricColumns = ['nb_visits', 'nb_pageviews', 'nb_actions', 'revenue']; /** * @param string $period @@ -84,7 +86,6 @@ class Dashboard if ($pastData && $pastRow) { $pastData->setLabelsHaveChanged(); } - }); $this->setSitesTable($sites); @@ -110,13 +111,13 @@ class Dashboard public function getTotals() { - $totals = array( + $totals = [ 'nb_pageviews' => $this->sitesByGroup->getMetadata('total_nb_pageviews'), 'nb_visits' => $this->sitesByGroup->getMetadata('total_nb_visits'), 'nb_actions' => $this->sitesByGroup->getMetadata('total_nb_actions'), 'revenue' => $this->sitesByGroup->getMetadata('total_revenue'), 'nb_visits_lastdate' => $this->sitesByGroup->getMetadata('total_nb_visits_lastdate') ? : 0, - ); + ]; $this->formatMetrics($totals); return $totals; } @@ -124,10 +125,9 @@ class Dashboard private function formatMetrics(&$metrics) { $formatter = NumberFormatter::getInstance(); - foreach($metrics as $metricName => &$value) { - if(in_array($metricName, $this->displayedMetricColumns)) { - - if( strpos($metricName, 'revenue') !== false) { + foreach ($metrics as $metricName => &$value) { + if (in_array($metricName, $this->displayedMetricColumns)) { + if (strpos($metricName, 'revenue') !== false) { $currency = isset($metrics['idsite']) ? Site::getCurrencySymbolFor($metrics['idsite']) : ''; $value = $formatter->formatCurrency($value, $currency); continue; @@ -157,7 +157,6 @@ class Dashboard private function nestedSearch(DataTable $sitesByGroup, $pattern) { foreach ($sitesByGroup->getRows() as $index => $site) { - $label = strtolower($site->getColumn('label')); $labelMatches = false !== strpos($label, $pattern); @@ -169,7 +168,6 @@ class Dashboard // we keep the group if at least one site within the group matches the pattern $sitesByGroup->deleteRow($index); } - } elseif (!$labelMatches) { $group = $site->getMetadata('group'); @@ -205,21 +203,18 @@ class Dashboard $request['disable_generic_filters'] = 1; $responseBuilder = new ResponseBuilder('json', $request); - $rows = json_decode($responseBuilder->getResponse($table, 'MultiSites', 'getAll'), true); - - return $rows; + return json_decode($responseBuilder->getResponse($table, 'MultiSites', 'getAll'), true); } private function moveSitesHavingAGroupIntoSubtables(DataTable $sites) { /** @var DataTableSummaryRow[] $groups */ - $groups = array(); + $groups = []; $sitesByGroup = $this->makeCloneOfDataTableSites($sites); $sitesByGroup->enableRecursiveFilters(); // we need to make sure filters get applied to subtables (groups) foreach ($sites->getRows() as $site) { - $group = $site->getMetadata('group'); if (!empty($group) && !array_key_exists($group, $groups)) { @@ -246,7 +241,7 @@ class Dashboard // only actual returned groups. $group->recalculate(); } - + return $sitesByGroup; } @@ -327,7 +322,7 @@ class Dashboard $table->disableFilter('Sort'); // make sites flat and limit - $table->filter('Piwik\Plugins\MultiSites\DataTable\Filter\NestedSitesLimiter', array($filterOffset, $filterLimit)); + $table->filter('Piwik\Plugins\MultiSites\DataTable\Filter\NestedSitesLimiter', [$filterOffset, $filterLimit]); } private function enrichValues($sites) diff --git a/plugins/MultiSites/tests/Integration/ControllerTest.php b/plugins/MultiSites/tests/Integration/ControllerTest.php deleted file mode 100644 index dd54beefad..0000000000 --- a/plugins/MultiSites/tests/Integration/ControllerTest.php +++ /dev/null @@ -1,153 +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\MultiSites\tests\Integration; - -use Piwik\FrontController; -use Piwik\Plugins\MultiSites\tests\Fixtures\ManySitesWithVisits; -use Piwik\Tests\Framework\TestCase\SystemTestCase; - -/** - * @group MultiSites - * @group ControllerTest - * @group Plugins - */ -class ControllerTest extends SystemTestCase -{ - /** - * @var ManySitesWithVisits - */ - public static $fixture = null; // initialized below class definition - - public function test_getAllWithGroups() - { - $sites = $this->requestGetAllWithGroups(array('filter_limit' => 20)); - $this->assertTrue(is_string($sites)); - - $sites = json_decode($sites, true); - - // as limit is 20 make sure it returns all 15 sites but we do not check for all the detailed sites info, - // this is tested in other tests. We only check for first site. - $this->assertSame(15, count($sites['sites'])); - $this->assertEquals(array( - 'label' => 'Site 1', - 'nb_visits' => '2', - 'nb_actions' => '4', - 'nb_pageviews' => '3', - 'revenue' => '$2,541', - 'visits_evolution' => '100%', - 'actions_evolution' => '100%', - 'pageviews_evolution' => '100%', - 'revenue_evolution' => '100%', - 'idsite' => 1, - 'group' => '', - 'main_url' => 'http://piwik.net', - 'nb_conversions' => 1, - 'orders' => 1, - 'ecommerce_revenue' => 2541, - 'nb_conversions_evolution' => '100%', - 'orders_evolution' => '100%', - 'ecommerce_revenue_evolution' => '100%', - 'ratio' => 1, - 'previous_nb_visits' => 0, - 'periodName' => 'day', - 'previousRange' => 'Tue, Jan 22', - 'previous_nb_actions' => 0, - 'previous_Actions_nb_pageviews' => 0, - 'previous_Goal_revenue' => 0, - 'previous_Goal_nb_conversions' => 0, - 'previous_Goal_0_nb_conversions' => 0, - 'previous_Goal_0_revenue' => 0, - 'visits_evolution_trend' => 1, - 'actions_evolution_trend' => 1, - 'pageviews_evolution_trend' => 1, - 'revenue_evolution_trend' => 1, - 'nb_conversions_evolution_trend' => 1, - 'orders_evolution_trend' => 1, - 'ecommerce_revenue_evolution_trend' => 1, - 'currencySymbol' => '$', - ), $sites['sites'][0]); - - unset($sites['sites']); - $expected = array( - 'numSites' => 15, - 'totals' => array( - 'nb_pageviews' => 8, - 'nb_visits' => 5, - 'nb_actions' => 12, - 'revenue' => '5,082', - 'nb_visits_lastdate' => 0, - ), - 'lastDate' => '2013-01-22' - ); - - $this->assertEquals($expected, $sites); - } - - public function test_getAllWithGroups_ifLimitIsApplied_ShouldStill_ReturnCorrectNumberOfSitesAvailable() - { - $sites = $this->requestGetAllWithGroups(array('filter_limit' => 5)); - $sites = json_decode($sites, true); - - $this->assertSame(5, count($sites['sites'])); - $this->assertSame(15, $sites['numSites']); - $this->assertReturnedSitesEquals(array(1, 2, 3, 4, 5), $sites); - } - - public function test_getAllWithGroups_shouldBeAbleToHandleLimitAndOffset() - { - $sites = $this->requestGetAllWithGroups(array('filter_limit' => 5, 'filter_offset' => 4)); - $sites = json_decode($sites, true); - - $this->assertSame(5, count($sites['sites'])); - $this->assertSame(15, $sites['numSites']); - $this->assertReturnedSitesEquals(array(5, 6, 7, 8, 9), $sites); - } - - public function test_getAllWithGroups_shouldApplySearchAndReturnInNumSitesOnlyTheNumberOfMatchingSites() - { - $pattern = 'Site 1'; - $sites = $this->requestGetAllWithGroups(array('filter_limit' => 5, 'pattern' => $pattern)); - $sites = json_decode($sites, true); - - $this->assertSame(5, count($sites['sites'])); - $this->assertSame(1 + 6, $sites['numSites']); // Site 1 + Site10-15 - $this->assertReturnedSitesEquals(array(1, 10, 11, 12, 13), $sites); - } - - private function assertReturnedSitesEquals($expectedSiteIds, $sites) - { - foreach ($expectedSiteIds as $index => $expectedSiteId) { - $this->assertSame($expectedSiteId, $sites['sites'][$index]['idsite']); - } - } - - private function requestGetAllWithGroups($params) - { - $oldGet = $_GET; - $params['period'] = 'day'; - $params['date'] = '2013-01-23'; - $_GET = $params; - $sites = FrontController::getInstance()->dispatch('MultiSites', 'getAllWithGroups'); - $_GET = $oldGet; - return $sites; - } - - public static function getOutputPrefix() - { - return ''; - } - - public static function getPathToTestDirectory() - { - return dirname(__FILE__); - } - -} - -ControllerTest::$fixture = new ManySitesWithVisits(); diff --git a/plugins/MultiSites/tests/System/ApiTest.php b/plugins/MultiSites/tests/System/ApiTest.php new file mode 100644 index 0000000000..ae3954cdef --- /dev/null +++ b/plugins/MultiSites/tests/System/ApiTest.php @@ -0,0 +1,109 @@ +<?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\MultiSites\tests\System; + +use Piwik\Plugins\MultiSites\tests\Fixtures\ManySitesWithVisits; +use Piwik\Tests\Framework\TestCase\SystemTestCase; + +/** + * @group MultiSites + * @group ApiTest + * @group Plugins + */ +class ApiTest extends SystemTestCase +{ + /** + * @var ManySitesWithVisits + */ + public static $fixture = null; // initialized below class definition + + /** + * @dataProvider getApiForTesting + */ + public function testApi($api, $params) + { + $this->runApiTests($api, $params); + } + + public function getApiForTesting() + { + return [ + [ + 'MultiSites.getAllWithGroups', + [ + 'period' => 'day', + 'date' => '2013-01-23', + 'otherRequestParameters' => [ + 'filter_limit' => 20, + ], + 'testSuffix' => '', + ], + ], + [ + 'MultiSites.getAllWithGroups', + [ + 'period' => 'day', + 'date' => '2013-01-23', + 'otherRequestParameters' => [ + 'filter_limit' => 5, + ], + 'testSuffix' => 'limited', + ], + ], + [ + 'MultiSites.getAllWithGroups', + [ + 'period' => 'day', + 'date' => '2013-01-23', + 'otherRequestParameters' => [ + 'filter_limit' => 5, + 'filter_offset' => 4, + ], + 'testSuffix' => 'limitedWithOffset', + ], + ], + [ + 'MultiSites.getAllWithGroups', + [ + 'period' => 'day', + 'date' => '2013-01-23', + 'otherRequestParameters' => [ + 'filter_limit' => 5, + 'pattern' => 'Site 1', + ], + 'testSuffix' => 'limitedWithPattern', + ], + ], + [ + 'MultiSites.getAllWithGroups', + [ + 'period' => 'day', + 'date' => '2013-01-23,2013-01-25', + 'otherRequestParameters' => [ + 'filter_limit' => 5, + ], + 'testSuffix' => 'multiplePeriods', + ], + ] + ]; + } + + public static function getOutputPrefix() + { + return ''; + } + + public static function getPathToTestDirectory() + { + return dirname(__FILE__); + } +} + +ApiTest::$fixture = new ManySitesWithVisits(); diff --git a/plugins/MultiSites/tests/System/expected/test___MultiSites.getAllWithGroups_day.xml b/plugins/MultiSites/tests/System/expected/test___MultiSites.getAllWithGroups_day.xml new file mode 100644 index 0000000000..72e5d1bf5a --- /dev/null +++ b/plugins/MultiSites/tests/System/expected/test___MultiSites.getAllWithGroups_day.xml @@ -0,0 +1,584 @@ +<?xml version="1.0" encoding="utf-8" ?> +<result> + <numSites>15</numSites> + <totals> + <nb_pageviews>8</nb_pageviews> + <nb_visits>5</nb_visits> + <nb_actions>12</nb_actions> + <revenue>5,082</revenue> + <nb_visits_lastdate>0</nb_visits_lastdate> + </totals> + <lastDate>2013-01-22</lastDate> + <sites> + <row> + <label>Site 1</label> + <nb_visits>2</nb_visits> + <nb_actions>4</nb_actions> + <nb_pageviews>3</nb_pageviews> + <revenue>$2,541</revenue> + <nb_conversions>1</nb_conversions> + <orders>1</orders> + <ecommerce_revenue>2541</ecommerce_revenue> + <visits_evolution>100%</visits_evolution> + <visits_evolution_trend>1</visits_evolution_trend> + <actions_evolution>100%</actions_evolution> + <actions_evolution_trend>1</actions_evolution_trend> + <pageviews_evolution>100%</pageviews_evolution> + <pageviews_evolution_trend>1</pageviews_evolution_trend> + <revenue_evolution>100%</revenue_evolution> + <revenue_evolution_trend>1</revenue_evolution_trend> + <nb_conversions_evolution>100%</nb_conversions_evolution> + <nb_conversions_evolution_trend>1</nb_conversions_evolution_trend> + <orders_evolution>100%</orders_evolution> + <orders_evolution_trend>1</orders_evolution_trend> + <ecommerce_revenue_evolution>100%</ecommerce_revenue_evolution> + <ecommerce_revenue_evolution_trend>1</ecommerce_revenue_evolution_trend> + <idsite>1</idsite> + <ratio>1</ratio> + <currencySymbol>$</currencySymbol> + <previous_nb_visits>0</previous_nb_visits> + <periodName>day</periodName> + <previousRange>Tue, Jan 22</previousRange> + <previous_nb_actions>0</previous_nb_actions> + <previous_Actions_nb_pageviews>0</previous_Actions_nb_pageviews> + <previous_Goal_revenue>0</previous_Goal_revenue> + <previous_Goal_nb_conversions>0</previous_Goal_nb_conversions> + <previous_Goal_0_nb_conversions>0</previous_Goal_0_nb_conversions> + <previous_Goal_0_revenue>0</previous_Goal_0_revenue> + <group /> + <main_url>http://piwik.net</main_url> + </row> + <row> + <label>Site 2</label> + <nb_visits>1</nb_visits> + <nb_actions>2</nb_actions> + <nb_pageviews>2</nb_pageviews> + <revenue>$2,541</revenue> + <nb_conversions>1</nb_conversions> + <orders>1</orders> + <ecommerce_revenue>2541</ecommerce_revenue> + <visits_evolution>100%</visits_evolution> + <visits_evolution_trend>1</visits_evolution_trend> + <actions_evolution>100%</actions_evolution> + <actions_evolution_trend>1</actions_evolution_trend> + <pageviews_evolution>100%</pageviews_evolution> + <pageviews_evolution_trend>1</pageviews_evolution_trend> + <revenue_evolution>100%</revenue_evolution> + <revenue_evolution_trend>1</revenue_evolution_trend> + <nb_conversions_evolution>100%</nb_conversions_evolution> + <nb_conversions_evolution_trend>1</nb_conversions_evolution_trend> + <orders_evolution>100%</orders_evolution> + <orders_evolution_trend>1</orders_evolution_trend> + <ecommerce_revenue_evolution>100%</ecommerce_revenue_evolution> + <ecommerce_revenue_evolution_trend>1</ecommerce_revenue_evolution_trend> + <idsite>2</idsite> + <ratio>1</ratio> + <currencySymbol>$</currencySymbol> + <previous_nb_visits>0</previous_nb_visits> + <periodName>day</periodName> + <previousRange>Tue, Jan 22</previousRange> + <previous_nb_actions>0</previous_nb_actions> + <previous_Actions_nb_pageviews>0</previous_Actions_nb_pageviews> + <previous_Goal_revenue>0</previous_Goal_revenue> + <previous_Goal_nb_conversions>0</previous_Goal_nb_conversions> + <previous_Goal_0_nb_conversions>0</previous_Goal_0_nb_conversions> + <previous_Goal_0_revenue>0</previous_Goal_0_revenue> + <group /> + <main_url>http://piwik.net</main_url> + </row> + <row> + <label>Site 3</label> + <nb_visits>1</nb_visits> + <nb_actions>4</nb_actions> + <nb_pageviews>2</nb_pageviews> + <revenue>$0</revenue> + <nb_conversions>0</nb_conversions> + <orders>0</orders> + <ecommerce_revenue>0</ecommerce_revenue> + <visits_evolution>100%</visits_evolution> + <visits_evolution_trend>1</visits_evolution_trend> + <actions_evolution>100%</actions_evolution> + <actions_evolution_trend>1</actions_evolution_trend> + <pageviews_evolution>100%</pageviews_evolution> + <pageviews_evolution_trend>1</pageviews_evolution_trend> + <revenue_evolution>0%</revenue_evolution> + <revenue_evolution_trend>0</revenue_evolution_trend> + <nb_conversions_evolution>0%</nb_conversions_evolution> + <nb_conversions_evolution_trend>0</nb_conversions_evolution_trend> + <orders_evolution>0%</orders_evolution> + <orders_evolution_trend>0</orders_evolution_trend> + <ecommerce_revenue_evolution>0%</ecommerce_revenue_evolution> + <ecommerce_revenue_evolution_trend>0</ecommerce_revenue_evolution_trend> + <idsite>3</idsite> + <ratio>1</ratio> + <currencySymbol>$</currencySymbol> + <previous_nb_visits>0</previous_nb_visits> + <periodName>day</periodName> + <previousRange>Tue, Jan 22</previousRange> + <previous_nb_actions>0</previous_nb_actions> + <previous_Actions_nb_pageviews>0</previous_Actions_nb_pageviews> + <previous_Goal_revenue>0</previous_Goal_revenue> + <previous_Goal_nb_conversions>0</previous_Goal_nb_conversions> + <previous_Goal_0_nb_conversions>0</previous_Goal_0_nb_conversions> + <previous_Goal_0_revenue>0</previous_Goal_0_revenue> + <group /> + <main_url>http://piwik.net</main_url> + </row> + <row> + <label>Site 4</label> + <nb_visits>1</nb_visits> + <nb_actions>2</nb_actions> + <nb_pageviews>1</nb_pageviews> + <revenue>$0</revenue> + <nb_conversions>0</nb_conversions> + <orders>0</orders> + <ecommerce_revenue>0</ecommerce_revenue> + <visits_evolution>100%</visits_evolution> + <visits_evolution_trend>1</visits_evolution_trend> + <actions_evolution>100%</actions_evolution> + <actions_evolution_trend>1</actions_evolution_trend> + <pageviews_evolution>100%</pageviews_evolution> + <pageviews_evolution_trend>1</pageviews_evolution_trend> + <revenue_evolution>0%</revenue_evolution> + <revenue_evolution_trend>0</revenue_evolution_trend> + <nb_conversions_evolution>0%</nb_conversions_evolution> + <nb_conversions_evolution_trend>0</nb_conversions_evolution_trend> + <orders_evolution>0%</orders_evolution> + <orders_evolution_trend>0</orders_evolution_trend> + <ecommerce_revenue_evolution>0%</ecommerce_revenue_evolution> + <ecommerce_revenue_evolution_trend>0</ecommerce_revenue_evolution_trend> + <idsite>4</idsite> + <ratio>1</ratio> + <currencySymbol>$</currencySymbol> + <previous_nb_visits>0</previous_nb_visits> + <periodName>day</periodName> + <previousRange>Tue, Jan 22</previousRange> + <previous_nb_actions>0</previous_nb_actions> + <previous_Actions_nb_pageviews>0</previous_Actions_nb_pageviews> + <previous_Goal_revenue>0</previous_Goal_revenue> + <previous_Goal_nb_conversions>0</previous_Goal_nb_conversions> + <previous_Goal_0_nb_conversions>0</previous_Goal_0_nb_conversions> + <previous_Goal_0_revenue>0</previous_Goal_0_revenue> + <group /> + <main_url>http://piwik.net</main_url> + </row> + <row> + <label>Site 5</label> + <nb_visits>0</nb_visits> + <nb_actions>0</nb_actions> + <nb_pageviews>0</nb_pageviews> + <revenue>$0</revenue> + <nb_conversions>0</nb_conversions> + <orders>0</orders> + <ecommerce_revenue>0</ecommerce_revenue> + <visits_evolution>0%</visits_evolution> + <visits_evolution_trend>0</visits_evolution_trend> + <actions_evolution>0%</actions_evolution> + <actions_evolution_trend>0</actions_evolution_trend> + <pageviews_evolution>0%</pageviews_evolution> + <pageviews_evolution_trend>0</pageviews_evolution_trend> + <revenue_evolution>0%</revenue_evolution> + <revenue_evolution_trend>0</revenue_evolution_trend> + <nb_conversions_evolution>0%</nb_conversions_evolution> + <nb_conversions_evolution_trend>0</nb_conversions_evolution_trend> + <orders_evolution>0%</orders_evolution> + <orders_evolution_trend>0</orders_evolution_trend> + <ecommerce_revenue_evolution>0%</ecommerce_revenue_evolution> + <ecommerce_revenue_evolution_trend>0</ecommerce_revenue_evolution_trend> + <idsite>5</idsite> + <ratio>1</ratio> + <currencySymbol>$</currencySymbol> + <previous_nb_visits>0</previous_nb_visits> + <periodName>day</periodName> + <previousRange>Tue, Jan 22</previousRange> + <previous_nb_actions>0</previous_nb_actions> + <previous_Actions_nb_pageviews>0</previous_Actions_nb_pageviews> + <previous_Goal_revenue>0</previous_Goal_revenue> + <previous_Goal_nb_conversions>0</previous_Goal_nb_conversions> + <previous_Goal_0_nb_conversions>0</previous_Goal_0_nb_conversions> + <previous_Goal_0_revenue>0</previous_Goal_0_revenue> + <group /> + <main_url>http://piwik.net</main_url> + </row> + <row> + <label>Site 6</label> + <nb_visits>0</nb_visits> + <nb_actions>0</nb_actions> + <nb_pageviews>0</nb_pageviews> + <revenue>$0</revenue> + <nb_conversions>0</nb_conversions> + <orders>0</orders> + <ecommerce_revenue>0</ecommerce_revenue> + <visits_evolution>0%</visits_evolution> + <visits_evolution_trend>0</visits_evolution_trend> + <actions_evolution>0%</actions_evolution> + <actions_evolution_trend>0</actions_evolution_trend> + <pageviews_evolution>0%</pageviews_evolution> + <pageviews_evolution_trend>0</pageviews_evolution_trend> + <revenue_evolution>0%</revenue_evolution> + <revenue_evolution_trend>0</revenue_evolution_trend> + <nb_conversions_evolution>0%</nb_conversions_evolution> + <nb_conversions_evolution_trend>0</nb_conversions_evolution_trend> + <orders_evolution>0%</orders_evolution> + <orders_evolution_trend>0</orders_evolution_trend> + <ecommerce_revenue_evolution>0%</ecommerce_revenue_evolution> + <ecommerce_revenue_evolution_trend>0</ecommerce_revenue_evolution_trend> + <idsite>6</idsite> + <ratio>1</ratio> + <currencySymbol>$</currencySymbol> + <previous_nb_visits>0</previous_nb_visits> + <periodName>day</periodName> + <previousRange>Tue, Jan 22</previousRange> + <previous_nb_actions>0</previous_nb_actions> + <previous_Actions_nb_pageviews>0</previous_Actions_nb_pageviews> + <previous_Goal_revenue>0</previous_Goal_revenue> + <previous_Goal_nb_conversions>0</previous_Goal_nb_conversions> + <previous_Goal_0_nb_conversions>0</previous_Goal_0_nb_conversions> + <previous_Goal_0_revenue>0</previous_Goal_0_revenue> + <group /> + <main_url>http://piwik.net</main_url> + </row> + <row> + <label>Site 7</label> + <nb_visits>0</nb_visits> + <nb_actions>0</nb_actions> + <nb_pageviews>0</nb_pageviews> + <revenue>$0</revenue> + <nb_conversions>0</nb_conversions> + <orders>0</orders> + <ecommerce_revenue>0</ecommerce_revenue> + <visits_evolution>0%</visits_evolution> + <visits_evolution_trend>0</visits_evolution_trend> + <actions_evolution>0%</actions_evolution> + <actions_evolution_trend>0</actions_evolution_trend> + <pageviews_evolution>0%</pageviews_evolution> + <pageviews_evolution_trend>0</pageviews_evolution_trend> + <revenue_evolution>0%</revenue_evolution> + <revenue_evolution_trend>0</revenue_evolution_trend> + <nb_conversions_evolution>0%</nb_conversions_evolution> + <nb_conversions_evolution_trend>0</nb_conversions_evolution_trend> + <orders_evolution>0%</orders_evolution> + <orders_evolution_trend>0</orders_evolution_trend> + <ecommerce_revenue_evolution>0%</ecommerce_revenue_evolution> + <ecommerce_revenue_evolution_trend>0</ecommerce_revenue_evolution_trend> + <idsite>7</idsite> + <ratio>1</ratio> + <currencySymbol>$</currencySymbol> + <previous_nb_visits>0</previous_nb_visits> + <periodName>day</periodName> + <previousRange>Tue, Jan 22</previousRange> + <previous_nb_actions>0</previous_nb_actions> + <previous_Actions_nb_pageviews>0</previous_Actions_nb_pageviews> + <previous_Goal_revenue>0</previous_Goal_revenue> + <previous_Goal_nb_conversions>0</previous_Goal_nb_conversions> + <previous_Goal_0_nb_conversions>0</previous_Goal_0_nb_conversions> + <previous_Goal_0_revenue>0</previous_Goal_0_revenue> + <group /> + <main_url>http://piwik.net</main_url> + </row> + <row> + <label>Site 8</label> + <nb_visits>0</nb_visits> + <nb_actions>0</nb_actions> + <nb_pageviews>0</nb_pageviews> + <revenue>$0</revenue> + <nb_conversions>0</nb_conversions> + <orders>0</orders> + <ecommerce_revenue>0</ecommerce_revenue> + <visits_evolution>0%</visits_evolution> + <visits_evolution_trend>0</visits_evolution_trend> + <actions_evolution>0%</actions_evolution> + <actions_evolution_trend>0</actions_evolution_trend> + <pageviews_evolution>0%</pageviews_evolution> + <pageviews_evolution_trend>0</pageviews_evolution_trend> + <revenue_evolution>0%</revenue_evolution> + <revenue_evolution_trend>0</revenue_evolution_trend> + <nb_conversions_evolution>0%</nb_conversions_evolution> + <nb_conversions_evolution_trend>0</nb_conversions_evolution_trend> + <orders_evolution>0%</orders_evolution> + <orders_evolution_trend>0</orders_evolution_trend> + <ecommerce_revenue_evolution>0%</ecommerce_revenue_evolution> + <ecommerce_revenue_evolution_trend>0</ecommerce_revenue_evolution_trend> + <idsite>8</idsite> + <ratio>1</ratio> + <currencySymbol>$</currencySymbol> + <previous_nb_visits>0</previous_nb_visits> + <periodName>day</periodName> + <previousRange>Tue, Jan 22</previousRange> + <previous_nb_actions>0</previous_nb_actions> + <previous_Actions_nb_pageviews>0</previous_Actions_nb_pageviews> + <previous_Goal_revenue>0</previous_Goal_revenue> + <previous_Goal_nb_conversions>0</previous_Goal_nb_conversions> + <previous_Goal_0_nb_conversions>0</previous_Goal_0_nb_conversions> + <previous_Goal_0_revenue>0</previous_Goal_0_revenue> + <group /> + <main_url>http://piwik.net</main_url> + </row> + <row> + <label>Site 9</label> + <nb_visits>0</nb_visits> + <nb_actions>0</nb_actions> + <nb_pageviews>0</nb_pageviews> + <revenue>$0</revenue> + <nb_conversions>0</nb_conversions> + <orders>0</orders> + <ecommerce_revenue>0</ecommerce_revenue> + <visits_evolution>0%</visits_evolution> + <visits_evolution_trend>0</visits_evolution_trend> + <actions_evolution>0%</actions_evolution> + <actions_evolution_trend>0</actions_evolution_trend> + <pageviews_evolution>0%</pageviews_evolution> + <pageviews_evolution_trend>0</pageviews_evolution_trend> + <revenue_evolution>0%</revenue_evolution> + <revenue_evolution_trend>0</revenue_evolution_trend> + <nb_conversions_evolution>0%</nb_conversions_evolution> + <nb_conversions_evolution_trend>0</nb_conversions_evolution_trend> + <orders_evolution>0%</orders_evolution> + <orders_evolution_trend>0</orders_evolution_trend> + <ecommerce_revenue_evolution>0%</ecommerce_revenue_evolution> + <ecommerce_revenue_evolution_trend>0</ecommerce_revenue_evolution_trend> + <idsite>9</idsite> + <ratio>1</ratio> + <currencySymbol>$</currencySymbol> + <previous_nb_visits>0</previous_nb_visits> + <periodName>day</periodName> + <previousRange>Tue, Jan 22</previousRange> + <previous_nb_actions>0</previous_nb_actions> + <previous_Actions_nb_pageviews>0</previous_Actions_nb_pageviews> + <previous_Goal_revenue>0</previous_Goal_revenue> + <previous_Goal_nb_conversions>0</previous_Goal_nb_conversions> + <previous_Goal_0_nb_conversions>0</previous_Goal_0_nb_conversions> + <previous_Goal_0_revenue>0</previous_Goal_0_revenue> + <group /> + <main_url>http://piwik.net</main_url> + </row> + <row> + <label>Site 10</label> + <nb_visits>0</nb_visits> + <nb_actions>0</nb_actions> + <nb_pageviews>0</nb_pageviews> + <revenue>$0</revenue> + <nb_conversions>0</nb_conversions> + <orders>0</orders> + <ecommerce_revenue>0</ecommerce_revenue> + <visits_evolution>0%</visits_evolution> + <visits_evolution_trend>0</visits_evolution_trend> + <actions_evolution>0%</actions_evolution> + <actions_evolution_trend>0</actions_evolution_trend> + <pageviews_evolution>0%</pageviews_evolution> + <pageviews_evolution_trend>0</pageviews_evolution_trend> + <revenue_evolution>0%</revenue_evolution> + <revenue_evolution_trend>0</revenue_evolution_trend> + <nb_conversions_evolution>0%</nb_conversions_evolution> + <nb_conversions_evolution_trend>0</nb_conversions_evolution_trend> + <orders_evolution>0%</orders_evolution> + <orders_evolution_trend>0</orders_evolution_trend> + <ecommerce_revenue_evolution>0%</ecommerce_revenue_evolution> + <ecommerce_revenue_evolution_trend>0</ecommerce_revenue_evolution_trend> + <idsite>10</idsite> + <ratio>1</ratio> + <currencySymbol>$</currencySymbol> + <previous_nb_visits>0</previous_nb_visits> + <periodName>day</periodName> + <previousRange>Tue, Jan 22</previousRange> + <previous_nb_actions>0</previous_nb_actions> + <previous_Actions_nb_pageviews>0</previous_Actions_nb_pageviews> + <previous_Goal_revenue>0</previous_Goal_revenue> + <previous_Goal_nb_conversions>0</previous_Goal_nb_conversions> + <previous_Goal_0_nb_conversions>0</previous_Goal_0_nb_conversions> + <previous_Goal_0_revenue>0</previous_Goal_0_revenue> + <group /> + <main_url>http://piwik.net</main_url> + </row> + <row> + <label>Site 11</label> + <nb_visits>0</nb_visits> + <nb_actions>0</nb_actions> + <nb_pageviews>0</nb_pageviews> + <revenue>$0</revenue> + <nb_conversions>0</nb_conversions> + <orders>0</orders> + <ecommerce_revenue>0</ecommerce_revenue> + <visits_evolution>0%</visits_evolution> + <visits_evolution_trend>0</visits_evolution_trend> + <actions_evolution>0%</actions_evolution> + <actions_evolution_trend>0</actions_evolution_trend> + <pageviews_evolution>0%</pageviews_evolution> + <pageviews_evolution_trend>0</pageviews_evolution_trend> + <revenue_evolution>0%</revenue_evolution> + <revenue_evolution_trend>0</revenue_evolution_trend> + <nb_conversions_evolution>0%</nb_conversions_evolution> + <nb_conversions_evolution_trend>0</nb_conversions_evolution_trend> + <orders_evolution>0%</orders_evolution> + <orders_evolution_trend>0</orders_evolution_trend> + <ecommerce_revenue_evolution>0%</ecommerce_revenue_evolution> + <ecommerce_revenue_evolution_trend>0</ecommerce_revenue_evolution_trend> + <idsite>11</idsite> + <ratio>1</ratio> + <currencySymbol>$</currencySymbol> + <previous_nb_visits>0</previous_nb_visits> + <periodName>day</periodName> + <previousRange>Tue, Jan 22</previousRange> + <previous_nb_actions>0</previous_nb_actions> + <previous_Actions_nb_pageviews>0</previous_Actions_nb_pageviews> + <previous_Goal_revenue>0</previous_Goal_revenue> + <previous_Goal_nb_conversions>0</previous_Goal_nb_conversions> + <previous_Goal_0_nb_conversions>0</previous_Goal_0_nb_conversions> + <previous_Goal_0_revenue>0</previous_Goal_0_revenue> + <group /> + <main_url>http://piwik.net</main_url> + </row> + <row> + <label>Site 12</label> + <nb_visits>0</nb_visits> + <nb_actions>0</nb_actions> + <nb_pageviews>0</nb_pageviews> + <revenue>$0</revenue> + <nb_conversions>0</nb_conversions> + <orders>0</orders> + <ecommerce_revenue>0</ecommerce_revenue> + <visits_evolution>0%</visits_evolution> + <visits_evolution_trend>0</visits_evolution_trend> + <actions_evolution>0%</actions_evolution> + <actions_evolution_trend>0</actions_evolution_trend> + <pageviews_evolution>0%</pageviews_evolution> + <pageviews_evolution_trend>0</pageviews_evolution_trend> + <revenue_evolution>0%</revenue_evolution> + <revenue_evolution_trend>0</revenue_evolution_trend> + <nb_conversions_evolution>0%</nb_conversions_evolution> + <nb_conversions_evolution_trend>0</nb_conversions_evolution_trend> + <orders_evolution>0%</orders_evolution> + <orders_evolution_trend>0</orders_evolution_trend> + <ecommerce_revenue_evolution>0%</ecommerce_revenue_evolution> + <ecommerce_revenue_evolution_trend>0</ecommerce_revenue_evolution_trend> + <idsite>12</idsite> + <ratio>1</ratio> + <currencySymbol>$</currencySymbol> + <previous_nb_visits>0</previous_nb_visits> + <periodName>day</periodName> + <previousRange>Tue, Jan 22</previousRange> + <previous_nb_actions>0</previous_nb_actions> + <previous_Actions_nb_pageviews>0</previous_Actions_nb_pageviews> + <previous_Goal_revenue>0</previous_Goal_revenue> + <previous_Goal_nb_conversions>0</previous_Goal_nb_conversions> + <previous_Goal_0_nb_conversions>0</previous_Goal_0_nb_conversions> + <previous_Goal_0_revenue>0</previous_Goal_0_revenue> + <group /> + <main_url>http://piwik.net</main_url> + </row> + <row> + <label>Site 13</label> + <nb_visits>0</nb_visits> + <nb_actions>0</nb_actions> + <nb_pageviews>0</nb_pageviews> + <revenue>$0</revenue> + <nb_conversions>0</nb_conversions> + <orders>0</orders> + <ecommerce_revenue>0</ecommerce_revenue> + <visits_evolution>0%</visits_evolution> + <visits_evolution_trend>0</visits_evolution_trend> + <actions_evolution>0%</actions_evolution> + <actions_evolution_trend>0</actions_evolution_trend> + <pageviews_evolution>0%</pageviews_evolution> + <pageviews_evolution_trend>0</pageviews_evolution_trend> + <revenue_evolution>0%</revenue_evolution> + <revenue_evolution_trend>0</revenue_evolution_trend> + <nb_conversions_evolution>0%</nb_conversions_evolution> + <nb_conversions_evolution_trend>0</nb_conversions_evolution_trend> + <orders_evolution>0%</orders_evolution> + <orders_evolution_trend>0</orders_evolution_trend> + <ecommerce_revenue_evolution>0%</ecommerce_revenue_evolution> + <ecommerce_revenue_evolution_trend>0</ecommerce_revenue_evolution_trend> + <idsite>13</idsite> + <ratio>1</ratio> + <currencySymbol>$</currencySymbol> + <previous_nb_visits>0</previous_nb_visits> + <periodName>day</periodName> + <previousRange>Tue, Jan 22</previousRange> + <previous_nb_actions>0</previous_nb_actions> + <previous_Actions_nb_pageviews>0</previous_Actions_nb_pageviews> + <previous_Goal_revenue>0</previous_Goal_revenue> + <previous_Goal_nb_conversions>0</previous_Goal_nb_conversions> + <previous_Goal_0_nb_conversions>0</previous_Goal_0_nb_conversions> + <previous_Goal_0_revenue>0</previous_Goal_0_revenue> + <group /> + <main_url>http://piwik.net</main_url> + </row> + <row> + <label>Site 14</label> + <nb_visits>0</nb_visits> + <nb_actions>0</nb_actions> + <nb_pageviews>0</nb_pageviews> + <revenue>$0</revenue> + <nb_conversions>0</nb_conversions> + <orders>0</orders> + <ecommerce_revenue>0</ecommerce_revenue> + <visits_evolution>0%</visits_evolution> + <visits_evolution_trend>0</visits_evolution_trend> + <actions_evolution>0%</actions_evolution> + <actions_evolution_trend>0</actions_evolution_trend> + <pageviews_evolution>0%</pageviews_evolution> + <pageviews_evolution_trend>0</pageviews_evolution_trend> + <revenue_evolution>0%</revenue_evolution> + <revenue_evolution_trend>0</revenue_evolution_trend> + <nb_conversions_evolution>0%</nb_conversions_evolution> + <nb_conversions_evolution_trend>0</nb_conversions_evolution_trend> + <orders_evolution>0%</orders_evolution> + <orders_evolution_trend>0</orders_evolution_trend> + <ecommerce_revenue_evolution>0%</ecommerce_revenue_evolution> + <ecommerce_revenue_evolution_trend>0</ecommerce_revenue_evolution_trend> + <idsite>14</idsite> + <ratio>1</ratio> + <currencySymbol>$</currencySymbol> + <previous_nb_visits>0</previous_nb_visits> + <periodName>day</periodName> + <previousRange>Tue, Jan 22</previousRange> + <previous_nb_actions>0</previous_nb_actions> + <previous_Actions_nb_pageviews>0</previous_Actions_nb_pageviews> + <previous_Goal_revenue>0</previous_Goal_revenue> + <previous_Goal_nb_conversions>0</previous_Goal_nb_conversions> + <previous_Goal_0_nb_conversions>0</previous_Goal_0_nb_conversions> + <previous_Goal_0_revenue>0</previous_Goal_0_revenue> + <group /> + <main_url>http://piwik.net</main_url> + </row> + <row> + <label>Site 15</label> + <nb_visits>0</nb_visits> + <nb_actions>0</nb_actions> + <nb_pageviews>0</nb_pageviews> + <revenue>$0</revenue> + <nb_conversions>0</nb_conversions> + <orders>0</orders> + <ecommerce_revenue>0</ecommerce_revenue> + <visits_evolution>0%</visits_evolution> + <visits_evolution_trend>0</visits_evolution_trend> + <actions_evolution>0%</actions_evolution> + <actions_evolution_trend>0</actions_evolution_trend> + <pageviews_evolution>0%</pageviews_evolution> + <pageviews_evolution_trend>0</pageviews_evolution_trend> + <revenue_evolution>0%</revenue_evolution> + <revenue_evolution_trend>0</revenue_evolution_trend> + <nb_conversions_evolution>0%</nb_conversions_evolution> + <nb_conversions_evolution_trend>0</nb_conversions_evolution_trend> + <orders_evolution>0%</orders_evolution> + <orders_evolution_trend>0</orders_evolution_trend> + <ecommerce_revenue_evolution>0%</ecommerce_revenue_evolution> + <ecommerce_revenue_evolution_trend>0</ecommerce_revenue_evolution_trend> + <idsite>15</idsite> + <ratio>1</ratio> + <currencySymbol>$</currencySymbol> + <previous_nb_visits>0</previous_nb_visits> + <periodName>day</periodName> + <previousRange>Tue, Jan 22</previousRange> + <previous_nb_actions>0</previous_nb_actions> + <previous_Actions_nb_pageviews>0</previous_Actions_nb_pageviews> + <previous_Goal_revenue>0</previous_Goal_revenue> + <previous_Goal_nb_conversions>0</previous_Goal_nb_conversions> + <previous_Goal_0_nb_conversions>0</previous_Goal_0_nb_conversions> + <previous_Goal_0_revenue>0</previous_Goal_0_revenue> + <group /> + <main_url>http://piwik.net</main_url> + </row> + </sites> +</result>
\ No newline at end of file diff --git a/plugins/MultiSites/tests/System/expected/test_limitedWithOffset__MultiSites.getAllWithGroups_day.xml b/plugins/MultiSites/tests/System/expected/test_limitedWithOffset__MultiSites.getAllWithGroups_day.xml new file mode 100644 index 0000000000..30bf8f441f --- /dev/null +++ b/plugins/MultiSites/tests/System/expected/test_limitedWithOffset__MultiSites.getAllWithGroups_day.xml @@ -0,0 +1,204 @@ +<?xml version="1.0" encoding="utf-8" ?> +<result> + <numSites>15</numSites> + <totals> + <nb_pageviews>8</nb_pageviews> + <nb_visits>5</nb_visits> + <nb_actions>12</nb_actions> + <revenue>5,082</revenue> + <nb_visits_lastdate>0</nb_visits_lastdate> + </totals> + <lastDate>2013-01-22</lastDate> + <sites> + <row> + <label>Site 5</label> + <nb_visits>0</nb_visits> + <nb_actions>0</nb_actions> + <nb_pageviews>0</nb_pageviews> + <revenue>$0</revenue> + <nb_conversions>0</nb_conversions> + <orders>0</orders> + <ecommerce_revenue>0</ecommerce_revenue> + <visits_evolution>0%</visits_evolution> + <visits_evolution_trend>0</visits_evolution_trend> + <actions_evolution>0%</actions_evolution> + <actions_evolution_trend>0</actions_evolution_trend> + <pageviews_evolution>0%</pageviews_evolution> + <pageviews_evolution_trend>0</pageviews_evolution_trend> + <revenue_evolution>0%</revenue_evolution> + <revenue_evolution_trend>0</revenue_evolution_trend> + <nb_conversions_evolution>0%</nb_conversions_evolution> + <nb_conversions_evolution_trend>0</nb_conversions_evolution_trend> + <orders_evolution>0%</orders_evolution> + <orders_evolution_trend>0</orders_evolution_trend> + <ecommerce_revenue_evolution>0%</ecommerce_revenue_evolution> + <ecommerce_revenue_evolution_trend>0</ecommerce_revenue_evolution_trend> + <idsite>5</idsite> + <ratio>1</ratio> + <currencySymbol>$</currencySymbol> + <previous_nb_visits>0</previous_nb_visits> + <periodName>day</periodName> + <previousRange>Tue, Jan 22</previousRange> + <previous_nb_actions>0</previous_nb_actions> + <previous_Actions_nb_pageviews>0</previous_Actions_nb_pageviews> + <previous_Goal_revenue>0</previous_Goal_revenue> + <previous_Goal_nb_conversions>0</previous_Goal_nb_conversions> + <previous_Goal_0_nb_conversions>0</previous_Goal_0_nb_conversions> + <previous_Goal_0_revenue>0</previous_Goal_0_revenue> + <group /> + <main_url>http://piwik.net</main_url> + </row> + <row> + <label>Site 6</label> + <nb_visits>0</nb_visits> + <nb_actions>0</nb_actions> + <nb_pageviews>0</nb_pageviews> + <revenue>$0</revenue> + <nb_conversions>0</nb_conversions> + <orders>0</orders> + <ecommerce_revenue>0</ecommerce_revenue> + <visits_evolution>0%</visits_evolution> + <visits_evolution_trend>0</visits_evolution_trend> + <actions_evolution>0%</actions_evolution> + <actions_evolution_trend>0</actions_evolution_trend> + <pageviews_evolution>0%</pageviews_evolution> + <pageviews_evolution_trend>0</pageviews_evolution_trend> + <revenue_evolution>0%</revenue_evolution> + <revenue_evolution_trend>0</revenue_evolution_trend> + <nb_conversions_evolution>0%</nb_conversions_evolution> + <nb_conversions_evolution_trend>0</nb_conversions_evolution_trend> + <orders_evolution>0%</orders_evolution> + <orders_evolution_trend>0</orders_evolution_trend> + <ecommerce_revenue_evolution>0%</ecommerce_revenue_evolution> + <ecommerce_revenue_evolution_trend>0</ecommerce_revenue_evolution_trend> + <idsite>6</idsite> + <ratio>1</ratio> + <currencySymbol>$</currencySymbol> + <previous_nb_visits>0</previous_nb_visits> + <periodName>day</periodName> + <previousRange>Tue, Jan 22</previousRange> + <previous_nb_actions>0</previous_nb_actions> + <previous_Actions_nb_pageviews>0</previous_Actions_nb_pageviews> + <previous_Goal_revenue>0</previous_Goal_revenue> + <previous_Goal_nb_conversions>0</previous_Goal_nb_conversions> + <previous_Goal_0_nb_conversions>0</previous_Goal_0_nb_conversions> + <previous_Goal_0_revenue>0</previous_Goal_0_revenue> + <group /> + <main_url>http://piwik.net</main_url> + </row> + <row> + <label>Site 7</label> + <nb_visits>0</nb_visits> + <nb_actions>0</nb_actions> + <nb_pageviews>0</nb_pageviews> + <revenue>$0</revenue> + <nb_conversions>0</nb_conversions> + <orders>0</orders> + <ecommerce_revenue>0</ecommerce_revenue> + <visits_evolution>0%</visits_evolution> + <visits_evolution_trend>0</visits_evolution_trend> + <actions_evolution>0%</actions_evolution> + <actions_evolution_trend>0</actions_evolution_trend> + <pageviews_evolution>0%</pageviews_evolution> + <pageviews_evolution_trend>0</pageviews_evolution_trend> + <revenue_evolution>0%</revenue_evolution> + <revenue_evolution_trend>0</revenue_evolution_trend> + <nb_conversions_evolution>0%</nb_conversions_evolution> + <nb_conversions_evolution_trend>0</nb_conversions_evolution_trend> + <orders_evolution>0%</orders_evolution> + <orders_evolution_trend>0</orders_evolution_trend> + <ecommerce_revenue_evolution>0%</ecommerce_revenue_evolution> + <ecommerce_revenue_evolution_trend>0</ecommerce_revenue_evolution_trend> + <idsite>7</idsite> + <ratio>1</ratio> + <currencySymbol>$</currencySymbol> + <previous_nb_visits>0</previous_nb_visits> + <periodName>day</periodName> + <previousRange>Tue, Jan 22</previousRange> + <previous_nb_actions>0</previous_nb_actions> + <previous_Actions_nb_pageviews>0</previous_Actions_nb_pageviews> + <previous_Goal_revenue>0</previous_Goal_revenue> + <previous_Goal_nb_conversions>0</previous_Goal_nb_conversions> + <previous_Goal_0_nb_conversions>0</previous_Goal_0_nb_conversions> + <previous_Goal_0_revenue>0</previous_Goal_0_revenue> + <group /> + <main_url>http://piwik.net</main_url> + </row> + <row> + <label>Site 8</label> + <nb_visits>0</nb_visits> + <nb_actions>0</nb_actions> + <nb_pageviews>0</nb_pageviews> + <revenue>$0</revenue> + <nb_conversions>0</nb_conversions> + <orders>0</orders> + <ecommerce_revenue>0</ecommerce_revenue> + <visits_evolution>0%</visits_evolution> + <visits_evolution_trend>0</visits_evolution_trend> + <actions_evolution>0%</actions_evolution> + <actions_evolution_trend>0</actions_evolution_trend> + <pageviews_evolution>0%</pageviews_evolution> + <pageviews_evolution_trend>0</pageviews_evolution_trend> + <revenue_evolution>0%</revenue_evolution> + <revenue_evolution_trend>0</revenue_evolution_trend> + <nb_conversions_evolution>0%</nb_conversions_evolution> + <nb_conversions_evolution_trend>0</nb_conversions_evolution_trend> + <orders_evolution>0%</orders_evolution> + <orders_evolution_trend>0</orders_evolution_trend> + <ecommerce_revenue_evolution>0%</ecommerce_revenue_evolution> + <ecommerce_revenue_evolution_trend>0</ecommerce_revenue_evolution_trend> + <idsite>8</idsite> + <ratio>1</ratio> + <currencySymbol>$</currencySymbol> + <previous_nb_visits>0</previous_nb_visits> + <periodName>day</periodName> + <previousRange>Tue, Jan 22</previousRange> + <previous_nb_actions>0</previous_nb_actions> + <previous_Actions_nb_pageviews>0</previous_Actions_nb_pageviews> + <previous_Goal_revenue>0</previous_Goal_revenue> + <previous_Goal_nb_conversions>0</previous_Goal_nb_conversions> + <previous_Goal_0_nb_conversions>0</previous_Goal_0_nb_conversions> + <previous_Goal_0_revenue>0</previous_Goal_0_revenue> + <group /> + <main_url>http://piwik.net</main_url> + </row> + <row> + <label>Site 9</label> + <nb_visits>0</nb_visits> + <nb_actions>0</nb_actions> + <nb_pageviews>0</nb_pageviews> + <revenue>$0</revenue> + <nb_conversions>0</nb_conversions> + <orders>0</orders> + <ecommerce_revenue>0</ecommerce_revenue> + <visits_evolution>0%</visits_evolution> + <visits_evolution_trend>0</visits_evolution_trend> + <actions_evolution>0%</actions_evolution> + <actions_evolution_trend>0</actions_evolution_trend> + <pageviews_evolution>0%</pageviews_evolution> + <pageviews_evolution_trend>0</pageviews_evolution_trend> + <revenue_evolution>0%</revenue_evolution> + <revenue_evolution_trend>0</revenue_evolution_trend> + <nb_conversions_evolution>0%</nb_conversions_evolution> + <nb_conversions_evolution_trend>0</nb_conversions_evolution_trend> + <orders_evolution>0%</orders_evolution> + <orders_evolution_trend>0</orders_evolution_trend> + <ecommerce_revenue_evolution>0%</ecommerce_revenue_evolution> + <ecommerce_revenue_evolution_trend>0</ecommerce_revenue_evolution_trend> + <idsite>9</idsite> + <ratio>1</ratio> + <currencySymbol>$</currencySymbol> + <previous_nb_visits>0</previous_nb_visits> + <periodName>day</periodName> + <previousRange>Tue, Jan 22</previousRange> + <previous_nb_actions>0</previous_nb_actions> + <previous_Actions_nb_pageviews>0</previous_Actions_nb_pageviews> + <previous_Goal_revenue>0</previous_Goal_revenue> + <previous_Goal_nb_conversions>0</previous_Goal_nb_conversions> + <previous_Goal_0_nb_conversions>0</previous_Goal_0_nb_conversions> + <previous_Goal_0_revenue>0</previous_Goal_0_revenue> + <group /> + <main_url>http://piwik.net</main_url> + </row> + </sites> +</result>
\ No newline at end of file diff --git a/plugins/MultiSites/tests/System/expected/test_limitedWithPattern__MultiSites.getAllWithGroups_day.xml b/plugins/MultiSites/tests/System/expected/test_limitedWithPattern__MultiSites.getAllWithGroups_day.xml new file mode 100644 index 0000000000..22108abb47 --- /dev/null +++ b/plugins/MultiSites/tests/System/expected/test_limitedWithPattern__MultiSites.getAllWithGroups_day.xml @@ -0,0 +1,204 @@ +<?xml version="1.0" encoding="utf-8" ?> +<result> + <numSites>7</numSites> + <totals> + <nb_pageviews>8</nb_pageviews> + <nb_visits>5</nb_visits> + <nb_actions>12</nb_actions> + <revenue>5,082</revenue> + <nb_visits_lastdate>0</nb_visits_lastdate> + </totals> + <lastDate>2013-01-22</lastDate> + <sites> + <row> + <label>Site 1</label> + <nb_visits>2</nb_visits> + <nb_actions>4</nb_actions> + <nb_pageviews>3</nb_pageviews> + <revenue>$2,541</revenue> + <nb_conversions>1</nb_conversions> + <orders>1</orders> + <ecommerce_revenue>2541</ecommerce_revenue> + <visits_evolution>100%</visits_evolution> + <visits_evolution_trend>1</visits_evolution_trend> + <actions_evolution>100%</actions_evolution> + <actions_evolution_trend>1</actions_evolution_trend> + <pageviews_evolution>100%</pageviews_evolution> + <pageviews_evolution_trend>1</pageviews_evolution_trend> + <revenue_evolution>100%</revenue_evolution> + <revenue_evolution_trend>1</revenue_evolution_trend> + <nb_conversions_evolution>100%</nb_conversions_evolution> + <nb_conversions_evolution_trend>1</nb_conversions_evolution_trend> + <orders_evolution>100%</orders_evolution> + <orders_evolution_trend>1</orders_evolution_trend> + <ecommerce_revenue_evolution>100%</ecommerce_revenue_evolution> + <ecommerce_revenue_evolution_trend>1</ecommerce_revenue_evolution_trend> + <idsite>1</idsite> + <ratio>1</ratio> + <currencySymbol>$</currencySymbol> + <previous_nb_visits>0</previous_nb_visits> + <periodName>day</periodName> + <previousRange>Tue, Jan 22</previousRange> + <previous_nb_actions>0</previous_nb_actions> + <previous_Actions_nb_pageviews>0</previous_Actions_nb_pageviews> + <previous_Goal_revenue>0</previous_Goal_revenue> + <previous_Goal_nb_conversions>0</previous_Goal_nb_conversions> + <previous_Goal_0_nb_conversions>0</previous_Goal_0_nb_conversions> + <previous_Goal_0_revenue>0</previous_Goal_0_revenue> + <group /> + <main_url>http://piwik.net</main_url> + </row> + <row> + <label>Site 10</label> + <nb_visits>0</nb_visits> + <nb_actions>0</nb_actions> + <nb_pageviews>0</nb_pageviews> + <revenue>$0</revenue> + <nb_conversions>0</nb_conversions> + <orders>0</orders> + <ecommerce_revenue>0</ecommerce_revenue> + <visits_evolution>0%</visits_evolution> + <visits_evolution_trend>0</visits_evolution_trend> + <actions_evolution>0%</actions_evolution> + <actions_evolution_trend>0</actions_evolution_trend> + <pageviews_evolution>0%</pageviews_evolution> + <pageviews_evolution_trend>0</pageviews_evolution_trend> + <revenue_evolution>0%</revenue_evolution> + <revenue_evolution_trend>0</revenue_evolution_trend> + <nb_conversions_evolution>0%</nb_conversions_evolution> + <nb_conversions_evolution_trend>0</nb_conversions_evolution_trend> + <orders_evolution>0%</orders_evolution> + <orders_evolution_trend>0</orders_evolution_trend> + <ecommerce_revenue_evolution>0%</ecommerce_revenue_evolution> + <ecommerce_revenue_evolution_trend>0</ecommerce_revenue_evolution_trend> + <idsite>10</idsite> + <ratio>1</ratio> + <currencySymbol>$</currencySymbol> + <previous_nb_visits>0</previous_nb_visits> + <periodName>day</periodName> + <previousRange>Tue, Jan 22</previousRange> + <previous_nb_actions>0</previous_nb_actions> + <previous_Actions_nb_pageviews>0</previous_Actions_nb_pageviews> + <previous_Goal_revenue>0</previous_Goal_revenue> + <previous_Goal_nb_conversions>0</previous_Goal_nb_conversions> + <previous_Goal_0_nb_conversions>0</previous_Goal_0_nb_conversions> + <previous_Goal_0_revenue>0</previous_Goal_0_revenue> + <group /> + <main_url>http://piwik.net</main_url> + </row> + <row> + <label>Site 11</label> + <nb_visits>0</nb_visits> + <nb_actions>0</nb_actions> + <nb_pageviews>0</nb_pageviews> + <revenue>$0</revenue> + <nb_conversions>0</nb_conversions> + <orders>0</orders> + <ecommerce_revenue>0</ecommerce_revenue> + <visits_evolution>0%</visits_evolution> + <visits_evolution_trend>0</visits_evolution_trend> + <actions_evolution>0%</actions_evolution> + <actions_evolution_trend>0</actions_evolution_trend> + <pageviews_evolution>0%</pageviews_evolution> + <pageviews_evolution_trend>0</pageviews_evolution_trend> + <revenue_evolution>0%</revenue_evolution> + <revenue_evolution_trend>0</revenue_evolution_trend> + <nb_conversions_evolution>0%</nb_conversions_evolution> + <nb_conversions_evolution_trend>0</nb_conversions_evolution_trend> + <orders_evolution>0%</orders_evolution> + <orders_evolution_trend>0</orders_evolution_trend> + <ecommerce_revenue_evolution>0%</ecommerce_revenue_evolution> + <ecommerce_revenue_evolution_trend>0</ecommerce_revenue_evolution_trend> + <idsite>11</idsite> + <ratio>1</ratio> + <currencySymbol>$</currencySymbol> + <previous_nb_visits>0</previous_nb_visits> + <periodName>day</periodName> + <previousRange>Tue, Jan 22</previousRange> + <previous_nb_actions>0</previous_nb_actions> + <previous_Actions_nb_pageviews>0</previous_Actions_nb_pageviews> + <previous_Goal_revenue>0</previous_Goal_revenue> + <previous_Goal_nb_conversions>0</previous_Goal_nb_conversions> + <previous_Goal_0_nb_conversions>0</previous_Goal_0_nb_conversions> + <previous_Goal_0_revenue>0</previous_Goal_0_revenue> + <group /> + <main_url>http://piwik.net</main_url> + </row> + <row> + <label>Site 12</label> + <nb_visits>0</nb_visits> + <nb_actions>0</nb_actions> + <nb_pageviews>0</nb_pageviews> + <revenue>$0</revenue> + <nb_conversions>0</nb_conversions> + <orders>0</orders> + <ecommerce_revenue>0</ecommerce_revenue> + <visits_evolution>0%</visits_evolution> + <visits_evolution_trend>0</visits_evolution_trend> + <actions_evolution>0%</actions_evolution> + <actions_evolution_trend>0</actions_evolution_trend> + <pageviews_evolution>0%</pageviews_evolution> + <pageviews_evolution_trend>0</pageviews_evolution_trend> + <revenue_evolution>0%</revenue_evolution> + <revenue_evolution_trend>0</revenue_evolution_trend> + <nb_conversions_evolution>0%</nb_conversions_evolution> + <nb_conversions_evolution_trend>0</nb_conversions_evolution_trend> + <orders_evolution>0%</orders_evolution> + <orders_evolution_trend>0</orders_evolution_trend> + <ecommerce_revenue_evolution>0%</ecommerce_revenue_evolution> + <ecommerce_revenue_evolution_trend>0</ecommerce_revenue_evolution_trend> + <idsite>12</idsite> + <ratio>1</ratio> + <currencySymbol>$</currencySymbol> + <previous_nb_visits>0</previous_nb_visits> + <periodName>day</periodName> + <previousRange>Tue, Jan 22</previousRange> + <previous_nb_actions>0</previous_nb_actions> + <previous_Actions_nb_pageviews>0</previous_Actions_nb_pageviews> + <previous_Goal_revenue>0</previous_Goal_revenue> + <previous_Goal_nb_conversions>0</previous_Goal_nb_conversions> + <previous_Goal_0_nb_conversions>0</previous_Goal_0_nb_conversions> + <previous_Goal_0_revenue>0</previous_Goal_0_revenue> + <group /> + <main_url>http://piwik.net</main_url> + </row> + <row> + <label>Site 13</label> + <nb_visits>0</nb_visits> + <nb_actions>0</nb_actions> + <nb_pageviews>0</nb_pageviews> + <revenue>$0</revenue> + <nb_conversions>0</nb_conversions> + <orders>0</orders> + <ecommerce_revenue>0</ecommerce_revenue> + <visits_evolution>0%</visits_evolution> + <visits_evolution_trend>0</visits_evolution_trend> + <actions_evolution>0%</actions_evolution> + <actions_evolution_trend>0</actions_evolution_trend> + <pageviews_evolution>0%</pageviews_evolution> + <pageviews_evolution_trend>0</pageviews_evolution_trend> + <revenue_evolution>0%</revenue_evolution> + <revenue_evolution_trend>0</revenue_evolution_trend> + <nb_conversions_evolution>0%</nb_conversions_evolution> + <nb_conversions_evolution_trend>0</nb_conversions_evolution_trend> + <orders_evolution>0%</orders_evolution> + <orders_evolution_trend>0</orders_evolution_trend> + <ecommerce_revenue_evolution>0%</ecommerce_revenue_evolution> + <ecommerce_revenue_evolution_trend>0</ecommerce_revenue_evolution_trend> + <idsite>13</idsite> + <ratio>1</ratio> + <currencySymbol>$</currencySymbol> + <previous_nb_visits>0</previous_nb_visits> + <periodName>day</periodName> + <previousRange>Tue, Jan 22</previousRange> + <previous_nb_actions>0</previous_nb_actions> + <previous_Actions_nb_pageviews>0</previous_Actions_nb_pageviews> + <previous_Goal_revenue>0</previous_Goal_revenue> + <previous_Goal_nb_conversions>0</previous_Goal_nb_conversions> + <previous_Goal_0_nb_conversions>0</previous_Goal_0_nb_conversions> + <previous_Goal_0_revenue>0</previous_Goal_0_revenue> + <group /> + <main_url>http://piwik.net</main_url> + </row> + </sites> +</result>
\ No newline at end of file diff --git a/plugins/MultiSites/tests/System/expected/test_limited__MultiSites.getAllWithGroups_day.xml b/plugins/MultiSites/tests/System/expected/test_limited__MultiSites.getAllWithGroups_day.xml new file mode 100644 index 0000000000..638b9a2250 --- /dev/null +++ b/plugins/MultiSites/tests/System/expected/test_limited__MultiSites.getAllWithGroups_day.xml @@ -0,0 +1,204 @@ +<?xml version="1.0" encoding="utf-8" ?> +<result> + <numSites>15</numSites> + <totals> + <nb_pageviews>8</nb_pageviews> + <nb_visits>5</nb_visits> + <nb_actions>12</nb_actions> + <revenue>5,082</revenue> + <nb_visits_lastdate>0</nb_visits_lastdate> + </totals> + <lastDate>2013-01-22</lastDate> + <sites> + <row> + <label>Site 1</label> + <nb_visits>2</nb_visits> + <nb_actions>4</nb_actions> + <nb_pageviews>3</nb_pageviews> + <revenue>$2,541</revenue> + <nb_conversions>1</nb_conversions> + <orders>1</orders> + <ecommerce_revenue>2541</ecommerce_revenue> + <visits_evolution>100%</visits_evolution> + <visits_evolution_trend>1</visits_evolution_trend> + <actions_evolution>100%</actions_evolution> + <actions_evolution_trend>1</actions_evolution_trend> + <pageviews_evolution>100%</pageviews_evolution> + <pageviews_evolution_trend>1</pageviews_evolution_trend> + <revenue_evolution>100%</revenue_evolution> + <revenue_evolution_trend>1</revenue_evolution_trend> + <nb_conversions_evolution>100%</nb_conversions_evolution> + <nb_conversions_evolution_trend>1</nb_conversions_evolution_trend> + <orders_evolution>100%</orders_evolution> + <orders_evolution_trend>1</orders_evolution_trend> + <ecommerce_revenue_evolution>100%</ecommerce_revenue_evolution> + <ecommerce_revenue_evolution_trend>1</ecommerce_revenue_evolution_trend> + <idsite>1</idsite> + <ratio>1</ratio> + <currencySymbol>$</currencySymbol> + <previous_nb_visits>0</previous_nb_visits> + <periodName>day</periodName> + <previousRange>Tue, Jan 22</previousRange> + <previous_nb_actions>0</previous_nb_actions> + <previous_Actions_nb_pageviews>0</previous_Actions_nb_pageviews> + <previous_Goal_revenue>0</previous_Goal_revenue> + <previous_Goal_nb_conversions>0</previous_Goal_nb_conversions> + <previous_Goal_0_nb_conversions>0</previous_Goal_0_nb_conversions> + <previous_Goal_0_revenue>0</previous_Goal_0_revenue> + <group /> + <main_url>http://piwik.net</main_url> + </row> + <row> + <label>Site 2</label> + <nb_visits>1</nb_visits> + <nb_actions>2</nb_actions> + <nb_pageviews>2</nb_pageviews> + <revenue>$2,541</revenue> + <nb_conversions>1</nb_conversions> + <orders>1</orders> + <ecommerce_revenue>2541</ecommerce_revenue> + <visits_evolution>100%</visits_evolution> + <visits_evolution_trend>1</visits_evolution_trend> + <actions_evolution>100%</actions_evolution> + <actions_evolution_trend>1</actions_evolution_trend> + <pageviews_evolution>100%</pageviews_evolution> + <pageviews_evolution_trend>1</pageviews_evolution_trend> + <revenue_evolution>100%</revenue_evolution> + <revenue_evolution_trend>1</revenue_evolution_trend> + <nb_conversions_evolution>100%</nb_conversions_evolution> + <nb_conversions_evolution_trend>1</nb_conversions_evolution_trend> + <orders_evolution>100%</orders_evolution> + <orders_evolution_trend>1</orders_evolution_trend> + <ecommerce_revenue_evolution>100%</ecommerce_revenue_evolution> + <ecommerce_revenue_evolution_trend>1</ecommerce_revenue_evolution_trend> + <idsite>2</idsite> + <ratio>1</ratio> + <currencySymbol>$</currencySymbol> + <previous_nb_visits>0</previous_nb_visits> + <periodName>day</periodName> + <previousRange>Tue, Jan 22</previousRange> + <previous_nb_actions>0</previous_nb_actions> + <previous_Actions_nb_pageviews>0</previous_Actions_nb_pageviews> + <previous_Goal_revenue>0</previous_Goal_revenue> + <previous_Goal_nb_conversions>0</previous_Goal_nb_conversions> + <previous_Goal_0_nb_conversions>0</previous_Goal_0_nb_conversions> + <previous_Goal_0_revenue>0</previous_Goal_0_revenue> + <group /> + <main_url>http://piwik.net</main_url> + </row> + <row> + <label>Site 3</label> + <nb_visits>1</nb_visits> + <nb_actions>4</nb_actions> + <nb_pageviews>2</nb_pageviews> + <revenue>$0</revenue> + <nb_conversions>0</nb_conversions> + <orders>0</orders> + <ecommerce_revenue>0</ecommerce_revenue> + <visits_evolution>100%</visits_evolution> + <visits_evolution_trend>1</visits_evolution_trend> + <actions_evolution>100%</actions_evolution> + <actions_evolution_trend>1</actions_evolution_trend> + <pageviews_evolution>100%</pageviews_evolution> + <pageviews_evolution_trend>1</pageviews_evolution_trend> + <revenue_evolution>0%</revenue_evolution> + <revenue_evolution_trend>0</revenue_evolution_trend> + <nb_conversions_evolution>0%</nb_conversions_evolution> + <nb_conversions_evolution_trend>0</nb_conversions_evolution_trend> + <orders_evolution>0%</orders_evolution> + <orders_evolution_trend>0</orders_evolution_trend> + <ecommerce_revenue_evolution>0%</ecommerce_revenue_evolution> + <ecommerce_revenue_evolution_trend>0</ecommerce_revenue_evolution_trend> + <idsite>3</idsite> + <ratio>1</ratio> + <currencySymbol>$</currencySymbol> + <previous_nb_visits>0</previous_nb_visits> + <periodName>day</periodName> + <previousRange>Tue, Jan 22</previousRange> + <previous_nb_actions>0</previous_nb_actions> + <previous_Actions_nb_pageviews>0</previous_Actions_nb_pageviews> + <previous_Goal_revenue>0</previous_Goal_revenue> + <previous_Goal_nb_conversions>0</previous_Goal_nb_conversions> + <previous_Goal_0_nb_conversions>0</previous_Goal_0_nb_conversions> + <previous_Goal_0_revenue>0</previous_Goal_0_revenue> + <group /> + <main_url>http://piwik.net</main_url> + </row> + <row> + <label>Site 4</label> + <nb_visits>1</nb_visits> + <nb_actions>2</nb_actions> + <nb_pageviews>1</nb_pageviews> + <revenue>$0</revenue> + <nb_conversions>0</nb_conversions> + <orders>0</orders> + <ecommerce_revenue>0</ecommerce_revenue> + <visits_evolution>100%</visits_evolution> + <visits_evolution_trend>1</visits_evolution_trend> + <actions_evolution>100%</actions_evolution> + <actions_evolution_trend>1</actions_evolution_trend> + <pageviews_evolution>100%</pageviews_evolution> + <pageviews_evolution_trend>1</pageviews_evolution_trend> + <revenue_evolution>0%</revenue_evolution> + <revenue_evolution_trend>0</revenue_evolution_trend> + <nb_conversions_evolution>0%</nb_conversions_evolution> + <nb_conversions_evolution_trend>0</nb_conversions_evolution_trend> + <orders_evolution>0%</orders_evolution> + <orders_evolution_trend>0</orders_evolution_trend> + <ecommerce_revenue_evolution>0%</ecommerce_revenue_evolution> + <ecommerce_revenue_evolution_trend>0</ecommerce_revenue_evolution_trend> + <idsite>4</idsite> + <ratio>1</ratio> + <currencySymbol>$</currencySymbol> + <previous_nb_visits>0</previous_nb_visits> + <periodName>day</periodName> + <previousRange>Tue, Jan 22</previousRange> + <previous_nb_actions>0</previous_nb_actions> + <previous_Actions_nb_pageviews>0</previous_Actions_nb_pageviews> + <previous_Goal_revenue>0</previous_Goal_revenue> + <previous_Goal_nb_conversions>0</previous_Goal_nb_conversions> + <previous_Goal_0_nb_conversions>0</previous_Goal_0_nb_conversions> + <previous_Goal_0_revenue>0</previous_Goal_0_revenue> + <group /> + <main_url>http://piwik.net</main_url> + </row> + <row> + <label>Site 5</label> + <nb_visits>0</nb_visits> + <nb_actions>0</nb_actions> + <nb_pageviews>0</nb_pageviews> + <revenue>$0</revenue> + <nb_conversions>0</nb_conversions> + <orders>0</orders> + <ecommerce_revenue>0</ecommerce_revenue> + <visits_evolution>0%</visits_evolution> + <visits_evolution_trend>0</visits_evolution_trend> + <actions_evolution>0%</actions_evolution> + <actions_evolution_trend>0</actions_evolution_trend> + <pageviews_evolution>0%</pageviews_evolution> + <pageviews_evolution_trend>0</pageviews_evolution_trend> + <revenue_evolution>0%</revenue_evolution> + <revenue_evolution_trend>0</revenue_evolution_trend> + <nb_conversions_evolution>0%</nb_conversions_evolution> + <nb_conversions_evolution_trend>0</nb_conversions_evolution_trend> + <orders_evolution>0%</orders_evolution> + <orders_evolution_trend>0</orders_evolution_trend> + <ecommerce_revenue_evolution>0%</ecommerce_revenue_evolution> + <ecommerce_revenue_evolution_trend>0</ecommerce_revenue_evolution_trend> + <idsite>5</idsite> + <ratio>1</ratio> + <currencySymbol>$</currencySymbol> + <previous_nb_visits>0</previous_nb_visits> + <periodName>day</periodName> + <previousRange>Tue, Jan 22</previousRange> + <previous_nb_actions>0</previous_nb_actions> + <previous_Actions_nb_pageviews>0</previous_Actions_nb_pageviews> + <previous_Goal_revenue>0</previous_Goal_revenue> + <previous_Goal_nb_conversions>0</previous_Goal_nb_conversions> + <previous_Goal_0_nb_conversions>0</previous_Goal_0_nb_conversions> + <previous_Goal_0_revenue>0</previous_Goal_0_revenue> + <group /> + <main_url>http://piwik.net</main_url> + </row> + </sites> +</result>
\ No newline at end of file diff --git a/plugins/MultiSites/tests/System/expected/test_multiplePeriods__MultiSites.getAllWithGroups_day.xml b/plugins/MultiSites/tests/System/expected/test_multiplePeriods__MultiSites.getAllWithGroups_day.xml new file mode 100644 index 0000000000..f76ae70b1c --- /dev/null +++ b/plugins/MultiSites/tests/System/expected/test_multiplePeriods__MultiSites.getAllWithGroups_day.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8" ?> +<result> + <error message="Multiple periods are not supported + + --> To temporarily debug this error further, set const PIWIK_PRINT_ERROR_BACKTRACE=true; in index.php" /> +</result>
\ No newline at end of file diff --git a/plugins/MultiSites/vue/dist/MultiSites.umd.js b/plugins/MultiSites/vue/dist/MultiSites.umd.js index 6d36598136..93a6592be6 100644 --- a/plugins/MultiSites/vue/dist/MultiSites.umd.js +++ b/plugins/MultiSites/vue/dist/MultiSites.umd.js @@ -908,8 +908,7 @@ var Dashboard_store_DashboardStore = /*#__PURE__*/function () { this.privateState.isLoading = true; this.privateState.errorLoadingSites = false; var params = { - module: 'MultiSites', - action: 'getAllWithGroups', + method: 'MultiSites.getAllWithGroups', hideMetricsDoc: '1', filter_sort_order: 'asc', filter_limit: this.state.value.pageSize, diff --git a/plugins/MultiSites/vue/dist/MultiSites.umd.min.js b/plugins/MultiSites/vue/dist/MultiSites.umd.min.js index 170f040f4a..4201bfffbe 100644 --- a/plugins/MultiSites/vue/dist/MultiSites.umd.min.js +++ b/plugins/MultiSites/vue/dist/MultiSites.umd.min.js @@ -10,7 +10,7 @@ * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */var Pe=window,Te=Pe.NumberFormatter,Ae=function(){function e(){var t=this;Ee(this,e),Be(this,"privateState",Object(i["reactive"])({sites:[],isLoading:!1,pageSize:25,currentPage:0,totalVisits:"?",totalPageviews:"?",totalActions:"?",totalRevenue:"?",searchTerm:"",lastVisits:"?",lastVisitsDate:"?",numberOfSites:0,loadingMessage:Object(o["translate"])("MultiSites_LoadingWebsites"),reverse:!0,sortColumn:"nb_visits",refreshInterval:0,errorLoadingSites:!1})),Be(this,"refreshTimeout",null),Be(this,"fetchAbort",null),Be(this,"state",Object(i["computed"])((function(){return Object(i["readonly"])(t.privateState)}))),Be(this,"numberOfFilteredSites",Object(i["computed"])((function(){return t.state.value.numberOfSites}))),Be(this,"numberOfPages",Object(i["computed"])((function(){return Math.ceil(t.numberOfFilteredSites.value/t.state.value.pageSize-1)}))),Be(this,"currentPagingOffset",Object(i["computed"])((function(){return Math.ceil(t.state.value.currentPage*t.state.value.pageSize)}))),Be(this,"paginationLowerBound",Object(i["computed"])((function(){return t.currentPagingOffset.value+1}))),Be(this,"paginationUpperBound",Object(i["computed"])((function(){var e=t.currentPagingOffset.value+t.state.value.pageSize,n=t.numberOfFilteredSites.value;return e>n&&(e=n),e})))}return Me(e,[{key:"cancelRefereshInterval",value:function(){this.refreshTimeout&&(clearTimeout(this.refreshTimeout),this.refreshTimeout=null)}},{key:"updateWebsitesList",value:function(e){var t=this;if(e){var n=e.sites;n.forEach((function(e){if(1!==e.ratio&&"1"!==e.ratio){var n=Te.formatPercent(Math.round(100*parseInt(e.ratio,10))),r=null,a="0",i="0",s="0",l="0";if("nb_visits"!==t.state.value.sortColumn&&"visits_evolution"!==t.state.value.sortColumn||(a=Te.formatNumber(e.previous_nb_visits),i=Te.formatNumber(e.nb_visits),s=Te.formatPercent(e.visits_evolution),r=Object(o["translate"])("General_ColumnNbVisits"),l=Te.formatNumber(Math.round(parseInt(e.previous_nb_visits,10)*parseInt(e.ratio,10)))),"pageviews_evolution"===t.state.value.sortColumn&&(a="".concat(e.previous_Actions_nb_pageviews),i="".concat(e.nb_pageviews),s=Te.formatPercent(e.pageviews_evolution),r=Object(o["translate"])("General_ColumnPageviews"),l=Te.formatNumber(Math.round(parseInt(e.previous_Actions_nb_pageviews,10)*parseInt(e.ratio,10)))),"revenue_evolution"===t.state.value.sortColumn&&(a=Te.formatCurrency(e.previous_Goal_revenue,e.currencySymbol),i=Te.formatCurrency(e.revenue,e.currencySymbol),s=Te.formatPercent(e.revenue_evolution),r=Object(o["translate"])("General_ColumnRevenue"),l=Te.formatCurrency(Math.round(parseInt(e.previous_Goal_revenue,10)*parseInt(e.ratio,10)),e.currencySymbol)),r)switch(e.tooltip="".concat(Object(o["translate"])("MultiSites_EvolutionComparisonIncomplete",[n]),"\n"),e.tooltip+="".concat(Object(o["translate"])("MultiSites_EvolutionComparisonProportional",[n,"".concat(l),r,"".concat(a)]),"\n"),e.periodName){case"day":e.tooltip+=Object(o["translate"])("MultiSites_EvolutionComparisonDay",["".concat(i),r,"".concat(l),e.previousRange,"".concat(s)]);break;case"week":e.tooltip+=Object(o["translate"])("MultiSites_EvolutionComparisonWeek",["".concat(i),r,"".concat(l),e.previousRange,"".concat(s)]);break;case"month":e.tooltip+=Object(o["translate"])("MultiSites_EvolutionComparisonMonth",["".concat(i),r,"".concat(l),e.previousRange,"".concat(s)]);break;case"year":e.tooltip+=Object(o["translate"])("MultiSites_EvolutionComparisonYear",["".concat(i),r,"".concat(l),e.previousRange,"".concat(s)]);break;default:break}}})),this.privateState.totalVisits=e.totals.nb_visits,this.privateState.totalPageviews=e.totals.nb_pageviews,this.privateState.totalActions=e.totals.nb_actions,this.privateState.totalRevenue=e.totals.revenue,this.privateState.lastVisits=e.totals.nb_visits_lastdate,this.privateState.sites=n,this.privateState.numberOfSites=e.numSites,this.privateState.lastVisitsDate=e.lastDate}else this.onError()}},{key:"sortBy",value:function(e){this.state.value.sortColumn===e&&(this.privateState.reverse=!this.state.value.reverse),this.privateState.sortColumn=e,this.fetchAllSites()}},{key:"previousPage",value:function(){this.privateState.currentPage=this.state.value.currentPage-1,this.fetchAllSites()}},{key:"nextPage",value:function(){this.privateState.currentPage=this.state.value.currentPage+1,this.fetchAllSites()}},{key:"searchSite",value:function(e){this.privateState.searchTerm=e,this.privateState.currentPage=0,this.fetchAllSites()}},{key:"fetchAllSites",value:function(){var e=this;this.fetchAbort&&(this.fetchAbort.abort(),this.fetchAbort=null,this.cancelRefereshInterval()),this.privateState.isLoading=!0,this.privateState.errorLoadingSites=!1;var t={module:"MultiSites",action:"getAllWithGroups",hideMetricsDoc:"1",filter_sort_order:"asc",filter_limit:this.state.value.pageSize,filter_offset:this.currentPagingOffset.value,showColumns:["label","nb_visits","nb_pageviews","visits_evolution","visits_evolution_trend","pageviews_evolution","pageviews_evolution_trend","revenue_evolution","revenue_evolution_trend","nb_actions,revenue"].join(",")};return this.privateState.searchTerm&&(t.pattern=this.privateState.searchTerm),this.privateState.sortColumn&&(t.filter_sort_column=this.privateState.sortColumn),this.privateState.reverse&&(t.filter_sort_order="desc"),this.fetchAbort=new AbortController,o["AjaxHelper"].fetch(t,{abortController:this.fetchAbort}).then((function(t){e.updateWebsitesList(t)})).catch((function(){e.onError()})).finally((function(){e.privateState.isLoading=!1,e.fetchAbort=null,e.state.value.refreshInterval&&e.state.value.refreshInterval>0&&(e.cancelRefereshInterval(),e.refreshTimeout=setTimeout((function(){e.refreshTimeout=null,e.fetchAllSites()}),1e3*e.state.value.refreshInterval))}))}},{key:"onError",value:function(){this.privateState.errorLoadingSites=!0,this.privateState.sites=[]}},{key:"setRefreshInterval",value:function(e){this.privateState.refreshInterval=e}},{key:"setPageSize",value:function(e){this.privateState.pageSize=e}}]),e}(),De=new Ae,xe=Object(i["defineComponent"])({props:{displayRevenueColumn:Boolean,showSparklines:Boolean,dateSparkline:String,pageSize:Number,autoRefreshTodayReport:Number},components:{EnrichedHeadline:o["EnrichedHeadline"],ActivityIndicator:o["ActivityIndicator"],MultisitesSite:G},data:function(){return{evolutionSelector:"visits_evolution",searchTerm:""}},created:function(){this.pageSize&&De.setPageSize(this.pageSize),this.refresh(this.autoRefreshTodayReport)},methods:{refresh:function(e){De.setRefreshInterval(e),De.fetchAllSites()},sortBy:function(e){De.sortBy(e)},previousPage:function(){De.previousPage()},nextPage:function(){De.nextPage()},searchSite:function(){De.searchSite(this.searchTerm)}},computed:{hasSuperUserAccess:function(){return o["Matomo"].hasSuperUserAccess},date:function(){return o["MatomoUrl"].urlParsed.value.date},idSite:function(){return o["MatomoUrl"].urlParsed.value.idSite},url:function(){return o["Matomo"].piwik_url},period:function(){return o["Matomo"].period},areAdsForProfessionalServicesEnabled:function(){return o["Matomo"].config&&o["Matomo"].config.are_ads_enabled},sortColumn:function(){return De.state.value.sortColumn},reverse:function(){return De.state.value.reverse},smallTitleContent:function(){var e=De.state.value;return Object(o["translate"])("General_TotalVisitsPageviewsActionsRevenue","<strong>".concat(e.totalVisits,"</strong>"),"<strong>".concat(e.totalPageviews,"</strong>"),"<strong>".concat(e.totalActions,"</strong>"),"<strong>".concat(e.totalRevenue,"</strong>"))},smallTitleTooltip:function(){var e=De.state.value;return Object(o["translate"])("General_EvolutionSummaryGeneric",Object(o["translate"])("General_NVisits","".concat(e.totalVisits)),this.date,"".concat(e.lastVisits),e.lastVisitsDate,Object(o["getFormattedEvolution"])(e.totalVisits,e.lastVisits))},loadingMessage:function(){return De.state.value.loadingMessage},isLoading:function(){return De.state.value.isLoading},errorLoadingSites:function(){return De.state.value.errorLoadingSites},sites:function(){return De.state.value.sites},numberOfPages:function(){return De.numberOfPages.value},currentPage:function(){return De.state.value.currentPage},paginationLowerBound:function(){return De.paginationLowerBound.value},paginationUpperBound:function(){return De.paginationUpperBound.value},numberOfFilteredSites:function(){return De.numberOfFilteredSites.value},professionalHelpUrl:function(){return"https://matomo.org/support-plans/?pk_campaign=Help&pk_medium=AjaxError&pk_content=MultiSites&pk_source=Matomo_App"},addSiteUrl:function(){return"index.php?module=SitesManager&action=index&showaddsite=1&period=".concat(this.period,"&")+"date=".concat(this.date,"&idSite=").concat(this.idSite)}}});xe.render=Ne;var Ge=xe; + */var Pe=window,Te=Pe.NumberFormatter,Ae=function(){function e(){var t=this;Ee(this,e),Be(this,"privateState",Object(i["reactive"])({sites:[],isLoading:!1,pageSize:25,currentPage:0,totalVisits:"?",totalPageviews:"?",totalActions:"?",totalRevenue:"?",searchTerm:"",lastVisits:"?",lastVisitsDate:"?",numberOfSites:0,loadingMessage:Object(o["translate"])("MultiSites_LoadingWebsites"),reverse:!0,sortColumn:"nb_visits",refreshInterval:0,errorLoadingSites:!1})),Be(this,"refreshTimeout",null),Be(this,"fetchAbort",null),Be(this,"state",Object(i["computed"])((function(){return Object(i["readonly"])(t.privateState)}))),Be(this,"numberOfFilteredSites",Object(i["computed"])((function(){return t.state.value.numberOfSites}))),Be(this,"numberOfPages",Object(i["computed"])((function(){return Math.ceil(t.numberOfFilteredSites.value/t.state.value.pageSize-1)}))),Be(this,"currentPagingOffset",Object(i["computed"])((function(){return Math.ceil(t.state.value.currentPage*t.state.value.pageSize)}))),Be(this,"paginationLowerBound",Object(i["computed"])((function(){return t.currentPagingOffset.value+1}))),Be(this,"paginationUpperBound",Object(i["computed"])((function(){var e=t.currentPagingOffset.value+t.state.value.pageSize,n=t.numberOfFilteredSites.value;return e>n&&(e=n),e})))}return Me(e,[{key:"cancelRefereshInterval",value:function(){this.refreshTimeout&&(clearTimeout(this.refreshTimeout),this.refreshTimeout=null)}},{key:"updateWebsitesList",value:function(e){var t=this;if(e){var n=e.sites;n.forEach((function(e){if(1!==e.ratio&&"1"!==e.ratio){var n=Te.formatPercent(Math.round(100*parseInt(e.ratio,10))),r=null,a="0",i="0",s="0",l="0";if("nb_visits"!==t.state.value.sortColumn&&"visits_evolution"!==t.state.value.sortColumn||(a=Te.formatNumber(e.previous_nb_visits),i=Te.formatNumber(e.nb_visits),s=Te.formatPercent(e.visits_evolution),r=Object(o["translate"])("General_ColumnNbVisits"),l=Te.formatNumber(Math.round(parseInt(e.previous_nb_visits,10)*parseInt(e.ratio,10)))),"pageviews_evolution"===t.state.value.sortColumn&&(a="".concat(e.previous_Actions_nb_pageviews),i="".concat(e.nb_pageviews),s=Te.formatPercent(e.pageviews_evolution),r=Object(o["translate"])("General_ColumnPageviews"),l=Te.formatNumber(Math.round(parseInt(e.previous_Actions_nb_pageviews,10)*parseInt(e.ratio,10)))),"revenue_evolution"===t.state.value.sortColumn&&(a=Te.formatCurrency(e.previous_Goal_revenue,e.currencySymbol),i=Te.formatCurrency(e.revenue,e.currencySymbol),s=Te.formatPercent(e.revenue_evolution),r=Object(o["translate"])("General_ColumnRevenue"),l=Te.formatCurrency(Math.round(parseInt(e.previous_Goal_revenue,10)*parseInt(e.ratio,10)),e.currencySymbol)),r)switch(e.tooltip="".concat(Object(o["translate"])("MultiSites_EvolutionComparisonIncomplete",[n]),"\n"),e.tooltip+="".concat(Object(o["translate"])("MultiSites_EvolutionComparisonProportional",[n,"".concat(l),r,"".concat(a)]),"\n"),e.periodName){case"day":e.tooltip+=Object(o["translate"])("MultiSites_EvolutionComparisonDay",["".concat(i),r,"".concat(l),e.previousRange,"".concat(s)]);break;case"week":e.tooltip+=Object(o["translate"])("MultiSites_EvolutionComparisonWeek",["".concat(i),r,"".concat(l),e.previousRange,"".concat(s)]);break;case"month":e.tooltip+=Object(o["translate"])("MultiSites_EvolutionComparisonMonth",["".concat(i),r,"".concat(l),e.previousRange,"".concat(s)]);break;case"year":e.tooltip+=Object(o["translate"])("MultiSites_EvolutionComparisonYear",["".concat(i),r,"".concat(l),e.previousRange,"".concat(s)]);break;default:break}}})),this.privateState.totalVisits=e.totals.nb_visits,this.privateState.totalPageviews=e.totals.nb_pageviews,this.privateState.totalActions=e.totals.nb_actions,this.privateState.totalRevenue=e.totals.revenue,this.privateState.lastVisits=e.totals.nb_visits_lastdate,this.privateState.sites=n,this.privateState.numberOfSites=e.numSites,this.privateState.lastVisitsDate=e.lastDate}else this.onError()}},{key:"sortBy",value:function(e){this.state.value.sortColumn===e&&(this.privateState.reverse=!this.state.value.reverse),this.privateState.sortColumn=e,this.fetchAllSites()}},{key:"previousPage",value:function(){this.privateState.currentPage=this.state.value.currentPage-1,this.fetchAllSites()}},{key:"nextPage",value:function(){this.privateState.currentPage=this.state.value.currentPage+1,this.fetchAllSites()}},{key:"searchSite",value:function(e){this.privateState.searchTerm=e,this.privateState.currentPage=0,this.fetchAllSites()}},{key:"fetchAllSites",value:function(){var e=this;this.fetchAbort&&(this.fetchAbort.abort(),this.fetchAbort=null,this.cancelRefereshInterval()),this.privateState.isLoading=!0,this.privateState.errorLoadingSites=!1;var t={method:"MultiSites.getAllWithGroups",hideMetricsDoc:"1",filter_sort_order:"asc",filter_limit:this.state.value.pageSize,filter_offset:this.currentPagingOffset.value,showColumns:["label","nb_visits","nb_pageviews","visits_evolution","visits_evolution_trend","pageviews_evolution","pageviews_evolution_trend","revenue_evolution","revenue_evolution_trend","nb_actions,revenue"].join(",")};return this.privateState.searchTerm&&(t.pattern=this.privateState.searchTerm),this.privateState.sortColumn&&(t.filter_sort_column=this.privateState.sortColumn),this.privateState.reverse&&(t.filter_sort_order="desc"),this.fetchAbort=new AbortController,o["AjaxHelper"].fetch(t,{abortController:this.fetchAbort}).then((function(t){e.updateWebsitesList(t)})).catch((function(){e.onError()})).finally((function(){e.privateState.isLoading=!1,e.fetchAbort=null,e.state.value.refreshInterval&&e.state.value.refreshInterval>0&&(e.cancelRefereshInterval(),e.refreshTimeout=setTimeout((function(){e.refreshTimeout=null,e.fetchAllSites()}),1e3*e.state.value.refreshInterval))}))}},{key:"onError",value:function(){this.privateState.errorLoadingSites=!0,this.privateState.sites=[]}},{key:"setRefreshInterval",value:function(e){this.privateState.refreshInterval=e}},{key:"setPageSize",value:function(e){this.privateState.pageSize=e}}]),e}(),De=new Ae,xe=Object(i["defineComponent"])({props:{displayRevenueColumn:Boolean,showSparklines:Boolean,dateSparkline:String,pageSize:Number,autoRefreshTodayReport:Number},components:{EnrichedHeadline:o["EnrichedHeadline"],ActivityIndicator:o["ActivityIndicator"],MultisitesSite:G},data:function(){return{evolutionSelector:"visits_evolution",searchTerm:""}},created:function(){this.pageSize&&De.setPageSize(this.pageSize),this.refresh(this.autoRefreshTodayReport)},methods:{refresh:function(e){De.setRefreshInterval(e),De.fetchAllSites()},sortBy:function(e){De.sortBy(e)},previousPage:function(){De.previousPage()},nextPage:function(){De.nextPage()},searchSite:function(){De.searchSite(this.searchTerm)}},computed:{hasSuperUserAccess:function(){return o["Matomo"].hasSuperUserAccess},date:function(){return o["MatomoUrl"].urlParsed.value.date},idSite:function(){return o["MatomoUrl"].urlParsed.value.idSite},url:function(){return o["Matomo"].piwik_url},period:function(){return o["Matomo"].period},areAdsForProfessionalServicesEnabled:function(){return o["Matomo"].config&&o["Matomo"].config.are_ads_enabled},sortColumn:function(){return De.state.value.sortColumn},reverse:function(){return De.state.value.reverse},smallTitleContent:function(){var e=De.state.value;return Object(o["translate"])("General_TotalVisitsPageviewsActionsRevenue","<strong>".concat(e.totalVisits,"</strong>"),"<strong>".concat(e.totalPageviews,"</strong>"),"<strong>".concat(e.totalActions,"</strong>"),"<strong>".concat(e.totalRevenue,"</strong>"))},smallTitleTooltip:function(){var e=De.state.value;return Object(o["translate"])("General_EvolutionSummaryGeneric",Object(o["translate"])("General_NVisits","".concat(e.totalVisits)),this.date,"".concat(e.lastVisits),e.lastVisitsDate,Object(o["getFormattedEvolution"])(e.totalVisits,e.lastVisits))},loadingMessage:function(){return De.state.value.loadingMessage},isLoading:function(){return De.state.value.isLoading},errorLoadingSites:function(){return De.state.value.errorLoadingSites},sites:function(){return De.state.value.sites},numberOfPages:function(){return De.numberOfPages.value},currentPage:function(){return De.state.value.currentPage},paginationLowerBound:function(){return De.paginationLowerBound.value},paginationUpperBound:function(){return De.paginationUpperBound.value},numberOfFilteredSites:function(){return De.numberOfFilteredSites.value},professionalHelpUrl:function(){return"https://matomo.org/support-plans/?pk_campaign=Help&pk_medium=AjaxError&pk_content=MultiSites&pk_source=Matomo_App"},addSiteUrl:function(){return"index.php?module=SitesManager&action=index&showaddsite=1&period=".concat(this.period,"&")+"date=".concat(this.date,"&idSite=").concat(this.idSite)}}});xe.render=Ne;var Ge=xe; /*! * Matomo - free/libre analytics platform * diff --git a/plugins/MultiSites/vue/src/Dashboard/Dashboard.store.ts b/plugins/MultiSites/vue/src/Dashboard/Dashboard.store.ts index 2b9080a00c..36d644e5e7 100644 --- a/plugins/MultiSites/vue/src/Dashboard/Dashboard.store.ts +++ b/plugins/MultiSites/vue/src/Dashboard/Dashboard.store.ts @@ -288,8 +288,7 @@ class DashboardStore { this.privateState.isLoading = true; this.privateState.errorLoadingSites = false; const params: QueryParameters = { - module: 'MultiSites', - action: 'getAllWithGroups', + method: 'MultiSites.getAllWithGroups', hideMetricsDoc: '1', filter_sort_order: 'asc', filter_limit: this.state.value.pageSize, |