diff --git a/dmp-frontend/src/app/core/services/file-transformer/file-transformer.service.ts b/dmp-frontend/src/app/core/services/file-transformer/file-transformer.service.ts index 894d5983f..1fa4d978a 100644 --- a/dmp-frontend/src/app/core/services/file-transformer/file-transformer.service.ts +++ b/dmp-frontend/src/app/core/services/file-transformer/file-transformer.service.ts @@ -89,7 +89,7 @@ export class FileTransformerService extends BaseService { const filename = this.fileUtils.getFilenameFromContentDispositionHeader(result.headers.get('Content-Disposition')); FileSaver.saveAs(blob, filename); - this.analyticsService.trackDownload('dmps', format, id.toString()); + this.analyticsService.trackDownload(AnalyticsService.trackDmp, format, id.toString()); } }, error => this.httpErrorHandlingService.handleBackedRequestError(error)); @@ -118,7 +118,7 @@ export class FileTransformerService extends BaseService { const filename = this.fileUtils.getFilenameFromContentDispositionHeader(result.headers.get('Content-Disposition')); FileSaver.saveAs(blob, filename); - this.analyticsService.trackDownload('descriptions', format, id.toString()); + this.analyticsService.trackDownload(AnalyticsService.trackDescriptions, format, id.toString()); } }, error => this.httpErrorHandlingService.handleBackedRequestError(error)); diff --git a/dmp-frontend/src/app/core/services/matomo/analytics-service.ts b/dmp-frontend/src/app/core/services/matomo/analytics-service.ts index fc1f0b250..befd4c81c 100644 --- a/dmp-frontend/src/app/core/services/matomo/analytics-service.ts +++ b/dmp-frontend/src/app/core/services/matomo/analytics-service.ts @@ -49,7 +49,6 @@ export class AnalyticsService { //#region trackDownload public static trackDmp: string = "dmps" - public static trackDatasets: string = "datasets" public static trackDescriptions: string = "descriptions" //#endregion @@ -81,7 +80,7 @@ export class AnalyticsService { } } - trackDownload(category: "dmps" | "datasets" | "descriptions", type: string, id: string): void { + trackDownload(category: string, type: string, id: string): void { const analytics: AnalyticsProviders = this.configurationService.analyticsProviders; for (let provider of analytics.providers) { diff --git a/dmp-frontend/src/app/core/services/matomo/matomo-service.ts b/dmp-frontend/src/app/core/services/matomo/matomo-service.ts index 6f8ac174c..5921401e7 100644 --- a/dmp-frontend/src/app/core/services/matomo/matomo-service.ts +++ b/dmp-frontend/src/app/core/services/matomo/matomo-service.ts @@ -38,7 +38,7 @@ export class MatomoService { } } - trackDownload(category: "dmps" | "datasets" | "descriptions", type: string, id: string): void { + trackDownload(category: string, type: string, id: string): void { if (this.configurationService.matomoEnabled) { var principalid = this.authService.userId(); if (principalid != null) { this.matomoTracker.setUserId(principalid.toString()); }