From d5d8ac8a1d6ab624384b11b00ded4469c5f64a92 Mon Sep 17 00:00:00 2001 From: sgiehl Date: Tue, 10 Sep 2024 16:01:59 +0200 Subject: [PATCH 1/7] remove unused test files --- ...stomDimensions.getCustomDimension_year.xml | 2 - ...stomDimensions.getCustomDimension_year.xml | 2 - ...stomDimensions.getCustomDimension_year.xml | 9 --- ...stomDimensions.getCustomDimension_year.xml | 6 -- ...stomDimensions.getCustomDimension_year.xml | 9 --- ...stomDimensions.getCustomDimension_year.xml | 2 - ...stomDimensions.getCustomDimension_year.xml | 6 -- ...stomDimensions.getCustomDimension_year.xml | 2 - ...ustomDimensions.getCustomDimension_day.xml | 29 --------- ...ustomDimensions.getCustomDimension_day.xml | 59 ------------------- ...ustomDimensions.getCustomDimension_day.xml | 28 --------- ...ustomDimensions.getCustomDimension_day.xml | 6 -- ...ustomDimensions.getCustomDimension_day.xml | 27 --------- ...ustomDimensions.getCustomDimension_day.xml | 10 ---- ...ustomDimensions.getCustomDimension_day.xml | 6 -- ...ustomDimensions.getCustomDimension_day.xml | 30 ---------- 16 files changed, 233 deletions(-) delete mode 100644 plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_1__CustomDimensions.getCustomDimension_year.xml delete mode 100644 plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_2__CustomDimensions.getCustomDimension_year.xml delete mode 100644 plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_3__CustomDimensions.getCustomDimension_year.xml delete mode 100644 plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_4__CustomDimensions.getCustomDimension_year.xml delete mode 100644 plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_5__CustomDimensions.getCustomDimension_year.xml delete mode 100644 plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_6__CustomDimensions.getCustomDimension_year.xml delete mode 100644 plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_999__CustomDimensions.getCustomDimension_year.xml delete mode 100644 plugins/CustomDimensions/tests/System/expected/test_day_site_2_dimension_1__CustomDimensions.getCustomDimension_year.xml delete mode 100644 plugins/CustomDimensions/tests/System/expected/test_year_site_1_dimension_1__CustomDimensions.getCustomDimension_day.xml delete mode 100644 plugins/CustomDimensions/tests/System/expected/test_year_site_1_dimension_2__CustomDimensions.getCustomDimension_day.xml delete mode 100644 plugins/CustomDimensions/tests/System/expected/test_year_site_1_dimension_3__CustomDimensions.getCustomDimension_day.xml delete mode 100644 plugins/CustomDimensions/tests/System/expected/test_year_site_1_dimension_4__CustomDimensions.getCustomDimension_day.xml delete mode 100644 plugins/CustomDimensions/tests/System/expected/test_year_site_1_dimension_5__CustomDimensions.getCustomDimension_day.xml delete mode 100644 plugins/CustomDimensions/tests/System/expected/test_year_site_1_dimension_6__CustomDimensions.getCustomDimension_day.xml delete mode 100644 plugins/CustomDimensions/tests/System/expected/test_year_site_1_dimension_999__CustomDimensions.getCustomDimension_day.xml delete mode 100644 plugins/CustomDimensions/tests/System/expected/test_year_site_2_dimension_1__CustomDimensions.getCustomDimension_day.xml diff --git a/plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_1__CustomDimensions.getCustomDimension_year.xml b/plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_1__CustomDimensions.getCustomDimension_year.xml deleted file mode 100644 index c234bed59e9..00000000000 --- a/plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_1__CustomDimensions.getCustomDimension_year.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_2__CustomDimensions.getCustomDimension_year.xml b/plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_2__CustomDimensions.getCustomDimension_year.xml deleted file mode 100644 index c234bed59e9..00000000000 --- a/plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_2__CustomDimensions.getCustomDimension_year.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_3__CustomDimensions.getCustomDimension_year.xml b/plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_3__CustomDimensions.getCustomDimension_year.xml deleted file mode 100644 index 87025003f9a..00000000000 --- a/plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_3__CustomDimensions.getCustomDimension_year.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - 1 - 1 - 1 - - \ No newline at end of file diff --git a/plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_4__CustomDimensions.getCustomDimension_year.xml b/plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_4__CustomDimensions.getCustomDimension_year.xml deleted file mode 100644 index 56c15bc1c58..00000000000 --- a/plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_4__CustomDimensions.getCustomDimension_year.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file diff --git a/plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_5__CustomDimensions.getCustomDimension_year.xml b/plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_5__CustomDimensions.getCustomDimension_year.xml deleted file mode 100644 index 893dd725936..00000000000 --- a/plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_5__CustomDimensions.getCustomDimension_year.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - 1 - 1 - 1 - - \ No newline at end of file diff --git a/plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_6__CustomDimensions.getCustomDimension_year.xml b/plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_6__CustomDimensions.getCustomDimension_year.xml deleted file mode 100644 index c234bed59e9..00000000000 --- a/plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_6__CustomDimensions.getCustomDimension_year.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_999__CustomDimensions.getCustomDimension_year.xml b/plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_999__CustomDimensions.getCustomDimension_year.xml deleted file mode 100644 index 7da0ec39062..00000000000 --- a/plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_999__CustomDimensions.getCustomDimension_year.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file diff --git a/plugins/CustomDimensions/tests/System/expected/test_day_site_2_dimension_1__CustomDimensions.getCustomDimension_year.xml b/plugins/CustomDimensions/tests/System/expected/test_day_site_2_dimension_1__CustomDimensions.getCustomDimension_year.xml deleted file mode 100644 index c234bed59e9..00000000000 --- a/plugins/CustomDimensions/tests/System/expected/test_day_site_2_dimension_1__CustomDimensions.getCustomDimension_year.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/plugins/CustomDimensions/tests/System/expected/test_year_site_1_dimension_1__CustomDimensions.getCustomDimension_day.xml b/plugins/CustomDimensions/tests/System/expected/test_year_site_1_dimension_1__CustomDimensions.getCustomDimension_day.xml deleted file mode 100644 index cef8e2fd9f9..00000000000 --- a/plugins/CustomDimensions/tests/System/expected/test_year_site_1_dimension_1__CustomDimensions.getCustomDimension_day.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - 1 - 1 - 0 - 1 - 0 - 1 - - - 1 - 1 - 0 - - - 1 - 0 - - - \ No newline at end of file diff --git a/plugins/CustomDimensions/tests/System/expected/test_year_site_1_dimension_2__CustomDimensions.getCustomDimension_day.xml b/plugins/CustomDimensions/tests/System/expected/test_year_site_1_dimension_2__CustomDimensions.getCustomDimension_day.xml deleted file mode 100644 index fcefbdf3848..00000000000 --- a/plugins/CustomDimensions/tests/System/expected/test_year_site_1_dimension_2__CustomDimensions.getCustomDimension_day.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - 1 - 3 - 0 - 3 - 362 - 0 - 1 - - - - - - - 1 - 1 - 0 - 1 - 0 - 1 - - - 1 - 1 - 0 - - - 1 - 0 - - - - - - 1 - 1 - 0 - 1 - 0 - 1 - - - 1 - 1 - 0 - - - 1 - 0 - - - \ No newline at end of file diff --git a/plugins/CustomDimensions/tests/System/expected/test_year_site_1_dimension_3__CustomDimensions.getCustomDimension_day.xml b/plugins/CustomDimensions/tests/System/expected/test_year_site_1_dimension_3__CustomDimensions.getCustomDimension_day.xml deleted file mode 100644 index 35cfe5670cd..00000000000 --- a/plugins/CustomDimensions/tests/System/expected/test_year_site_1_dimension_3__CustomDimensions.getCustomDimension_day.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - 1 - 2 - - - - - - - 1 - 1 - - - - - - 1 - 1 - - - \ No newline at end of file diff --git a/plugins/CustomDimensions/tests/System/expected/test_year_site_1_dimension_4__CustomDimensions.getCustomDimension_day.xml b/plugins/CustomDimensions/tests/System/expected/test_year_site_1_dimension_4__CustomDimensions.getCustomDimension_day.xml deleted file mode 100644 index 56c15bc1c58..00000000000 --- a/plugins/CustomDimensions/tests/System/expected/test_year_site_1_dimension_4__CustomDimensions.getCustomDimension_day.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file diff --git a/plugins/CustomDimensions/tests/System/expected/test_year_site_1_dimension_5__CustomDimensions.getCustomDimension_day.xml b/plugins/CustomDimensions/tests/System/expected/test_year_site_1_dimension_5__CustomDimensions.getCustomDimension_day.xml deleted file mode 100644 index bc59d926cc1..00000000000 --- a/plugins/CustomDimensions/tests/System/expected/test_year_site_1_dimension_5__CustomDimensions.getCustomDimension_day.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - 1 - 1 - - - - 1 - 1 - - - - - - - - 1 - 1 - - - \ No newline at end of file diff --git a/plugins/CustomDimensions/tests/System/expected/test_year_site_1_dimension_6__CustomDimensions.getCustomDimension_day.xml b/plugins/CustomDimensions/tests/System/expected/test_year_site_1_dimension_6__CustomDimensions.getCustomDimension_day.xml deleted file mode 100644 index eef42f91aaa..00000000000 --- a/plugins/CustomDimensions/tests/System/expected/test_year_site_1_dimension_6__CustomDimensions.getCustomDimension_day.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/plugins/CustomDimensions/tests/System/expected/test_year_site_1_dimension_999__CustomDimensions.getCustomDimension_day.xml b/plugins/CustomDimensions/tests/System/expected/test_year_site_1_dimension_999__CustomDimensions.getCustomDimension_day.xml deleted file mode 100644 index 7da0ec39062..00000000000 --- a/plugins/CustomDimensions/tests/System/expected/test_year_site_1_dimension_999__CustomDimensions.getCustomDimension_day.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file diff --git a/plugins/CustomDimensions/tests/System/expected/test_year_site_2_dimension_1__CustomDimensions.getCustomDimension_day.xml b/plugins/CustomDimensions/tests/System/expected/test_year_site_2_dimension_1__CustomDimensions.getCustomDimension_day.xml deleted file mode 100644 index 2985a9fcdd1..00000000000 --- a/plugins/CustomDimensions/tests/System/expected/test_year_site_2_dimension_1__CustomDimensions.getCustomDimension_day.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - 1 - 2 - 0 - 2 - 721 - 0 - - - 1 - 1 - 2541 - 1 - - - 0 - 0 - - - - - - \ No newline at end of file From 77ceabd21c487ea8f93ba91f0efd382010a337ee Mon Sep 17 00:00:00 2001 From: sgiehl Date: Tue, 10 Sep 2024 16:08:39 +0200 Subject: [PATCH 2/7] Add another action to test fixture, to test unique visitor calculation --- ...TrackVisitsWithCustomDimensionsFixture.php | 4 ++ .../test___Live.getLastVisitsDetails_year.xml | 49 +++++++++---- ...Dimension__API.getProcessedReport_year.xml | 22 +++--- ...Dimension__API.getProcessedReport_year.xml | 14 ++-- ...ustomDimensions.getCustomDimension_day.xml | 10 +-- ...ustomDimensions.getCustomDimension_day.xml | 10 +-- ...ustomDimensions.getCustomDimension_day.xml | 20 +++--- ...ustomDimensions.getCustomDimension_day.xml | 70 +++++++++++++++---- ...ustomDimensions.getCustomDimension_day.xml | 52 ++++++++++++-- ...ustomDimensions.getCustomDimension_day.xml | 6 +- ...ustomDimensions.getCustomDimension_day.xml | 10 +-- ...stomDimensions.getCustomDimension_year.xml | 10 +-- ...stomDimensions.getCustomDimension_year.xml | 10 +-- ...stomDimensions.getCustomDimension_year.xml | 10 +-- ...stomDimensions.getCustomDimension_year.xml | 22 +++--- ...stomDimensions.getCustomDimension_year.xml | 6 +- ...stomDimensions.getCustomDimension_year.xml | 10 +-- 17 files changed, 223 insertions(+), 112 deletions(-) diff --git a/plugins/CustomDimensions/tests/Fixtures/TrackVisitsWithCustomDimensionsFixture.php b/plugins/CustomDimensions/tests/Fixtures/TrackVisitsWithCustomDimensionsFixture.php index 3cd3b60b81a..73ae7a5c457 100644 --- a/plugins/CustomDimensions/tests/Fixtures/TrackVisitsWithCustomDimensionsFixture.php +++ b/plugins/CustomDimensions/tests/Fixtures/TrackVisitsWithCustomDimensionsFixture.php @@ -127,6 +127,10 @@ protected function trackFirstVisit() $t->setUrl('http://example.com/sub_en/page?param=en_US'); self::checkResponse($t->doTrackPageView('Third page view')); + $t->setForceVisitDateTime(Date::factory($this->dateTime)->addHour(0.4)->getDatetime()); + $t->setUrl('http://example.com/sub_en/page?param=en_US'); + self::checkResponse($t->doTrackPageView('Fourth page view')); + $t->setForceVisitDateTime(Date::factory($this->dateTime)->addDay(0.4)->getDatetime()); $t->setUrl('http://example.com/sub_en/page?param=en_US'); self::checkResponse($t->doTrackPageView('Fourth page view')); diff --git a/plugins/CustomDimensions/tests/System/expected/test___Live.getLastVisitsDetails_year.xml b/plugins/CustomDimensions/tests/System/expected/test___Live.getLastVisitsDetails_year.xml index eb9c422dbb7..70e1aeb5e74 100644 --- a/plugins/CustomDimensions/tests/System/expected/test___Live.getLastVisitsDetails_year.xml +++ b/plugins/CustomDimensions/tests/System/expected/test___Live.getLastVisitsDetails_year.xml @@ -14,7 +14,7 @@ 6 - 4 + 5 0 0s @@ -34,7 +34,7 @@ 1 0 - 4 + 5 http://example.com/sub_en/page?param=en_US direct @@ -160,7 +160,7 @@ 6 - 6 + 7 0 0s @@ -180,7 +180,7 @@ 1 0 - 6 + 7 http://example.com/sub_en/page?param=en_US direct @@ -306,7 +306,7 @@ 6 - 5 + 6 0 0s @@ -326,7 +326,7 @@ 1 0 - 5 + 6 http://example.com/sub_en/page?param=en_US direct @@ -516,8 +516,8 @@ 3 - 0 - 0s + 360 + 6 min 0s 3 Third page view http://example.com/sub_en/page?param=en_US @@ -528,6 +528,27 @@ en_US 0 M + + action + http://example.com/sub_en/page?param=en_US + Fourth page view + 6 + + + 4 + + 0 + 0s + 4 + Fourth page view + http://example.com/sub_en/page?param=en_US + + plugins/Morpheus/images/action.svg + + en + en_US + 0 M + 1 USD @@ -555,11 +576,11 @@ 0 0 - 722 - 12 min 2s + 1082 + 18 min 2s 0 - 3 - 3 + 4 + 4 direct Direct Entry @@ -640,7 +661,7 @@ 10 - 9 + 10 0 0s @@ -660,7 +681,7 @@ 1 0 - 9 + 10 http://example.com/sub_en/page direct diff --git a/plugins/CustomDimensions/tests/System/expected/test__actionDimension__API.getProcessedReport_year.xml b/plugins/CustomDimensions/tests/System/expected/test__actionDimension__API.getProcessedReport_year.xml index 465132006be..5821b0340ea 100644 --- a/plugins/CustomDimensions/tests/System/expected/test__actionDimension__API.getProcessedReport_year.xml +++ b/plugins/CustomDimensions/tests/System/expected/test__actionDimension__API.getProcessedReport_year.xml @@ -52,11 +52,11 @@ - 4 - 4 - 75% - 00:01:30 - 75% + 5 + 5 + 60% + 00:01:12 + 80% @@ -71,8 +71,8 @@ 1 1 0% - 00:00:00 - 100% + 00:06:00 + 0% @@ -106,8 +106,8 @@ - 7 - 7 + 8 + 8 0 0 0 @@ -136,9 +136,9 @@ 0 0 0 - 720 + 1080 4 5 - 7 + 8 \ No newline at end of file diff --git a/plugins/CustomDimensions/tests/System/expected/test__visitDimension__API.getProcessedReport_year.xml b/plugins/CustomDimensions/tests/System/expected/test__visitDimension__API.getProcessedReport_year.xml index fc6b92a2d4c..1650103b318 100644 --- a/plugins/CustomDimensions/tests/System/expected/test__visitDimension__API.getProcessedReport_year.xml +++ b/plugins/CustomDimensions/tests/System/expected/test__visitDimension__API.getProcessedReport_year.xml @@ -60,9 +60,9 @@ 1 - 3 - 3 - 00:12:02 + 4 + 4 + 00:18:02 0% @@ -87,9 +87,9 @@ 3 - 5 - 3 - 723 + 6 + 4 + 1083 2 @@ -103,6 +103,6 @@ 0 3 0 - 1.7 + 2 \ No newline at end of file diff --git a/plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_1__CustomDimensions.getCustomDimension_day.xml b/plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_1__CustomDimensions.getCustomDimension_day.xml index 2da750c930f..a787386caff 100644 --- a/plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_1__CustomDimensions.getCustomDimension_day.xml +++ b/plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_1__CustomDimensions.getCustomDimension_day.xml @@ -4,9 +4,9 @@ 1 1 - 3 - 3 - 722 + 4 + 4 + 1082 0 @@ -19,9 +19,9 @@ 1 0 - 722 + 1082 0% - 3 + 4 dimension1==value5+1 diff --git a/plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_2__CustomDimensions.getCustomDimension_day.xml b/plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_2__CustomDimensions.getCustomDimension_day.xml index f28a84fa48d..b0575a055ed 100644 --- a/plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_2__CustomDimensions.getCustomDimension_day.xml +++ b/plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_2__CustomDimensions.getCustomDimension_day.xml @@ -4,15 +4,15 @@ 1 1 - 3 - 3 - 722 + 4 + 4 + 1082 0 - 722 + 1082 0% - 3 + 4 dimension2==en_US diff --git a/plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_3__CustomDimensions.getCustomDimension_day.xml b/plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_3__CustomDimensions.getCustomDimension_day.xml index 548f625345d..067274edcf1 100644 --- a/plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_3__CustomDimensions.getCustomDimension_day.xml +++ b/plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_3__CustomDimensions.getCustomDimension_day.xml @@ -2,9 +2,9 @@ - 1 - 1 - 1 + 2 + 2 + 2 0 0 0 @@ -35,11 +35,11 @@ 360 0 - 0 + 1 - 360 + 180 0% - 0% + 50% dimension3==en @@ -117,13 +117,13 @@ - 0 + 360 0 - 1 + 0 - 0 + 360 0% - 100% + 0% dimension3==value5+3 diff --git a/plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_3_expanded__CustomDimensions.getCustomDimension_day.xml b/plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_3_expanded__CustomDimensions.getCustomDimension_day.xml index 23a9a445b02..906e51f8b4a 100644 --- a/plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_3_expanded__CustomDimensions.getCustomDimension_day.xml +++ b/plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_3_expanded__CustomDimensions.getCustomDimension_day.xml @@ -2,9 +2,9 @@ - 1 - 1 - 1 + 2 + 2 + 2 0 0 0 @@ -35,13 +35,55 @@ 360 0 - 0 + 1 - 360 + 180 0% - 0% + 50% dimension3==en + + + 1 + 1 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + + + + 0 + 0 + 1 + 0 + 0% + 100% + dimension3==en;actionUrl=$example.com%2Fsub_en%2Fpage%3Fparam%3Den_US + example.com%2Fsub_en%2Fpage%3Fparam%3Den_US + 1 @@ -205,13 +247,13 @@ - 0 + 360 0 - 1 + 0 - 0 + 360 0% - 100% + 0% dimension3==value5+3 @@ -247,12 +289,12 @@ - 0 + 360 0 - 1 - 0 + 0 + 360 0% - 100% + 0% dimension3==value5+3;actionUrl=$example.com%2Fsub_en%2Fpage%3Fparam%3Den_US example.com%2Fsub_en%2Fpage%3Fparam%3Den_US diff --git a/plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_3_flat__CustomDimensions.getCustomDimension_day.xml b/plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_3_flat__CustomDimensions.getCustomDimension_day.xml index 9f40f041bce..eda1d4caa67 100644 --- a/plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_3_flat__CustomDimensions.getCustomDimension_day.xml +++ b/plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_3_flat__CustomDimensions.getCustomDimension_day.xml @@ -1,5 +1,49 @@ + + + 1 + 1 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + + + + 0 + 0 + 1 + + 0 + 0% + 100% + dimension3==en;actionUrl=$example.com%2Fsub_en%2Fpage%3Fparam%3Den_US + example.com%2Fsub_en%2Fpage%3Fparam%3Den_US + en - example.com/sub_en/page?param=en_US + 1 @@ -121,13 +165,13 @@ - 0 + 360 0 - 1 + 0 - 0 + 360 0% - 100% + 0% dimension3==value5+3;actionUrl=$example.com%2Fsub_en%2Fpage%3Fparam%3Den_US example.com%2Fsub_en%2Fpage%3Fparam%3Den_US value5 3 - example.com/sub_en/page?param=en_US diff --git a/plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_5__CustomDimensions.getCustomDimension_day.xml b/plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_5__CustomDimensions.getCustomDimension_day.xml index b638f8b1c97..3c380b25049 100644 --- a/plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_5__CustomDimensions.getCustomDimension_day.xml +++ b/plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_5__CustomDimensions.getCustomDimension_day.xml @@ -46,7 +46,7 @@ 1 1 - 1 + 2 0 0 0 @@ -75,11 +75,11 @@ - 0 + 360 0 1 - 0 + 180 0% 100% dimension5==en_US diff --git a/plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_6__CustomDimensions.getCustomDimension_day.xml b/plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_6__CustomDimensions.getCustomDimension_day.xml index 92b1f2d27d0..d0f1cbd49ce 100644 --- a/plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_6__CustomDimensions.getCustomDimension_day.xml +++ b/plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_6__CustomDimensions.getCustomDimension_day.xml @@ -4,9 +4,9 @@ 1 1 - 3 - 3 - 722 + 4 + 4 + 1082 0 @@ -19,9 +19,9 @@ 1 0 - 722 + 1082 0% - 3 + 4 dimension6==value6 \ No newline at end of file diff --git a/plugins/CustomDimensions/tests/System/expected/test_year_site_1_dimension_1__CustomDimensions.getCustomDimension_year.xml b/plugins/CustomDimensions/tests/System/expected/test_year_site_1_dimension_1__CustomDimensions.getCustomDimension_year.xml index 4c7e30e8eed..cf9deaac403 100644 --- a/plugins/CustomDimensions/tests/System/expected/test_year_site_1_dimension_1__CustomDimensions.getCustomDimension_year.xml +++ b/plugins/CustomDimensions/tests/System/expected/test_year_site_1_dimension_1__CustomDimensions.getCustomDimension_year.xml @@ -28,9 +28,9 @@ 1 - 3 - 3 - 722 + 4 + 4 + 1082 0 @@ -45,9 +45,9 @@ 1 0 - 722 + 1082 0% - 3 + 4 dimension1==value5+1 diff --git a/plugins/CustomDimensions/tests/System/expected/test_year_site_1_dimension_1_withsegment__CustomDimensions.getCustomDimension_year.xml b/plugins/CustomDimensions/tests/System/expected/test_year_site_1_dimension_1_withsegment__CustomDimensions.getCustomDimension_year.xml index 6dc7457f3e8..d84674e16a6 100644 --- a/plugins/CustomDimensions/tests/System/expected/test_year_site_1_dimension_1_withsegment__CustomDimensions.getCustomDimension_year.xml +++ b/plugins/CustomDimensions/tests/System/expected/test_year_site_1_dimension_1_withsegment__CustomDimensions.getCustomDimension_year.xml @@ -3,9 +3,9 @@ 1 - 3 - 3 - 722 + 4 + 4 + 1082 0 @@ -20,9 +20,9 @@ 1 0 - 722 + 1082 0% - 3 + 4 dimension1==value5+1 \ No newline at end of file diff --git a/plugins/CustomDimensions/tests/System/expected/test_year_site_1_dimension_2__CustomDimensions.getCustomDimension_year.xml b/plugins/CustomDimensions/tests/System/expected/test_year_site_1_dimension_2__CustomDimensions.getCustomDimension_year.xml index 1bed8053899..f3c2ec7b014 100644 --- a/plugins/CustomDimensions/tests/System/expected/test_year_site_1_dimension_2__CustomDimensions.getCustomDimension_year.xml +++ b/plugins/CustomDimensions/tests/System/expected/test_year_site_1_dimension_2__CustomDimensions.getCustomDimension_year.xml @@ -3,17 +3,17 @@ 1 - 3 - 3 - 722 + 4 + 4 + 1082 0 1 0 - 722 + 1082 0% - 3 + 4 dimension2==en_US diff --git a/plugins/CustomDimensions/tests/System/expected/test_year_site_1_dimension_3__CustomDimensions.getCustomDimension_year.xml b/plugins/CustomDimensions/tests/System/expected/test_year_site_1_dimension_3__CustomDimensions.getCustomDimension_year.xml index 9150e51dda1..8fe294ab47e 100644 --- a/plugins/CustomDimensions/tests/System/expected/test_year_site_1_dimension_3__CustomDimensions.getCustomDimension_year.xml +++ b/plugins/CustomDimensions/tests/System/expected/test_year_site_1_dimension_3__CustomDimensions.getCustomDimension_year.xml @@ -2,8 +2,8 @@ - 4 - 4 + 5 + 5 0 0 0 @@ -34,12 +34,12 @@ 360 3 - 3 - 4 + 4 + 5 - 90 - 75% - 75% + 72 + 60% + 80% dimension3==en @@ -116,14 +116,14 @@ - 0 + 360 0 - 1 + 0 1 - 0 + 360 0% - 100% + 0% dimension3==value5+3 diff --git a/plugins/CustomDimensions/tests/System/expected/test_year_site_1_dimension_5__CustomDimensions.getCustomDimension_year.xml b/plugins/CustomDimensions/tests/System/expected/test_year_site_1_dimension_5__CustomDimensions.getCustomDimension_year.xml index 42a0ed1dbb0..1c5861702c9 100644 --- a/plugins/CustomDimensions/tests/System/expected/test_year_site_1_dimension_5__CustomDimensions.getCustomDimension_year.xml +++ b/plugins/CustomDimensions/tests/System/expected/test_year_site_1_dimension_5__CustomDimensions.getCustomDimension_year.xml @@ -3,7 +3,7 @@ 3 - 3 + 4 0 0 0 @@ -32,12 +32,12 @@ - 0 + 360 2 3 3 - 0 + 90 67% 100% dimension5==en_US diff --git a/plugins/CustomDimensions/tests/System/expected/test_year_site_1_dimension_6__CustomDimensions.getCustomDimension_year.xml b/plugins/CustomDimensions/tests/System/expected/test_year_site_1_dimension_6__CustomDimensions.getCustomDimension_year.xml index 182b8399e01..6f2b379165b 100644 --- a/plugins/CustomDimensions/tests/System/expected/test_year_site_1_dimension_6__CustomDimensions.getCustomDimension_year.xml +++ b/plugins/CustomDimensions/tests/System/expected/test_year_site_1_dimension_6__CustomDimensions.getCustomDimension_year.xml @@ -3,9 +3,9 @@ 1 - 3 - 3 - 722 + 4 + 4 + 1082 0 @@ -20,9 +20,9 @@ 1 0 - 722 + 1082 0% - 3 + 4 dimension6==value6 \ No newline at end of file From 9e9e691d9a2f5ed053abb8133224028f1f8963b8 Mon Sep 17 00:00:00 2001 From: sgiehl Date: Tue, 10 Sep 2024 16:10:51 +0200 Subject: [PATCH 3/7] Separately fetch metrics for custom dimensions --- .../RecordBuilders/CustomDimension.php | 49 ++++++++++++++++--- 1 file changed, 42 insertions(+), 7 deletions(-) diff --git a/plugins/CustomDimensions/RecordBuilders/CustomDimension.php b/plugins/CustomDimensions/RecordBuilders/CustomDimension.php index 8ecccf39f83..a8b829d0a8b 100644 --- a/plugins/CustomDimensions/RecordBuilders/CustomDimension.php +++ b/plugins/CustomDimensions/RecordBuilders/CustomDimension.php @@ -173,13 +173,31 @@ protected function aggregateFromActions(DataTable $report, LogAggregator $logAgg { $metricsConfig = ActionsMetrics::getActionMetrics(); - $resultSet = $this->queryCustomDimensionActions($metricsConfig, $logAggregator, $valueField); - $metricIds = array_keys($metricsConfig); $metricIds[] = Metrics::INDEX_PAGE_SUM_TIME_SPENT; $metricIds[] = Metrics::INDEX_BOUNCE_COUNT; $metricIds[] = Metrics::INDEX_PAGE_EXIT_NB_VISITS; + $resultSet = $this->queryCustomDimensions($metricsConfig, $logAggregator, $valueField); + + while ($row = $resultSet->fetch()) { + if (!isset($row[Metrics::INDEX_NB_VISITS])) { + return; + } + + $label = $row[$valueField]; + $label = $this->cleanCustomDimensionValue($label); + + $columns = ['label' => $label]; + foreach ($metricIds as $id) { + $columns[$id] = (float) ($row[$id] ?? 0); + } + + $tableRow = $report->addRowFromSimpleArray($columns); + } + + $resultSet = $this->queryCustomDimensionActions($metricsConfig, $logAggregator, $valueField); + while ($row = $resultSet->fetch()) { if (!isset($row[Metrics::INDEX_NB_VISITS])) { return; @@ -193,7 +211,7 @@ protected function aggregateFromActions(DataTable $report, LogAggregator $logAgg $columns[$id] = (float) ($row[$id] ?? 0); } - $tableRow = $report->sumRowWithLabel($label, $columns); + $tableRow = $report->getRowFromLabel($label); $url = $row['url']; if (empty($url)) { @@ -212,10 +230,16 @@ protected function aggregateFromActions(DataTable $report, LogAggregator $logAgg } } - public function queryCustomDimensionActions(array $metricsConfig, LogAggregator $logAggregator, $valueField, $additionalWhere = '') + protected function queryCustomDimensions(array $metricsConfig, LogAggregator $logAggregator, $valueField, $additionalDimensions = [], $additionalWhere = '') { + $additionalSelects = ''; + + foreach ($additionalDimensions as $name => $selectField) { + $additionalSelects .= "$selectField as $name,"; + } + $select = "log_link_visit_action.$valueField, - log_action.name as url, + $additionalSelects sum(log_link_visit_action.time_spent) as `" . Metrics::INDEX_PAGE_SUM_TIME_SPENT . "`, sum(case log_visit.visit_total_actions when 1 then 1 when 0 then 1 else 0 end) as `" . Metrics::INDEX_BOUNCE_COUNT . "`, sum(IF(log_visit.last_idlink_va = log_link_visit_action.idlink_va, 1, 0)) as `" . Metrics::INDEX_PAGE_EXIT_NB_VISITS . "`"; @@ -241,7 +265,12 @@ public function queryCustomDimensionActions(array $metricsConfig, LogAggregator $where .= ' AND ' . $additionalWhere; } - $groupBy = "log_link_visit_action.$valueField, url"; + $groupBy = "log_link_visit_action.$valueField"; + + foreach ($additionalDimensions as $name => $selectField) { + $groupBy .= ", $name"; + } + $orderBy = "`" . Metrics::INDEX_PAGE_NB_HITS . "` DESC"; // get query with segmentation @@ -249,7 +278,8 @@ public function queryCustomDimensionActions(array $metricsConfig, LogAggregator if ($this->rankingQueryLimit > 0) { $rankingQuery = new RankingQuery($this->rankingQueryLimit); - $rankingQuery->addLabelColumn([$valueField, 'url']); + + $rankingQuery->addLabelColumn(array_merge([$valueField], array_keys($additionalDimensions))); $sumMetrics = [ Metrics::INDEX_PAGE_SUM_TIME_SPENT, @@ -276,6 +306,11 @@ public function queryCustomDimensionActions(array $metricsConfig, LogAggregator return $resultSet; } + public function queryCustomDimensionActions(array $metricsConfig, LogAggregator $logAggregator, $valueField, $additionalWhere = '') + { + return $this->queryCustomDimensions($metricsConfig, $logAggregator, $valueField, ['url' => 'log_action.name'], $additionalWhere); + } + private function getRankingQueryLimit(): int { $configGeneral = Config::getInstance()->General; From 289fdfb14185833c481f5e2c9c3171eaf8e13056 Mon Sep 17 00:00:00 2001 From: sgiehl Date: Tue, 10 Sep 2024 16:11:38 +0200 Subject: [PATCH 4/7] updates expected test files --- ...t__actionDimension__API.getProcessedReport_year.xml | 10 +++++----- ...sion_3__CustomDimensions.getCustomDimension_day.xml | 6 +++--- ...panded__CustomDimensions.getCustomDimension_day.xml | 6 +++--- ...ion_3__CustomDimensions.getCustomDimension_year.xml | 8 ++++---- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/plugins/CustomDimensions/tests/System/expected/test__actionDimension__API.getProcessedReport_year.xml b/plugins/CustomDimensions/tests/System/expected/test__actionDimension__API.getProcessedReport_year.xml index 5821b0340ea..6d95e9ba68d 100644 --- a/plugins/CustomDimensions/tests/System/expected/test__actionDimension__API.getProcessedReport_year.xml +++ b/plugins/CustomDimensions/tests/System/expected/test__actionDimension__API.getProcessedReport_year.xml @@ -52,11 +52,11 @@ - 5 + 4 5 - 60% + 75% 00:01:12 - 80% + 100% @@ -106,7 +106,7 @@ - 8 + 7 8 0 0 @@ -139,6 +139,6 @@ 1080 4 5 - 8 + 7 \ No newline at end of file diff --git a/plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_3__CustomDimensions.getCustomDimension_day.xml b/plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_3__CustomDimensions.getCustomDimension_day.xml index 067274edcf1..2e03612d6f2 100644 --- a/plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_3__CustomDimensions.getCustomDimension_day.xml +++ b/plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_3__CustomDimensions.getCustomDimension_day.xml @@ -2,8 +2,8 @@ - 2 - 2 + 1 + 1 2 0 0 @@ -39,7 +39,7 @@ 180 0% - 50% + 100% dimension3==en diff --git a/plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_3_expanded__CustomDimensions.getCustomDimension_day.xml b/plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_3_expanded__CustomDimensions.getCustomDimension_day.xml index 906e51f8b4a..1dab3703fc0 100644 --- a/plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_3_expanded__CustomDimensions.getCustomDimension_day.xml +++ b/plugins/CustomDimensions/tests/System/expected/test_day_site_1_dimension_3_expanded__CustomDimensions.getCustomDimension_day.xml @@ -2,8 +2,8 @@ - 2 - 2 + 1 + 1 2 0 0 @@ -39,7 +39,7 @@ 180 0% - 50% + 100% dimension3==en diff --git a/plugins/CustomDimensions/tests/System/expected/test_year_site_1_dimension_3__CustomDimensions.getCustomDimension_year.xml b/plugins/CustomDimensions/tests/System/expected/test_year_site_1_dimension_3__CustomDimensions.getCustomDimension_year.xml index 8fe294ab47e..1a6e6f1fd3f 100644 --- a/plugins/CustomDimensions/tests/System/expected/test_year_site_1_dimension_3__CustomDimensions.getCustomDimension_year.xml +++ b/plugins/CustomDimensions/tests/System/expected/test_year_site_1_dimension_3__CustomDimensions.getCustomDimension_year.xml @@ -2,7 +2,7 @@ - 5 + 4 5 0 0 @@ -35,11 +35,11 @@ 360 3 4 - 5 + 4 72 - 60% - 80% + 75% + 100% dimension3==en From 123651d9f72ff1cccfce0a5243585705588f0245 Mon Sep 17 00:00:00 2001 From: sgiehl Date: Tue, 10 Sep 2024 16:36:29 +0200 Subject: [PATCH 5/7] small code improvements --- plugins/CustomDimensions/RecordBuilders/CustomDimension.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/CustomDimensions/RecordBuilders/CustomDimension.php b/plugins/CustomDimensions/RecordBuilders/CustomDimension.php index a8b829d0a8b..c4b5fb977c1 100644 --- a/plugins/CustomDimensions/RecordBuilders/CustomDimension.php +++ b/plugins/CustomDimensions/RecordBuilders/CustomDimension.php @@ -193,7 +193,7 @@ protected function aggregateFromActions(DataTable $report, LogAggregator $logAgg $columns[$id] = (float) ($row[$id] ?? 0); } - $tableRow = $report->addRowFromSimpleArray($columns); + $report->addRowFromSimpleArray($columns); } $resultSet = $this->queryCustomDimensionActions($metricsConfig, $logAggregator, $valueField); @@ -214,7 +214,7 @@ protected function aggregateFromActions(DataTable $report, LogAggregator $logAgg $tableRow = $report->getRowFromLabel($label); $url = $row['url']; - if (empty($url)) { + if (empty($url) || empty($tableRow)) { continue; } From 5f2100bf1ba93373f4b6b43533cfc563583f06b0 Mon Sep 17 00:00:00 2001 From: sgiehl Date: Wed, 11 Sep 2024 09:23:43 +0200 Subject: [PATCH 6/7] updates expected test files --- ...edReports.generateReport_year.original.pdf | Bin 441441 -> 441440 bytes .../CustomDimensions_report_action.png | 4 +- ...ustomDimensions_report_action_subtable.png | 4 +- ...ns_report_action_subtable_rowevolution.png | 4 +- ..._action_subtable_segmented_visitor_log.png | 4 +- ...ons_report_action_subtable_transitions.png | 4 +- ...omDimensions_report_actions_rowactions.png | 4 +- ...Dimensions_report_actions_rowevolution.png | 4 +- ...ns_report_actions_segmented_visitorlog.png | 4 +- .../CustomDimensions_report_visit.png | 4 +- ...ustomDimensions.getCustomDimension_day.xml | 58 +++--------------- 11 files changed, 27 insertions(+), 67 deletions(-) diff --git a/plugins/CustomDimensions/tests/System/expected/test___ScheduledReports.generateReport_year.original.pdf b/plugins/CustomDimensions/tests/System/expected/test___ScheduledReports.generateReport_year.original.pdf index 1f515fa769cf0dacce28ec083ec16440c9f94674..e0d44fc3f64b00e788d9ff19f3afee7f124aadb6 100644 GIT binary patch delta 3186 zcmZWpXHXN$8oeMOO*%*uf;16@kU|n^H#BKUXo3{!z1N2UGzbKw2?PitUFjepQlte5 zN>dRVy%(j3fRQSw5AXYNpSUyM?9AD7_MGqAnVs7cp4}6!<6y+W)YSpOAwjN=zO2{t z2CNM;-sy4;k3DfxsEpQ%!)gRMvuWb1O0L6gqfRt(j_|NsaRVynd%vdmVBHqU&e%rc z8Uf;E_;CG4tH$nN#c+3%+OH z?u@4aL`g8VvL}(tkm?MGdC0uw-5Y9`QlpFWnmO`}5u04f~AP8>H|n*DMRkhqxGMrJaR+m2}5ORqMBnA2uMI zFhtcKwbRlK(>6R=jpD*9j@%2EY25Zq3_u}Z7Q#UtQk*vz7T?HLOp3o}9`aFCR=Hqk zsv;A)QPn(_dbobw`*O=%kLP{0^5O8sKAGu_D$d(9SDvX8n&fvs+xk}~T!lHIm6W3B zN@F(pLEO)%r57(Z`p0T3Ol0_I#4pmLnhzsnqIcGd?AG*NK68E3`{DaYqEQ7BXXhn3 zq%Py5m|x(*zTI`7*iYcwzOf9%iXXV=%FFoVEZY&x#ZWCn(0Dy3`HIEiJ^E`zUhLoI zFN()+ILr0G@r^YB09%UZmBnTm+Lyo-#%V^2B^-XBAvoHHGpJ_@6fubXY1!qeU+b5L z_zz0-#3p6Fc`*Iy#sw|YD^$z}B|f`c=(hH5sUw<(tSpy!rX6M@AdiK(YOi`;fleKdo%dws5B$c+MT3@ zEnJ^e;GoG%-@A1uchx@ex_Z1mGXjz=tnj~1OKANHN-Rr8tG{((TDa@}Df!2l?;B45 zg|1+v)Tm(}^TEg{!EJ+Qg5;YWa$l@cWH=_G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Tm2O~?P+C7Vh-rs4?_(Di@Q3o_CICRH?^}0zJ>>2z$$=@j2P?@YxC&Dp!xUni|5 zx*b?8tepJPBN6udg6u}Lrj z@S?TaTf^2CxH+BOZ>w$~6x1Gko+Y;}2}hJ0VWgw1J_%?t?;M8%eU2Jf67B!ql#A~Z zzn9mv5IXQ|)`O=-E`R@++ryDt%suGB!KBhmB|i-=LYD>cy8nRyFa^3wEbn=M zdv_@sQ*-atQrTlQ>CDkLVtij>*A|1lSRF8HECH_k;(BhvEus@;EBeMy9-4TbH&G@v z4iBdpxSz-j1~|JLP|Ceb+5=ACy`fnqWW2Jl6;gJ1fvE;pACvfu6~-3g>1RghJ%3tc zGA=m|cFV1Jq)i8j_%}F%Eis)P!geRX{0yJmwU!7&L)6|-zSG>)^Du3VtBN;*w&JOl z{l2rLHtUb-#?z^F;s*0I4I&Bm!X*m{LB|N)M$O(zKM7DHcO$buFg?W?^R2e&qQAF` ztFyNqNM+GDGS->dgr`XB$u=8-v%YoK;&nCt<@TKfm42y|D5W{h@m_!6LXEc%x+|TO zbyh*`iu16A#|0p!JXM;}qv>B&c9B>;VtPW>-;7w^utkwZiKOYW?%vQ2YY9iB;A$K+Ft5(^4h2p1NnvY8 zo_sV%OsQt7nXKJkpTXcU=emJ4(fxvBn)07Y?_o@o=z)|IJR5-&Ku~O=?|1^xsaO3q z*{u#Z44M|)t<@p`xYq-NWY^w<@`ln>dZaSP>@!Rhs1yp6I51!z#NJ|J2R)Zrw&b~@ zzc&=%RF*X)_Ob6a{`h@E1mIAayt8^1@C_^m(4{v29@?Ys%;8@ot_O0E` zc5S+`ox*u$Rk^WQfjb#PpN1}OUfiE)K0MFYQY9PaeG`2oQ||!hz25B3orirL@tJFk zG#7-)EgX2&bYV%Jd)3 F{{e?XgQfrg diff --git a/plugins/CustomDimensions/tests/UI/expected-screenshots/CustomDimensions_report_action.png b/plugins/CustomDimensions/tests/UI/expected-screenshots/CustomDimensions_report_action.png index b310ba15008..17fd216d7fb 100644 --- a/plugins/CustomDimensions/tests/UI/expected-screenshots/CustomDimensions_report_action.png +++ b/plugins/CustomDimensions/tests/UI/expected-screenshots/CustomDimensions_report_action.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ffc39340bb0cd0fbf965ace2cbbd3f693a4fbfec3088e2aee1ab4e1c39ec6ce3 -size 24837 +oid sha256:0407bd7f4f73750434c338b2f1cf3ca3d78e91d0a8a76fce84f95a311a0eafcb +size 25149 diff --git a/plugins/CustomDimensions/tests/UI/expected-screenshots/CustomDimensions_report_action_subtable.png b/plugins/CustomDimensions/tests/UI/expected-screenshots/CustomDimensions_report_action_subtable.png index 5c1a5af68f9..c1ff5c8baaf 100644 --- a/plugins/CustomDimensions/tests/UI/expected-screenshots/CustomDimensions_report_action_subtable.png +++ b/plugins/CustomDimensions/tests/UI/expected-screenshots/CustomDimensions_report_action_subtable.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6232ecb12ca266a5f1a9f6c1cb69ae71179a0cec6e6efacaadd16f647a4823ba -size 52581 +oid sha256:358c7a7de6a58cc3c9b4e69ac9e4960293e7b46bcdd56735b2f45f36d42b00e2 +size 52912 diff --git a/plugins/CustomDimensions/tests/UI/expected-screenshots/CustomDimensions_report_action_subtable_rowevolution.png b/plugins/CustomDimensions/tests/UI/expected-screenshots/CustomDimensions_report_action_subtable_rowevolution.png index 7bb4ccf5ae4..b92fb8d01b5 100644 --- a/plugins/CustomDimensions/tests/UI/expected-screenshots/CustomDimensions_report_action_subtable_rowevolution.png +++ b/plugins/CustomDimensions/tests/UI/expected-screenshots/CustomDimensions_report_action_subtable_rowevolution.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8c0a74cd042a3efd88d241385b6c6d96ba6b40b87c7cafb542b8e693f0991754 -size 78119 +oid sha256:ce05ec7c081397da3edbc12d757f9083e4f3423d42f188c52f260967942b02e6 +size 77288 diff --git a/plugins/CustomDimensions/tests/UI/expected-screenshots/CustomDimensions_report_action_subtable_segmented_visitor_log.png b/plugins/CustomDimensions/tests/UI/expected-screenshots/CustomDimensions_report_action_subtable_segmented_visitor_log.png index 793c2dd2f76..30e6469c028 100644 --- a/plugins/CustomDimensions/tests/UI/expected-screenshots/CustomDimensions_report_action_subtable_segmented_visitor_log.png +++ b/plugins/CustomDimensions/tests/UI/expected-screenshots/CustomDimensions_report_action_subtable_segmented_visitor_log.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7e4d8b556f41edb57d5ebc5221148994575f370f18993398213e632e703a2dd5 -size 84992 +oid sha256:e1926f95d04f671b4f50dd2bb844f2071e7533ecee7ce8589aa11770fce75adb +size 131360 diff --git a/plugins/CustomDimensions/tests/UI/expected-screenshots/CustomDimensions_report_action_subtable_transitions.png b/plugins/CustomDimensions/tests/UI/expected-screenshots/CustomDimensions_report_action_subtable_transitions.png index 5ac9b25463e..13fe3e21eb6 100644 --- a/plugins/CustomDimensions/tests/UI/expected-screenshots/CustomDimensions_report_action_subtable_transitions.png +++ b/plugins/CustomDimensions/tests/UI/expected-screenshots/CustomDimensions_report_action_subtable_transitions.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:04301711b0725f051ca1f2704b8fcdd8f6e54c4e6efcc41bd8b8feb777498d70 -size 48762 +oid sha256:49183582bc47c924578164fbd3dd182821f131fdd88dbf57b4bf16ae6de399a3 +size 53968 diff --git a/plugins/CustomDimensions/tests/UI/expected-screenshots/CustomDimensions_report_actions_rowactions.png b/plugins/CustomDimensions/tests/UI/expected-screenshots/CustomDimensions_report_actions_rowactions.png index 2e450ce740b..076ec319482 100644 --- a/plugins/CustomDimensions/tests/UI/expected-screenshots/CustomDimensions_report_actions_rowactions.png +++ b/plugins/CustomDimensions/tests/UI/expected-screenshots/CustomDimensions_report_actions_rowactions.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8ddd4079f292b793b624adce2147f1b91238d185a0409f877745c416f28db341 -size 28345 +oid sha256:a88415be07bfeb2ab747fb9fb1e192d21991bbb97d55d400038322a16478a8aa +size 28636 diff --git a/plugins/CustomDimensions/tests/UI/expected-screenshots/CustomDimensions_report_actions_rowevolution.png b/plugins/CustomDimensions/tests/UI/expected-screenshots/CustomDimensions_report_actions_rowevolution.png index eeef22f3ca0..3177dd852f1 100644 --- a/plugins/CustomDimensions/tests/UI/expected-screenshots/CustomDimensions_report_actions_rowevolution.png +++ b/plugins/CustomDimensions/tests/UI/expected-screenshots/CustomDimensions_report_actions_rowevolution.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ec586073b672cdd8c219c3f73a60628e5ff87061c60b5683ae525222c15a70c2 -size 68264 +oid sha256:1c3f053cf790636e5b494e98da213902b63b219fe5542a7be3b7e487396c4f3c +size 69344 diff --git a/plugins/CustomDimensions/tests/UI/expected-screenshots/CustomDimensions_report_actions_segmented_visitorlog.png b/plugins/CustomDimensions/tests/UI/expected-screenshots/CustomDimensions_report_actions_segmented_visitorlog.png index 1cca0b51318..8666595075a 100644 --- a/plugins/CustomDimensions/tests/UI/expected-screenshots/CustomDimensions_report_actions_segmented_visitorlog.png +++ b/plugins/CustomDimensions/tests/UI/expected-screenshots/CustomDimensions_report_actions_segmented_visitorlog.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7c320d2cdaad1a8435a3d6f97e8cb7646ef03dfea3b15c786556b06ef2eb2d5c -size 119705 +oid sha256:070e6971fd8dfeaf38e4a5964c2b639e5df939ebd889f89aa49703774da1ca75 +size 126166 diff --git a/plugins/CustomDimensions/tests/UI/expected-screenshots/CustomDimensions_report_visit.png b/plugins/CustomDimensions/tests/UI/expected-screenshots/CustomDimensions_report_visit.png index 4bbd6f23f2d..27647c8b646 100644 --- a/plugins/CustomDimensions/tests/UI/expected-screenshots/CustomDimensions_report_visit.png +++ b/plugins/CustomDimensions/tests/UI/expected-screenshots/CustomDimensions_report_visit.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fbcf8ddfd87d50b8683d7f6cb1d62a5f5f28626daf4482d4c182720ce72fc5b1 -size 19862 +oid sha256:86e77d89e24722d9a53a532fbdc4e998f73bde993b7ad8dc28c7834cc8ba5869 +size 19771 diff --git a/tests/PHPUnit/System/expected/test_reportLimitingdimension_2_rankingQuery__CustomDimensions.getCustomDimension_day.xml b/tests/PHPUnit/System/expected/test_reportLimitingdimension_2_rankingQuery__CustomDimensions.getCustomDimension_day.xml index ecd14db85aa..10c89cde903 100644 --- a/tests/PHPUnit/System/expected/test_reportLimitingdimension_2_rankingQuery__CustomDimensions.getCustomDimension_day.xml +++ b/tests/PHPUnit/System/expected/test_reportLimitingdimension_2_rankingQuery__CustomDimensions.getCustomDimension_day.xml @@ -2,9 +2,9 @@ - 2 - 2 - 2 + 5 + 5 + 5 0 0 0 @@ -81,54 +81,14 @@ 0 - - - - 1 - 1 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - 0 - - - 2 - 2 - 2 + 5 + 5 + 5 0 0 0 @@ -254,9 +214,9 @@ - 96 - 96 - 96 + 90 + 90 + 90 0 0 0 From cd3fde7b706cc84bbf97443d11ab96167bd72d77 Mon Sep 17 00:00:00 2001 From: sgiehl Date: Wed, 11 Sep 2024 16:58:37 +0200 Subject: [PATCH 7/7] code improvement --- plugins/CustomDimensions/RecordBuilders/CustomDimension.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/CustomDimensions/RecordBuilders/CustomDimension.php b/plugins/CustomDimensions/RecordBuilders/CustomDimension.php index c4b5fb977c1..140021e403a 100644 --- a/plugins/CustomDimensions/RecordBuilders/CustomDimension.php +++ b/plugins/CustomDimensions/RecordBuilders/CustomDimension.php @@ -188,12 +188,12 @@ protected function aggregateFromActions(DataTable $report, LogAggregator $logAgg $label = $row[$valueField]; $label = $this->cleanCustomDimensionValue($label); - $columns = ['label' => $label]; + $columns = []; foreach ($metricIds as $id) { $columns[$id] = (float) ($row[$id] ?? 0); } - $report->addRowFromSimpleArray($columns); + $report->sumRowWithLabel($label, $columns); } $resultSet = $this->queryCustomDimensionActions($metricsConfig, $logAggregator, $valueField);