diff --git a/tests/System/Commands/MigrateTest.php b/tests/System/Commands/MigrateTest.php
index b1f1890..e337102 100644
--- a/tests/System/Commands/MigrateTest.php
+++ b/tests/System/Commands/MigrateTest.php
@@ -147,6 +147,10 @@ public function testApi($api, $params)
{
FakeAccess::clearAccess(true);
$this->disableArchiving();
+
+ if (['Live.getLastVisitsDetails'] === $api && version_compare(Version::VERSION, '5.2.0-alpha', '<')) {
+ $params['testSuffix'] = '5-2a';
+ }
$this->runApiTests($api, $params);
}
@@ -161,6 +165,10 @@ public function testApi_migrated($api, $params)
$this->disableArchiving();
FakeAccess::clearAccess($superUser = true);
+
+ if (['Live.getLastVisitsDetails'] === $api && version_compare(Version::VERSION, '5.2.0-alpha', '<')) {
+ $params['testSuffix'] = '5-2a';
+ }
try {
$this->runApiTests($api, $params);
} catch (\Exception $e) {
@@ -229,27 +237,12 @@ public function getApiForTesting()
'SitesManager.getSiteFromId',
'Goals.getGoals',
'CustomDimensions.getConfiguredCustomDimensions',
+ 'Live.getLastVisitsDetails',
];
- // This one doesn't play nice with PHP 8 and earlier versions of Matomo. So, only include it for newer versions
- if (version_compare(Version::VERSION, '4.13.0-b1', '>=') || version_compare(PHP_VERSION, '8.0.0', '<')) {
- $apis[] = 'Live.getLastVisitsDetails';
- }
-
$apiToTest = [];
foreach ($apis as $api) {
$testSuffix = '';
- if (in_array($api, [
- 'Actions.getPageUrls',
- 'SitesManager.getSiteFromId',
- 'CustomDimensions.getConfiguredCustomDimensions',
- 'Live.getLastVisitsDetails',
- ])) {
- $testSuffix = version_compare(Version::VERSION, '4.13.0-b1', '<=') ? 'Old' : '';
- }
- if ($api === 'API.get') {
- $testSuffix = version_compare(Version::VERSION, '4.14.2-b1', '<=') ? 'Old' : '';
- }
$api = [$api];
$apiToTest[] = [$api,
[
diff --git a/tests/System/expected/test_5-2a__Live.getLastVisitsDetails_day.xml b/tests/System/expected/test_5-2a__Live.getLastVisitsDetails_day.xml
new file mode 100644
index 0000000..634fa0b
--- /dev/null
+++ b/tests/System/expected/test_5-2a__Live.getLastVisitsDetails_day.xml
@@ -0,0 +1,375 @@
+
+
+
+ 1
+ 2
+ 56.11.55.73
+
+ 3d7de8315a349072
+
+
+ action
+ http://example.com/sub/page
+ Viewing homepage
+
+
+
+ 3
+
+ 721
+ 12 min 1s
+ 1
+ Viewing homepage
+ http://example.com/sub/page
+
+ plugins/Morpheus/images/action.svg
+
+
+ 0 M
+
+
+ search
+
+
+
+
+ 4
+
+ this is a site search query
+
+
+ 2
+ plugins/Morpheus/images/search.png
+ plugins/Morpheus/images/search.svg
+ Site Search
+ this is a site search query
+
+
+ 0 M
+
+
+ ecommerceAbandonedCart
+ 2541
+ 1
+
+
+
+
+ SKU_ID2
+ A durable item
+ Best seller
+ 321
+ 1
+
+ Best seller
+
+
+
+ plugins/Morpheus/images/ecommerceAbandonedCart.png
+ plugins/Morpheus/images/ecommerceAbandonedCart.svg
+ Abandoned Cart
+ $2,541 revenue - 1 items: A durable item)
+
+
+
+
+ 0
+ USD
+ $
+
+
+
+
+ MigrationSite
+
+
+
+
+
+
+
+ new
+
+ 0
+
+ 1
+ abandonedCart
+ plugins/Morpheus/images/ecommerceAbandonedCart.svg
+ 0
+ 0
+ 0
+
+ 721
+ 12 min 1s
+ 1
+ 2
+ 2
+ direct
+ Direct Entry
+
+
+
+
+
+
+
+
+ fr
+ French
+ Desktop
+ plugins/Morpheus/icons/dist/devices/desktop.png
+ Unknown
+ Generic Desktop
+ Windows XP
+ Windows
+ plugins/Morpheus/icons/dist/os/WIN.png
+ WIN
+ XP
+ Gecko
+ Gecko (Firefox)
+ Firefox 3.6
+ Firefox
+ plugins/Morpheus/icons/dist/browsers/FF.png
+ FF
+ 3.6
+ 0
+ 0
+ 0
+ 2541
+ 1
+ 1
+ 0
+ Europe
+ eur
+ France
+ fr
+ plugins/Morpheus/icons/dist/flags/fr.png
+
+
+
+ France
+
+
+ 12:34:06
+ 12
+ 0
+ 0
+ 1024x768
+ cookie, flash, java
+
+
+ plugins/Morpheus/icons/dist/plugins/cookie.png
+ cookie
+
+
+ plugins/Morpheus/icons/dist/plugins/flash.png
+ flash
+
+
+ plugins/Morpheus/icons/dist/plugins/java.png
+ java
+
+
+
+
+
+
+
+ 1
+ 1
+ 156.5.3.2
+
+ e16cf2bbaeea2c88
+
+
+ action
+ http://example.com/
+ Viewing homepage
+
+
+
+ 1
+
+ 360
+ 6 min 0s
+ 1
+ Viewing homepage
+ http://example.com/
+
+ plugins/Morpheus/images/action.svg
+
+
+ 0 M
+
+
+ action
+ http://example.com/sub/page
+ Second page view
+
+
+
+ 2
+
+ 184
+ 3 min 4s
+ 2
+ Second page view
+ http://example.com/sub/page
+
+ plugins/Morpheus/images/action.svg
+
+
+ 0 M
+
+
+ ecommerceOrder
+ TestingOrder
+ 2541
+ 0
+ 0
+ 0
+ 0
+ 33
+
+
+
+
+ SKU_ID
+ Test item!
+ Test & Category
+ 777
+ 33
+
+ Test & Category
+
+
+
+ plugins/Morpheus/images/ecommerceOrder.png
+ plugins/Morpheus/images/ecommerceOrder.svg
+ Ordered (TestingOrder)
+ $2,541 revenue - 33 items: Test item!)
+
+
+
+
+ goal
+ Download Software
+ 1
+
+ 5
+
+
+ http://example.com/sub/page
+ direct
+
+
+ plugins/Morpheus/images/goal.png
+ plugins/Morpheus/images/goal.svg
+ Goal conversion
+ Download Software ($5 revenue)
+
+
+
+
+ 1
+ USD
+ $
+
+
+
+
+ MigrationSite
+
+
+
+
+
+
+
+ new
+
+ 1
+ plugins/Morpheus/images/goal.svg
+ 1
+ ordered
+ plugins/Morpheus/images/ecommerceOrder.svg
+ 0
+ 0
+ 0
+ 0
+ 544
+ 9 min 4s
+ 0
+ 2
+ 2
+ direct
+ Direct Entry
+
+
+
+
+
+
+
+
+ fr
+ French
+ Desktop
+ plugins/Morpheus/icons/dist/devices/desktop.png
+ Unknown
+ Generic Desktop
+ Windows XP
+ Windows
+ plugins/Morpheus/icons/dist/os/WIN.png
+ WIN
+ XP
+ Gecko
+ Gecko (Firefox)
+ Firefox 3.6
+ Firefox
+ plugins/Morpheus/icons/dist/browsers/FF.png
+ FF
+ 3.6
+ 2541
+ 1
+ 33
+ 0
+ 0
+ 0
+ 0
+ Europe
+ eur
+ France
+ fr
+ plugins/Morpheus/icons/dist/flags/fr.png
+
+
+
+ France
+
+
+ 12:34:06
+ 12
+ 0
+ 0
+ 1024x768
+ cookie, flash, java
+
+
+ plugins/Morpheus/icons/dist/plugins/cookie.png
+ cookie
+
+
+ plugins/Morpheus/icons/dist/plugins/flash.png
+ flash
+
+
+ plugins/Morpheus/icons/dist/plugins/java.png
+ java
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/System/expected/test_5-2a__Live.getLastVisitsDetails_year.xml b/tests/System/expected/test_5-2a__Live.getLastVisitsDetails_year.xml
new file mode 100644
index 0000000..634fa0b
--- /dev/null
+++ b/tests/System/expected/test_5-2a__Live.getLastVisitsDetails_year.xml
@@ -0,0 +1,375 @@
+
+
+
+ 1
+ 2
+ 56.11.55.73
+
+ 3d7de8315a349072
+
+
+ action
+ http://example.com/sub/page
+ Viewing homepage
+
+
+
+ 3
+
+ 721
+ 12 min 1s
+ 1
+ Viewing homepage
+ http://example.com/sub/page
+
+ plugins/Morpheus/images/action.svg
+
+
+ 0 M
+
+
+ search
+
+
+
+
+ 4
+
+ this is a site search query
+
+
+ 2
+ plugins/Morpheus/images/search.png
+ plugins/Morpheus/images/search.svg
+ Site Search
+ this is a site search query
+
+
+ 0 M
+
+
+ ecommerceAbandonedCart
+ 2541
+ 1
+
+
+
+
+ SKU_ID2
+ A durable item
+ Best seller
+ 321
+ 1
+
+ Best seller
+
+
+
+ plugins/Morpheus/images/ecommerceAbandonedCart.png
+ plugins/Morpheus/images/ecommerceAbandonedCart.svg
+ Abandoned Cart
+ $2,541 revenue - 1 items: A durable item)
+
+
+
+
+ 0
+ USD
+ $
+
+
+
+
+ MigrationSite
+
+
+
+
+
+
+
+ new
+
+ 0
+
+ 1
+ abandonedCart
+ plugins/Morpheus/images/ecommerceAbandonedCart.svg
+ 0
+ 0
+ 0
+
+ 721
+ 12 min 1s
+ 1
+ 2
+ 2
+ direct
+ Direct Entry
+
+
+
+
+
+
+
+
+ fr
+ French
+ Desktop
+ plugins/Morpheus/icons/dist/devices/desktop.png
+ Unknown
+ Generic Desktop
+ Windows XP
+ Windows
+ plugins/Morpheus/icons/dist/os/WIN.png
+ WIN
+ XP
+ Gecko
+ Gecko (Firefox)
+ Firefox 3.6
+ Firefox
+ plugins/Morpheus/icons/dist/browsers/FF.png
+ FF
+ 3.6
+ 0
+ 0
+ 0
+ 2541
+ 1
+ 1
+ 0
+ Europe
+ eur
+ France
+ fr
+ plugins/Morpheus/icons/dist/flags/fr.png
+
+
+
+ France
+
+
+ 12:34:06
+ 12
+ 0
+ 0
+ 1024x768
+ cookie, flash, java
+
+
+ plugins/Morpheus/icons/dist/plugins/cookie.png
+ cookie
+
+
+ plugins/Morpheus/icons/dist/plugins/flash.png
+ flash
+
+
+ plugins/Morpheus/icons/dist/plugins/java.png
+ java
+
+
+
+
+
+
+
+ 1
+ 1
+ 156.5.3.2
+
+ e16cf2bbaeea2c88
+
+
+ action
+ http://example.com/
+ Viewing homepage
+
+
+
+ 1
+
+ 360
+ 6 min 0s
+ 1
+ Viewing homepage
+ http://example.com/
+
+ plugins/Morpheus/images/action.svg
+
+
+ 0 M
+
+
+ action
+ http://example.com/sub/page
+ Second page view
+
+
+
+ 2
+
+ 184
+ 3 min 4s
+ 2
+ Second page view
+ http://example.com/sub/page
+
+ plugins/Morpheus/images/action.svg
+
+
+ 0 M
+
+
+ ecommerceOrder
+ TestingOrder
+ 2541
+ 0
+ 0
+ 0
+ 0
+ 33
+
+
+
+
+ SKU_ID
+ Test item!
+ Test & Category
+ 777
+ 33
+
+ Test & Category
+
+
+
+ plugins/Morpheus/images/ecommerceOrder.png
+ plugins/Morpheus/images/ecommerceOrder.svg
+ Ordered (TestingOrder)
+ $2,541 revenue - 33 items: Test item!)
+
+
+
+
+ goal
+ Download Software
+ 1
+
+ 5
+
+
+ http://example.com/sub/page
+ direct
+
+
+ plugins/Morpheus/images/goal.png
+ plugins/Morpheus/images/goal.svg
+ Goal conversion
+ Download Software ($5 revenue)
+
+
+
+
+ 1
+ USD
+ $
+
+
+
+
+ MigrationSite
+
+
+
+
+
+
+
+ new
+
+ 1
+ plugins/Morpheus/images/goal.svg
+ 1
+ ordered
+ plugins/Morpheus/images/ecommerceOrder.svg
+ 0
+ 0
+ 0
+ 0
+ 544
+ 9 min 4s
+ 0
+ 2
+ 2
+ direct
+ Direct Entry
+
+
+
+
+
+
+
+
+ fr
+ French
+ Desktop
+ plugins/Morpheus/icons/dist/devices/desktop.png
+ Unknown
+ Generic Desktop
+ Windows XP
+ Windows
+ plugins/Morpheus/icons/dist/os/WIN.png
+ WIN
+ XP
+ Gecko
+ Gecko (Firefox)
+ Firefox 3.6
+ Firefox
+ plugins/Morpheus/icons/dist/browsers/FF.png
+ FF
+ 3.6
+ 2541
+ 1
+ 33
+ 0
+ 0
+ 0
+ 0
+ Europe
+ eur
+ France
+ fr
+ plugins/Morpheus/icons/dist/flags/fr.png
+
+
+
+ France
+
+
+ 12:34:06
+ 12
+ 0
+ 0
+ 1024x768
+ cookie, flash, java
+
+
+ plugins/Morpheus/icons/dist/plugins/cookie.png
+ cookie
+
+
+ plugins/Morpheus/icons/dist/plugins/flash.png
+ flash
+
+
+ plugins/Morpheus/icons/dist/plugins/java.png
+ java
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/System/expected/test___Live.getLastVisitsDetails_day.xml b/tests/System/expected/test___Live.getLastVisitsDetails_day.xml
index 634fa0b..577d94f 100644
--- a/tests/System/expected/test___Live.getLastVisitsDetails_day.xml
+++ b/tests/System/expected/test___Live.getLastVisitsDetails_day.xml
@@ -51,8 +51,11 @@
ecommerceAbandonedCart
2541
1
-
-
+
+
+ direct
+
+
SKU_ID2
@@ -230,8 +233,11 @@
0
0
33
-
-
+
+
+ direct
+
+
SKU_ID
diff --git a/tests/System/expected/test___Live.getLastVisitsDetails_year.xml b/tests/System/expected/test___Live.getLastVisitsDetails_year.xml
index 634fa0b..577d94f 100644
--- a/tests/System/expected/test___Live.getLastVisitsDetails_year.xml
+++ b/tests/System/expected/test___Live.getLastVisitsDetails_year.xml
@@ -51,8 +51,11 @@
ecommerceAbandonedCart
2541
1
-
-
+
+
+ direct
+
+
SKU_ID2
@@ -230,8 +233,11 @@
0
0
33
-
-
+
+
+ direct
+
+
SKU_ID