diff --git a/app/frontend/src/app/folder-browser/folder-browser/folder-browser.component.ts b/app/frontend/src/app/folder-browser/folder-browser/folder-browser.component.ts index ecb8a7b..8400952 100644 --- a/app/frontend/src/app/folder-browser/folder-browser/folder-browser.component.ts +++ b/app/frontend/src/app/folder-browser/folder-browser/folder-browser.component.ts @@ -17,7 +17,7 @@ import { AnalyticsService } from 'src/app/infrastructure/services/analytics.serv './folder-browser.component.scss' ] }) -@AnalyticsTracked() +@AnalyticsTracked("FolderBrowserComponent") export class FolderBrowserComponent extends SubscriptionComponent implements OnInit { busy = false; diff --git a/app/frontend/src/app/infrastructure/analytics-tracked.ts b/app/frontend/src/app/infrastructure/analytics-tracked.ts index a3c524d..f283336 100644 --- a/app/frontend/src/app/infrastructure/analytics-tracked.ts +++ b/app/frontend/src/app/infrastructure/analytics-tracked.ts @@ -1,6 +1,6 @@ import { AnalyticsService } from "./services/analytics.service"; -export function AnalyticsTracked(): ClassDecorator { +export function AnalyticsTracked(screen: string): ClassDecorator { return function (constructor: any) { // You can add/remove events for your needs const LIFECYCLE_HOOKS = [ @@ -14,7 +14,7 @@ export function AnalyticsTracked(): ClassDecorator { constructor.prototype[hook] = function (...args) { original && original.apply(this, args); if(this.analytics instanceof AnalyticsService) { - (this.analytics as AnalyticsService).screenView(component); + (this.analytics as AnalyticsService).screenView(screen); } } }); diff --git a/app/frontend/src/app/settings-page/settings-page.component.ts b/app/frontend/src/app/settings-page/settings-page.component.ts index 63444b4..7dd8992 100644 --- a/app/frontend/src/app/settings-page/settings-page.component.ts +++ b/app/frontend/src/app/settings-page/settings-page.component.ts @@ -18,7 +18,7 @@ import { AnalyticsTracked } from '../infrastructure/analytics-tracked'; './settings-page.component.scss' ] }) -@AnalyticsTracked() +@AnalyticsTracked("SettingsPageComponent") export class SettingsPageComponent extends SubscriptionComponent implements OnInit { private requestCounts: any; diff --git a/app/frontend/src/app/tree-view/tree-view/tree-view.component.ts b/app/frontend/src/app/tree-view/tree-view/tree-view.component.ts index 10fee1a..5ef18d7 100644 --- a/app/frontend/src/app/tree-view/tree-view/tree-view.component.ts +++ b/app/frontend/src/app/tree-view/tree-view/tree-view.component.ts @@ -14,7 +14,7 @@ import { AnalyticsService } from 'src/app/infrastructure/services/analytics.serv templateUrl: './tree-view.component.html', styleUrls: ['./tree-view.component.scss'] }) -@AnalyticsTracked() +@AnalyticsTracked("TreeViewComponent") export class TreeViewComponent extends SubscriptionComponent implements OnInit { rootNodes: TreeNode[] = [] diff --git a/app/frontend/src/app/welcome-page/welcome-page.component.ts b/app/frontend/src/app/welcome-page/welcome-page.component.ts index 15c8171..608b4d6 100644 --- a/app/frontend/src/app/welcome-page/welcome-page.component.ts +++ b/app/frontend/src/app/welcome-page/welcome-page.component.ts @@ -17,7 +17,7 @@ import { AnalyticsTracked } from '../infrastructure/analytics-tracked'; './welcome-page.component.scss' ] }) -@AnalyticsTracked() +@AnalyticsTracked("WelcomePageComponent") export class WelcomePageComponent extends SubscriptionComponent implements OnInit { private updateAvailable = false;