From ae8e0f9ae8ea6f986a3853107f4d4179436dcbf8 Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Sat, 17 Feb 2024 19:45:00 +0100 Subject: [PATCH] 110889: Fixed searchevents request containing the query params in the clickedObject Also fixed minor CSS issue in mobile mode where sidebar is still visible (cherry picked from commit cbe3f2f8f5f0f31ae1aa7880f412b21830fcffd3) --- src/app/shared/sidebar/page-with-sidebar.component.html | 4 +++- src/app/statistics/angulartics/dspace-provider.ts | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/app/shared/sidebar/page-with-sidebar.component.html b/src/app/shared/sidebar/page-with-sidebar.component.html index 9feb6c792ef..75f40ef8d63 100644 --- a/src/app/shared/sidebar/page-with-sidebar.component.html +++ b/src/app/shared/sidebar/page-with-sidebar.component.html @@ -3,10 +3,12 @@
-
+
diff --git a/src/app/statistics/angulartics/dspace-provider.ts b/src/app/statistics/angulartics/dspace-provider.ts index 86c16b5c011..957b09a0c8a 100644 --- a/src/app/statistics/angulartics/dspace-provider.ts +++ b/src/app/statistics/angulartics/dspace-provider.ts @@ -1,5 +1,5 @@ import { Injectable } from '@angular/core'; -import { Angulartics2 } from 'angulartics2'; +import { Angulartics2, EventTrack } from 'angulartics2'; import { StatisticsService } from '../statistics.service'; /** @@ -23,7 +23,7 @@ export class Angulartics2DSpace { .subscribe((event) => this.eventTrack(event)); } - private eventTrack(event) { + private eventTrack(event: Partial): void { if (event.action === 'page_view') { this.statisticsService.trackViewEvent(event.properties.object, event.properties.referrer); } else if (event.action === 'search') { @@ -32,7 +32,7 @@ export class Angulartics2DSpace { event.properties.page, event.properties.sort, event.properties.filters, - event.properties.clickedObject, + event.properties.clickedObject?.split('?')[0], ); } }