trackPageView using analytics service instead of calling directly matomo service

This commit is contained in:
Sofia Papacharalampous 2024-05-28 17:56:56 +03:00
parent d90d3450f8
commit 65cfffaa2b
43 changed files with 198 additions and 142 deletions

View File

@ -7,6 +7,43 @@ import { AnalyticsProviderType, AnalyticsProviders } from "@app/core/model/confi
export class AnalyticsService {
public static Dashboard: string = 'Home Dashboard';
public static About: string = 'About';
public static DescriptionTemplateEditor: string = 'Admin: DMP Blueprints';
public static DescriptionTemplateListing: string = 'Admin: DMP Templates';
public static DmpBlueprintEditor: string = 'Admin: DMP Blueprints';
public static DmpBlueprintListing: string = 'Admin: DMP Templates';
public static LanguagesEditor: string = 'Admin: Languages';
public static PrefillingSourcesEditor: string = 'Admin: PrefillingSources';
public static ReferencesEditor: string = 'Admin: References';
public static TenantsEditor: string = 'Admin: Tenants';
public static TenantConfigurationsColorsEditor: string = 'Admin: TenantConfigurations';
public static TenantConfigurationsUserLocaleEditor: string = 'Admin: TenantConfigurations';
public static DepositEditor: string = 'Admin: TenantConfigurations';
public static FileTransformerEditor: string = 'Admin: TenantConfigurations';
public static LogoEditor: string = 'Admin: TenantConfigurations';
public static ContactContent: string = 'Contact Content';
public static RecentEditedActivity: string = 'Recent DMP Activity';
public static DescriptionEditor: string = 'Description Editor';
public static DescriptionListing: string = 'Descriptions';
public static DatasetCriteriaDialog: string = 'Dataset Criteria';
public static DescriptionListingItem: string = 'Description Listing Item';
public static DescriptionOverview: string = 'Description Overview';
public static DmpEditor: string = 'DMP Editor';
public static DmpListing: string = 'DMPs';
public static DmpCriteriaDialog: string = 'DMP Criteria';
public static DmpListingItem: string = 'DMP Listing Item';
public static StartNewDmpDialog: string = 'Start New DMP Dialog';
public static DmpUploadDialog: string = 'DMP Upload Dialog';
public static DmpOverview: string = 'DMP Overview';
public static FAQ: string = 'FAQ';
public static Glossary: string = 'Glossary';
public static Navbar: string = 'Navbar';
public static Sidebar: string = 'Sidebar';
public static SidebarFooter: string = 'Sidebar Footer';
public static Terms: string = 'Terms of Service';
public static UserGuideContent: string = 'User Guide Content';
public static UserProfile: string = 'User Profile';
public static NotificationTempplateEditor: string = 'Admin: Notification Tempplates';
constructor(
private configurationService: ConfigurationService,

View File

@ -3,7 +3,7 @@ import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';
import { Router } from '@angular/router';
import { SupportiveMaterialFieldType } from '@app/core/common/enum/supportive-material-field-type';
import { LanguageService } from '@app/core/services/language/language.service';
import { MatomoService } from '@app/core/services/matomo/matomo-service';
import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
import { SupportiveMaterialService } from '@app/core/services/supportive-material/supportive-material.service';
import { BaseComponent } from '@common/base/base.component';
import { TranslateService, LangChangeEvent } from '@ngx-translate/core';
@ -23,13 +23,13 @@ export class AboutComponent extends BaseComponent implements OnInit {
private supportiveMaterialService: SupportiveMaterialService,
private sanitizer: DomSanitizer,
private languageService: LanguageService,
private matomoService: MatomoService,
private translate: TranslateService,
private router: Router,
private analyticsService: AnalyticsService
) { super(); }
ngOnInit() {
this.matomoService.trackPageView('About');
this.analyticsService.trackPageView(AnalyticsService.About);
this.translate.onLangChange.subscribe((event: LangChangeEvent) => {
this.router.navigate(['/reload'], { skipLocationChange: true }).then(() => this.router.navigate(['/about']));
});

View File

@ -22,7 +22,6 @@ import { LanguageInfoService } from '@app/core/services/culture/language-info-se
import { DescriptionTemplateTypeService } from '@app/core/services/description-template-type/description-template-type.service';
import { DescriptionTemplateService } from '@app/core/services/description-template/description-template.service';
import { LoggingService } from '@app/core/services/logging/logging-service';
import { MatomoService } from '@app/core/services/matomo/matomo-service';
import { UserService } from '@app/core/services/user/user.service';
import { FileUtils } from '@app/core/services/utilities/file-utils.service';
import { QueryParamsService } from '@app/core/services/utilities/query-params.service';
@ -45,6 +44,7 @@ import { LockTargetType } from '@app/core/common/enum/lock-target-type';
import { Title } from '@angular/platform-browser';
import { SingleAutoCompleteConfiguration } from '@app/library/auto-complete/single/single-auto-complete-configuration';
import { DescriptionTemplateTypeStatus } from '@app/core/common/enum/description-template-type-status';
import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
@Component({
@ -138,10 +138,10 @@ export class DescriptionTemplateEditorComponent extends BaseEditor<DescriptionTe
private logger: LoggingService,
private descriptionTemplateEditorService: DescriptionTemplateEditorService,
private fileUtils: FileUtils,
private matomoService: MatomoService,
private languageInfoService: LanguageInfoService,
public userService: UserService,
public titleService: Title
public titleService: Title,
private analyticsService: AnalyticsService
) {
const descriptionLabel:string = route.snapshot.data['entity']?.label;
if (descriptionLabel) {
@ -153,7 +153,7 @@ export class DescriptionTemplateEditorComponent extends BaseEditor<DescriptionTe
}
ngOnInit(): void {
this.matomoService.trackPageView('Admin: DMP Blueprints');
this.analyticsService.trackPageView(AnalyticsService.DescriptionTemplateEditor);
super.ngOnInit();
this.singleAutocompleteDescriptionTemplateTypeConfiguration = this.descriptionTemplateTypeService.getSingleAutocompleteConfiguration([DescriptionTemplateTypeStatus.Finalized]);
this.initModelFlags(this.route.snapshot.data['action']);

View File

@ -5,7 +5,6 @@ import { ActivatedRoute, Router } from '@angular/router';
import { IsActive } from '@app/core/common/enum/is-active.enum';
import { DescriptionTemplate } from '@app/core/model/description-template/description-template';
import { AuthService } from '@app/core/services/auth/auth.service';
import { MatomoService } from '@app/core/services/matomo/matomo-service';
import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/services/notification/ui-notification-service';
import { EnumUtils } from '@app/core/services/utilities/enum-utils.service';
import { FileUtils } from '@app/core/services/utilities/file-utils.service';
@ -30,6 +29,7 @@ import { DescriptionTemplateLookup } from '@app/core/query/description-template.
import { IsActiveTypePipe } from '@common/formatting/pipes/is-active-type.pipe';
import { DescriptionTemplateVersionStatus } from '@app/core/common/enum/description-template-version-status';
import { SumarizeTextPipe } from '@app/core/pipes/sumarize-text.pipe';
import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
@Component({
@ -72,13 +72,13 @@ export class DescriptionTemplateListingComponent extends BaseListingComponent<De
protected queryParamsService: QueryParamsService,
private descriptionTemplateService: DescriptionTemplateService,
public authService: AuthService,
private matomoService: MatomoService,
private pipeService: PipeService,
public enumUtils: EnumUtils,
private language: TranslateService,
private dialog: MatDialog,
private fileUtils: FileUtils,
private sumarizeTextPipe: SumarizeTextPipe
private sumarizeTextPipe: SumarizeTextPipe,
private analyticsService: AnalyticsService
) {
super(router, route, uiNotificationService, httpErrorHandlingService, queryParamsService);
// Lookup setup
@ -88,7 +88,7 @@ export class DescriptionTemplateListingComponent extends BaseListingComponent<De
}
ngOnInit() {
this.matomoService.trackPageView('Admin: DMP Templates');
this.analyticsService.trackPageView(AnalyticsService.DescriptionTemplateListing);
super.ngOnInit();
}

View File

@ -24,7 +24,6 @@ import { ConfigurationService } from '@app/core/services/configuration/configura
import { DescriptionTemplateService } from '@app/core/services/description-template/description-template.service';
import { LockService } from '@app/core/services/lock/lock.service';
import { LoggingService } from '@app/core/services/logging/logging-service';
import { MatomoService } from '@app/core/services/matomo/matomo-service';
import { PrefillingSourceService } from '@app/core/services/prefilling-source/prefilling-source.service';
import { ReferenceTypeService } from '@app/core/services/reference-type/reference-type.service';
import { SemanticsService } from '@app/core/services/semantic/semantics.service';
@ -47,6 +46,7 @@ import { DmpBlueprintEditorResolver } from './dmp-blueprint-editor.resolver';
import { DmpBlueprintEditorService } from './dmp-blueprint-editor.service';
import { DmpBlueprintVersionStatus } from '@app/core/common/enum/dmp-blueprint-version-status';
import { Title } from '@angular/platform-browser';
import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
@Component({
@ -131,12 +131,12 @@ export class DmpBlueprintEditorComponent extends BaseEditor<DmpBlueprintEditorMo
private logger: LoggingService,
private dmpBlueprintEditorService: DmpBlueprintEditorService,
private fileUtils: FileUtils,
private matomoService: MatomoService,
public descriptionTemplateService: DescriptionTemplateService,
public referenceTypeService: ReferenceTypeService,
public semanticsService: SemanticsService,
public prefillingSourceService: PrefillingSourceService,
public titleService: Title
public titleService: Title,
private analyticsService: AnalyticsService
) {
const descriptionLabel:string = route.snapshot.data['entity']?.label;
if (descriptionLabel) {
@ -148,7 +148,7 @@ export class DmpBlueprintEditorComponent extends BaseEditor<DmpBlueprintEditorMo
}
ngOnInit(): void {
this.matomoService.trackPageView('Admin: DMP Blueprints');
this.analyticsService.trackPageView(AnalyticsService.DmpBlueprintEditor);
this.initModelFlags(this.route.snapshot.data['action']);
super.ngOnInit();
this.route.data.subscribe(d => {

View File

@ -8,7 +8,6 @@ import { DmpBlueprint } from '@app/core/model/dmp-blueprint/dmp-blueprint';
import { DmpBlueprintLookup } from '@app/core/query/dmp-blueprint.lookup';
import { AuthService } from '@app/core/services/auth/auth.service';
import { DmpBlueprintService } from '@app/core/services/dmp/dmp-blueprint.service';
import { MatomoService } from '@app/core/services/matomo/matomo-service';
import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/services/notification/ui-notification-service';
import { EnumUtils } from '@app/core/services/utilities/enum-utils.service';
import { FileUtils } from '@app/core/services/utilities/file-utils.service';
@ -29,6 +28,7 @@ import { nameof } from 'ts-simple-nameof';
import { ImportDmpBlueprintDialogComponent } from './import-dmp-blueprint/import-dmp-blueprint.dialog.component';
import { IsActiveTypePipe } from '@common/formatting/pipes/is-active-type.pipe';
import { DmpBlueprintVersionStatus } from '@app/core/common/enum/dmp-blueprint-version-status';
import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
@Component({
@ -70,12 +70,12 @@ export class DmpBlueprintListingComponent extends BaseListingComponent<DmpBluepr
protected queryParamsService: QueryParamsService,
private dmpBlueprintService: DmpBlueprintService,
public authService: AuthService,
private matomoService: MatomoService,
private pipeService: PipeService,
public enumUtils: EnumUtils,
private language: TranslateService,
private dialog: MatDialog,
private fileUtils: FileUtils
private fileUtils: FileUtils,
private analyticsService: AnalyticsService
) {
super(router, route, uiNotificationService, httpErrorHandlingService, queryParamsService);
// Lookup setup
@ -85,7 +85,7 @@ export class DmpBlueprintListingComponent extends BaseListingComponent<DmpBluepr
}
ngOnInit() {
this.matomoService.trackPageView('Admin: DMP Templates');
this.analyticsService.trackPageView(AnalyticsService.DmpBlueprintListing);
super.ngOnInit();
}

View File

@ -12,7 +12,6 @@ import { AppPermission } from '@app/core/common/enum/permission.enum';
import { Language, LanguagePersist } from '@app/core/model/language/language';
import { AuthService } from '@app/core/services/auth/auth.service';
import { LoggingService } from '@app/core/services/logging/logging-service';
import { MatomoService } from '@app/core/services/matomo/matomo-service';
import { FileUtils } from '@app/core/services/utilities/file-utils.service';
import { QueryParamsService } from '@app/core/services/utilities/query-params.service';
import { MultipleAutoCompleteConfiguration } from '@app/library/auto-complete/multiple/multiple-auto-complete-configuration';
@ -32,6 +31,7 @@ import { MatCheckboxChange } from '@angular/material/checkbox';
import { ConfigurationService } from '@app/core/services/configuration/configuration.service';
import { LockService } from '@app/core/services/lock/lock.service';
import { Title } from '@angular/platform-browser';
import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
@Component({
@ -87,8 +87,8 @@ export class LanguageEditorComponent extends BaseEditor<LanguageEditorModel, Lan
private logger: LoggingService,
private languageEditorService: LanguageEditorService,
private fileUtils: FileUtils,
private matomoService: MatomoService,
private titleService: Title
private titleService: Title,
private analyticsService: AnalyticsService
) {
const descriptionLabel:string = route.snapshot.data['entity']?.code;
if (descriptionLabel) {
@ -100,7 +100,7 @@ export class LanguageEditorComponent extends BaseEditor<LanguageEditorModel, Lan
}
ngOnInit(): void {
this.matomoService.trackPageView('Admin: Languages');
this.analyticsService.trackPageView(AnalyticsService.LanguagesEditor);
super.ngOnInit();
this.languageHttpService.queryAvailableCodes(this.languageHttpService.buildAutocompleteLookup())
.pipe(takeUntil(this._destroyed))

View File

@ -13,7 +13,6 @@ import { AppPermission } from '@app/core/common/enum/permission.enum';
import { PrefillingSource, PrefillingSourcePersist } from '@app/core/model/prefilling-source/prefilling-source';
import { AuthService } from '@app/core/services/auth/auth.service';
import { LoggingService } from '@app/core/services/logging/logging-service';
import { MatomoService } from '@app/core/services/matomo/matomo-service';
import { QueryParamsService } from '@app/core/services/utilities/query-params.service';
import { BaseEditor } from '@common/base/base-editor';
import { FormService } from '@common/forms/form-service';
@ -31,6 +30,7 @@ import { MatCheckboxChange } from '@angular/material/checkbox';
import { ConfigurationService } from '@app/core/services/configuration/configuration.service';
import { LockService } from '@app/core/services/lock/lock.service';
import { Title } from '@angular/platform-browser';
import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
@Component({
selector: 'app-prefilling-source-editor-component',
@ -77,8 +77,8 @@ export class PrefillingSourceEditorComponent extends BaseEditor<PrefillingSource
private prefillingSourceService: PrefillingSourceService,
private logger: LoggingService,
private prefillingSourceEditorService: PrefillingSourceEditorService,
private matomoService: MatomoService,
private titleService: Title
private titleService: Title,
private analyticsService: AnalyticsService
) {
const descriptionLabel:string = route.snapshot.data['entity']?.label;
if (descriptionLabel) {
@ -90,7 +90,7 @@ export class PrefillingSourceEditorComponent extends BaseEditor<PrefillingSource
}
ngOnInit(): void {
this.matomoService.trackPageView('Admin: PrefillingSources');
this.analyticsService.trackPageView(AnalyticsService.PrefillingSourcesEditor);
super.ngOnInit();
}

View File

@ -15,7 +15,6 @@ import { ReferenceSourceType } from '@app/core/common/enum/reference-source-type
import { Reference, ReferencePersist } from '@app/core/model/reference/reference';
import { AuthService } from '@app/core/services/auth/auth.service';
import { LoggingService } from '@app/core/services/logging/logging-service';
import { MatomoService } from '@app/core/services/matomo/matomo-service';
import { ReferenceTypeService } from '@app/core/services/reference-type/reference-type.service';
import { FileUtils } from '@app/core/services/utilities/file-utils.service';
import { QueryParamsService } from '@app/core/services/utilities/query-params.service';
@ -33,6 +32,7 @@ import { ReferenceEditorService } from './reference-editor.service';
import { LockService } from '@app/core/services/lock/lock.service';
import { ConfigurationService } from '@app/core/services/configuration/configuration.service';
import { Title } from '@angular/platform-browser';
import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
@Component({
@ -88,9 +88,9 @@ export class ReferenceEditorComponent extends BaseEditor<ReferenceEditorModel, R
private logger: LoggingService,
private referenceEditorService: ReferenceEditorService,
private fileUtils: FileUtils,
private matomoService: MatomoService,
public referenceTypeService: ReferenceTypeService,
public titleService: Title
public titleService: Title,
private analyticsService: AnalyticsService
) {
const descriptionLabel:string = route.snapshot.data['entity']?.label;
@ -103,7 +103,7 @@ export class ReferenceEditorComponent extends BaseEditor<ReferenceEditorModel, R
}
ngOnInit(): void {
this.matomoService.trackPageView('Admin: References');
this.analyticsService.trackPageView(AnalyticsService.ReferencesEditor);
super.ngOnInit();
}

View File

@ -5,7 +5,6 @@ import { MatDialog } from '@angular/material/dialog';
import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/services/notification/ui-notification-service';
import { AppPermission } from '@app/core/common/enum/permission.enum';
import { AuthService } from '@app/core/services/auth/auth.service';
import { MatomoService } from '@app/core/services/matomo/matomo-service';
import { FormService } from '@common/forms/form-service';
import { ConfirmationDialogComponent } from '@common/modules/confirmation-dialog/confirmation-dialog.component';
import { HttpError, HttpErrorHandlingService } from '@common/modules/errors/error-handling/http-error-handling.service';
@ -22,6 +21,7 @@ import { TenantConfigurationType } from '@app/core/common/enum/tenant-configurat
import { HttpErrorResponse } from '@angular/common/http';
import { ResponseErrorCode } from '@app/core/common/enum/respone-error-code';
import { LoggingService } from '@app/core/services/logging/logging-service';
import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
@Component({
@ -61,7 +61,7 @@ export class CssColorsEditorComponent extends BasePendingChangesComponent implem
private logger: LoggingService,
private tenantConfigurationService: TenantConfigurationService,
private cssColorsEditorService: CssColorsEditorService,
private matomoService: MatomoService
private analyticsService: AnalyticsService
) {
super();
}
@ -71,7 +71,7 @@ export class CssColorsEditorComponent extends BasePendingChangesComponent implem
}
ngOnInit(): void {
this.matomoService.trackPageView('Admin: TenantConfigurations');
this.analyticsService.trackPageView(AnalyticsService.TenantConfigurationsColorsEditor);
this.getItem((entity) => {
this.prepareForm(entity);
if (this.formGroup && this.editorModel.belongsToCurrentTenant == false) {

View File

@ -6,7 +6,6 @@ import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/serv
// import { BreadcrumbItem } from '@app/ui/misc/breadcrumb/definition/breadcrumb-item';
import { AppPermission } from '@app/core/common/enum/permission.enum';
import { AuthService } from '@app/core/services/auth/auth.service';
import { MatomoService } from '@app/core/services/matomo/matomo-service';
import { FormService } from '@common/forms/form-service';
import { ConfirmationDialogComponent } from '@common/modules/confirmation-dialog/confirmation-dialog.component';
import { HttpError, HttpErrorHandlingService } from '@common/modules/errors/error-handling/http-error-handling.service';
@ -29,6 +28,7 @@ import { CultureService } from '@app/core/services/culture/culture-service';
import { LanguageService } from '@app/core/services/language/language.service';
import { SingleAutoCompleteConfiguration } from '@app/library/auto-complete/single/single-auto-complete-configuration';
import { DefaultUserLocaleService } from '@app/core/services/default-user-locale/default-user-locale.service';
import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
@Component({
@ -78,7 +78,7 @@ export class DefaultUserLocaleEditorComponent extends BasePendingChangesComponen
private languageService: LanguageService,
private defaultUserLocaleEditorService: DefaultUserLocaleEditorService,
private defaultUserLocaleService: DefaultUserLocaleService,
private matomoService: MatomoService
private analyticsService: AnalyticsService
) {
super();
this.languages = this.languageService.getAvailableLanguagesCodes().sort((x, y) => x.localeCompare(y));
@ -93,7 +93,9 @@ export class DefaultUserLocaleEditorComponent extends BasePendingChangesComponen
ngOnInit(): void {
this.singleTimezoneAutocompleteConfiguration = this.defaultUserLocaleService.singleTimezoneAutocompleteConfiguration;
this.singleCultureAutocompleteConfiguration = this.defaultUserLocaleService.singleCultureAutocompleteConfiguration;
this.matomoService.trackPageView('Admin: TenantConfigurations');
this.analyticsService.trackPageView(AnalyticsService.TenantConfigurationsUserLocaleEditor);
this.getItem((entity) => {
this.prepareForm(entity);
if (this.formGroup && this.editorModel.belongsToCurrentTenant == false) {

View File

@ -5,7 +5,6 @@ import { MatDialog } from '@angular/material/dialog';
import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/services/notification/ui-notification-service';
import { AppPermission } from '@app/core/common/enum/permission.enum';
import { AuthService } from '@app/core/services/auth/auth.service';
import { MatomoService } from '@app/core/services/matomo/matomo-service';
import { FormService } from '@common/forms/form-service';
import { ConfirmationDialogComponent } from '@common/modules/confirmation-dialog/confirmation-dialog.component';
import { HttpError, HttpErrorHandlingService } from '@common/modules/errors/error-handling/http-error-handling.service';
@ -22,6 +21,7 @@ import { TenantConfigurationType } from '@app/core/common/enum/tenant-configurat
import { HttpErrorResponse } from '@angular/common/http';
import { ResponseErrorCode } from '@app/core/common/enum/respone-error-code';
import { LoggingService } from '@app/core/services/logging/logging-service';
import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
@Component({
@ -61,7 +61,7 @@ export class DepositEditorComponent extends BasePendingChangesComponent implemen
private logger: LoggingService,
private tenantConfigurationService: TenantConfigurationService,
private depositEditorService: DepositEditorService,
private matomoService: MatomoService
private analyticsService: AnalyticsService
) {
super();
}
@ -71,7 +71,8 @@ export class DepositEditorComponent extends BasePendingChangesComponent implemen
}
ngOnInit(): void {
this.matomoService.trackPageView('Admin: TenantConfigurations');
this.analyticsService.trackPageView(AnalyticsService.DepositEditor);
this.getItem((entity) => {
this.prepareForm(entity);
if (this.formGroup && this.editorModel.belongsToCurrentTenant == false) {

View File

@ -5,7 +5,6 @@ import { MatDialog } from '@angular/material/dialog';
import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/services/notification/ui-notification-service';
import { AppPermission } from '@app/core/common/enum/permission.enum';
import { AuthService } from '@app/core/services/auth/auth.service';
import { MatomoService } from '@app/core/services/matomo/matomo-service';
import { FormService } from '@common/forms/form-service';
import { ConfirmationDialogComponent } from '@common/modules/confirmation-dialog/confirmation-dialog.component';
import { HttpError, HttpErrorHandlingService } from '@common/modules/errors/error-handling/http-error-handling.service';
@ -22,6 +21,7 @@ import { TenantConfigurationType } from '@app/core/common/enum/tenant-configurat
import { HttpErrorResponse } from '@angular/common/http';
import { ResponseErrorCode } from '@app/core/common/enum/respone-error-code';
import { LoggingService } from '@app/core/services/logging/logging-service';
import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
@Component({
@ -61,7 +61,7 @@ export class FileTransformerEditorComponent extends BasePendingChangesComponent
private logger: LoggingService,
private tenantConfigurationService: TenantConfigurationService,
private fileTransformerEditorService: FileTransformerEditorService,
private matomoService: MatomoService
private analyticsService: AnalyticsService
) {
super();
}
@ -71,7 +71,7 @@ export class FileTransformerEditorComponent extends BasePendingChangesComponent
}
ngOnInit(): void {
this.matomoService.trackPageView('Admin: TenantConfigurations');
this.analyticsService.trackPageView(AnalyticsService.FileTransformerEditor);
this.getItem((entity) => {
this.prepareForm(entity);
if (this.formGroup && this.editorModel.belongsToCurrentTenant == false) {

View File

@ -5,7 +5,6 @@ import { MatDialog } from '@angular/material/dialog';
import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/services/notification/ui-notification-service';
import { AppPermission } from '@app/core/common/enum/permission.enum';
import { AuthService } from '@app/core/services/auth/auth.service';
import { MatomoService } from '@app/core/services/matomo/matomo-service';
import { FormService } from '@common/forms/form-service';
import { ConfirmationDialogComponent } from '@common/modules/confirmation-dialog/confirmation-dialog.component';
import { HttpError, HttpErrorHandlingService } from '@common/modules/errors/error-handling/http-error-handling.service';
@ -26,6 +25,7 @@ import { StorageFileService } from '@app/core/services/storage-file/storage-file
import { Guid } from '@common/types/guid';
import { FileUtils } from '@app/core/services/utilities/file-utils.service';
import * as FileSaver from 'file-saver';
import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
@Component({
@ -69,9 +69,10 @@ export class LogoEditorComponent extends BasePendingChangesComponent implements
private logger: LoggingService,
private tenantConfigurationService: TenantConfigurationService,
private logoEditorService: LogoEditorService,
private matomoService: MatomoService,
private fileUtils: FileUtils,
private storageFileService: StorageFileService
private storageFileService: StorageFileService,
private analyticsService: AnalyticsService
) {
super();
}
@ -81,7 +82,7 @@ export class LogoEditorComponent extends BasePendingChangesComponent implements
}
ngOnInit(): void {
this.matomoService.trackPageView('Admin: TenantConfigurations');
this.analyticsService.trackPageView(AnalyticsService.LogoEditor);
this.getItem((entity) => {
this.prepareForm(entity);
if (this.formGroup && this.editorModel.belongsToCurrentTenant == false) {

View File

@ -13,7 +13,6 @@ import { AppPermission } from '@app/core/common/enum/permission.enum';
import { Tenant, TenantPersist } from '@app/core/model/tenant/tenant';
import { AuthService } from '@app/core/services/auth/auth.service';
import { LoggingService } from '@app/core/services/logging/logging-service';
import { MatomoService } from '@app/core/services/matomo/matomo-service';
import { FileUtils } from '@app/core/services/utilities/file-utils.service';
import { QueryParamsService } from '@app/core/services/utilities/query-params.service';
import { BaseEditor } from '@common/base/base-editor';
@ -29,6 +28,7 @@ import { TenantEditorService } from './tenant-editor.service';
import { TenantEditorModel } from './tenant-editor.model';
import { LockService } from '@app/core/services/lock/lock.service';
import { ConfigurationService } from '@app/core/services/configuration/configuration.service';
import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
@Component({
@ -84,13 +84,13 @@ export class TenantEditorComponent extends BaseEditor<TenantEditorModel, Tenant>
private logger: LoggingService,
private tenantEditorService: TenantEditorService,
private fileUtils: FileUtils,
private matomoService: MatomoService
private analyticsService: AnalyticsService
) {
super(dialog, language, formService, router, uiNotificationService, httpErrorHandlingService, filterService, datePipe, route, queryParamsService, lockService, authService, configurationService);
}
ngOnInit(): void {
this.matomoService.trackPageView('Admin: Tenants');
this.analyticsService.trackPageView(AnalyticsService.TenantsEditor);
super.ngOnInit();
}

View File

@ -9,8 +9,8 @@ import { ValidationErrorModel } from '@common/forms/validation/error-model/valid
import { TranslateService } from '@ngx-translate/core';
import { takeUntil } from 'rxjs/operators';
import { FormService } from '@common/forms/form-service';
import { MatomoService } from '@app/core/services/matomo/matomo-service';
import { HttpClient } from '@angular/common/http';
import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
@Component({
selector: 'app-contact-content',
@ -31,13 +31,13 @@ export class ContactContentComponent extends BaseComponent implements OnInit {
private language: TranslateService,
private formService: FormService,
private httpClient: HttpClient,
private matomoService: MatomoService
private analyticsService: AnalyticsService
) {
super();
}
ngOnInit() {
this.matomoService.trackPageView('Contact Content');
this.analyticsService.trackPageView(AnalyticsService.ContactContent);
if (this.isDialog) {
this.formGroup = this.form;
} else {

View File

@ -7,7 +7,6 @@ import { DashboardStatistics } from '@app/core/model/dashboard/dashboard-statist
import { AuthService } from '@app/core/services/auth/auth.service';
import { ConfigurationService } from '@app/core/services/configuration/configuration.service';
import { DashboardService } from '@app/core/services/dashboard/dashboard.service';
import { MatomoService } from '@app/core/services/matomo/matomo-service';
import { ReferenceTypeService } from '@app/core/services/reference-type/reference-type.service';
import { GuidedTour, Orientation } from '@app/library/guided-tour/guided-tour.constants';
import { GuidedTourService } from '@app/library/guided-tour/guided-tour.service';
@ -43,7 +42,6 @@ export class DashboardComponent extends BaseComponent implements OnInit {
private dialog: MatDialog,
private language: TranslateService,
private guidedTourService: GuidedTourService,
private matomoService: MatomoService,
private analyticsService: AnalyticsService,
public referenceTypeService: ReferenceTypeService,
private fb: UntypedFormBuilder,
@ -65,7 +63,6 @@ export class DashboardComponent extends BaseComponent implements OnInit {
});
this.analyticsService.trackPageView(AnalyticsService.Dashboard);
// this.matomoService.trackPageView('Home Dashboard');
if (!this.isAuthenticated()) {
this.dashboardService.getPublicDashboardStatistics()

View File

@ -12,7 +12,6 @@ import { Reference } from '@app/core/model/reference/reference';
import { RecentActivityItemLookup } from '@app/core/query/recent-activity-item-lookup.lookup';
import { DashboardService } from "@app/core/services/dashboard/dashboard.service";
import { DmpService } from '@app/core/services/dmp/dmp.service';
import { MatomoService } from '@app/core/services/matomo/matomo-service';
import { EnumUtils } from '@app/core/services/utilities/enum-utils.service';
import { BaseComponent } from '@common/base/base.component';
import { debounceTime, takeUntil } from 'rxjs/operators';
@ -24,6 +23,7 @@ import { DescriptionStatus } from '@app/core/common/enum/description-status';
import { IsActive } from '@app/core/common/enum/is-active.enum';
import { AppPermission } from '@app/core/common/enum/permission.enum';
import { DmpBlueprint, DmpBlueprintDefinition, DmpBlueprintDefinitionSection } from '@app/core/model/dmp-blueprint/dmp-blueprint';
import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
@Component({
selector: 'app-drafts',
@ -58,14 +58,14 @@ export class DraftsComponent extends BaseComponent implements OnInit {
private authentication: AuthService,
private dashboardService: DashboardService,
private location: Location,
private matomoService: MatomoService,
private dmpService: DmpService
private dmpService: DmpService,
private analyticsService: AnalyticsService
) {
super();
}
ngOnInit() {
this.matomoService.trackPageView('Recent DMP Activity');
this.analyticsService.trackPageView(AnalyticsService.RecentEditedActivity);
this.route.queryParams.subscribe(params => {
if (this.isActive) {
let page = (params['page'] === undefined) ? 1 : +params['page'];

View File

@ -19,7 +19,7 @@ import { RecentActivityItemLookup } from '@app/core/query/recent-activity-item-l
import { AuthService } from '@app/core/services/auth/auth.service';
import { DashboardService } from '@app/core/services/dashboard/dashboard.service';
import { DmpService } from '@app/core/services/dmp/dmp.service';
import { MatomoService } from '@app/core/services/matomo/matomo-service';
import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
import { EnumUtils } from '@app/core/services/utilities/enum-utils.service';
import { BaseComponent } from '@common/base/base.component';
import { Lookup } from '@common/model/lookup';
@ -74,14 +74,14 @@ export class RecentEditedActivityComponent extends BaseComponent implements OnIn
private authentication: AuthService,
private dashboardService: DashboardService,
private location: Location,
private matomoService: MatomoService,
private dmpService: DmpService
private dmpService: DmpService,
private analyticsService: AnalyticsService
) {
super();
}
ngOnInit() {
this.matomoService.trackPageView('Recent DMP Activity');
this.analyticsService.trackPageView(AnalyticsService.RecentEditedActivity);
this.route.queryParams.subscribe(params => {
if (this.isActive) {
let page = (params['page'] === undefined) ? 0 : + params['page'];

View File

@ -13,7 +13,6 @@ import { Reference } from '@app/core/model/reference/reference';
import { RecentActivityItemLookup } from '@app/core/query/recent-activity-item-lookup.lookup';
import { AuthService } from '@app/core/services/auth/auth.service';
import { DashboardService } from '@app/core/services/dashboard/dashboard.service';
import { MatomoService } from '@app/core/services/matomo/matomo-service';
import { EnumUtils } from '@app/core/services/utilities/enum-utils.service';
import { BaseComponent } from '@common/base/base.component';
import { debounceTime, takeUntil } from 'rxjs/operators';
@ -21,6 +20,7 @@ import { nameof } from 'ts-simple-nameof';
import { DescriptionStatus } from '@app/core/common/enum/description-status';
import { AppPermission } from '@app/core/common/enum/permission.enum';
import { DmpBlueprint, DmpBlueprintDefinition, DmpBlueprintDefinitionSection } from '@app/core/model/dmp-blueprint/dmp-blueprint';
import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
@Component({
selector: 'app-recent-edited-description-activity',
@ -56,13 +56,13 @@ export class RecentEditedDescriptionActivityComponent extends BaseComponent impl
private authentication: AuthService,
private dashboardService: DashboardService,
private location: Location,
private matomoService: MatomoService
private analyticsService: AnalyticsService
) {
super();
}
ngOnInit() {
this.matomoService.trackPageView('Recent DMP Activity');
this.analyticsService.trackPageView(AnalyticsService.RecentEditedActivity);
this.route.queryParams.subscribe(params => {
if (this.isActive) {
let page = (params['page'] === undefined) ? 1 : +params['page'];

View File

@ -17,7 +17,7 @@ import { Reference } from '@app/core/model/reference/reference';
import { RecentActivityItemLookup } from '@app/core/query/recent-activity-item-lookup.lookup';
import { AuthService } from '@app/core/services/auth/auth.service';
import { DashboardService } from '@app/core/services/dashboard/dashboard.service';
import { MatomoService } from '@app/core/services/matomo/matomo-service';
import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
import { EnumUtils } from '@app/core/services/utilities/enum-utils.service';
import { BaseComponent } from '@common/base/base.component';
import { debounceTime, takeUntil } from 'rxjs/operators';
@ -63,13 +63,13 @@ export class RecentEditedDmpActivityComponent extends BaseComponent implements O
private authentication: AuthService,
private dashboardService: DashboardService,
private location: Location,
private matomoService: MatomoService,
private analyticsService: AnalyticsService
) {
super();
}
ngOnInit() {
this.matomoService.trackPageView('Recent DMP Activity');
this.analyticsService.trackPageView(AnalyticsService.RecentEditedActivity);
this.route.queryParams.subscribe(params => {
if (this.isActive) {
let page = (params['page'] === undefined) ? 1 : +params['page'];

View File

@ -22,7 +22,6 @@ import { DmpService } from '@app/core/services/dmp/dmp.service';
import { FileTransformerService } from '@app/core/services/file-transformer/file-transformer.service';
import { LockService } from '@app/core/services/lock/lock.service';
import { LoggingService } from '@app/core/services/logging/logging-service';
import { MatomoService } from '@app/core/services/matomo/matomo-service';
import {
SnackBarNotificationLevel,
UiNotificationService
@ -49,6 +48,7 @@ import { ToCEntry } from './table-of-contents/models/toc-entry';
import { ToCEntryType } from './table-of-contents/models/toc-entry-type.enum';
import { TableOfContentsValidationService } from './table-of-contents/services/table-of-contents-validation-service';
import { TableOfContentsComponent } from './table-of-contents/table-of-contents.component';
import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
@Component({
selector: 'app-description-editor-component',
@ -98,12 +98,12 @@ export class DescriptionEditorComponent extends BaseEditor<DescriptionEditorMode
private descriptionEditorService: DescriptionEditorService,
private descriptionTemplateService: DescriptionTemplateService,
private fileUtils: FileUtils,
private matomoService: MatomoService,
private dmpService: DmpService,
public visibilityRulesService: VisibilityRulesService,
public fileTransformerService: FileTransformerService,
public tocValidationService: TableOfContentsValidationService,
public titleService: Title
public titleService: Title,
private analyticsService: AnalyticsService
) {
const descriptionLabel: string = route.snapshot.data['entity']?.label;
if (descriptionLabel) {
@ -115,7 +115,7 @@ export class DescriptionEditorComponent extends BaseEditor<DescriptionEditorMode
}
ngOnInit(): void {
this.matomoService.trackPageView('Description Editor');
this.analyticsService.trackPageView(AnalyticsService.DescriptionEditor);
super.ngOnInit();

View File

@ -3,8 +3,8 @@ import { Component, Inject, OnInit, ViewChild } from '@angular/core';
import { UntypedFormGroup } from '@angular/forms';
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
import { DatasetCriteria } from '@app/core/query/dataset/dataset-criteria';
import { MatomoService } from '@app/core/services/matomo/matomo-service';
import { DatasetCriteriaComponent } from '../dataset-criteria.component';
import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
@Component({
selector: 'dataset-criteria-dialog-component',
@ -19,13 +19,13 @@ export class DatasetCriteriaDialogComponent implements OnInit {
constructor(
public dialogRef: MatDialogRef<DatasetCriteriaDialogComponent>,
private httpClient: HttpClient,
private matomoService: MatomoService,
private analyticsService: AnalyticsService,
@Inject(MAT_DIALOG_DATA) public data: { isPublic: boolean, status: Number, criteria: DatasetCriteria, formGroup: UntypedFormGroup, updateDataFn: Function }
) {
}
ngOnInit() {
this.matomoService.trackPageView('Dataset Criteria');
this.analyticsService.trackPageView(AnalyticsService.DatasetCriteriaDialog);
this.criteria.setCriteria(this.data.criteria);
}

View File

@ -21,7 +21,6 @@ import { DmpLookup } from '@app/core/query/dmp.lookup';
import { AuthService } from '@app/core/services/auth/auth.service';
import { DescriptionService } from '@app/core/services/description/description.service';
import { DmpService } from '@app/core/services/dmp/dmp.service';
import { MatomoService } from '@app/core/services/matomo/matomo-service';
import { EnumUtils } from '@app/core/services/utilities/enum-utils.service';
import { GuidedTour, Orientation } from '@app/library/guided-tour/guided-tour.constants';
import { GuidedTourService } from '@app/library/guided-tour/guided-tour.service';
@ -36,6 +35,7 @@ import { nameof } from 'ts-simple-nameof';
import { StartNewDescriptionDialogComponent } from '../start-new-description-dialog/start-new-description-dialog.component';
import { DmpBlueprint, DmpBlueprintDefinition, DmpBlueprintDefinitionSection } from '@app/core/model/dmp-blueprint/dmp-blueprint';
import { SortDirection } from '@common/modules/hybrid-listing/hybrid-listing.component';
import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
@Component({
selector: 'app-description-listing-component',
@ -102,14 +102,14 @@ export class DescriptionListingComponent extends BaseComponent implements OnInit
private authentication: AuthService,
private guidedTourService: GuidedTourService,
private httpClient: HttpClient,
private matomoService: MatomoService,
private analyticsService: AnalyticsService,
private fb: UntypedFormBuilder,
) {
super();
}
ngOnInit() {
this.matomoService.trackPageView('Descriptions');
this.analyticsService.trackPageView(AnalyticsService.DescriptionListing);
this.isPublic = this.router.url === '/explore-descriptions';
if (this.isPublic) {
//TODO: refactor

View File

@ -28,6 +28,7 @@ import { DescriptionStatus } from '../../../../core/common/enum/description-stat
import { DescriptionCopyDialogComponent } from '../../description-copy-dialog/description-copy-dialog.component';
import { AppPermission } from '@app/core/common/enum/permission.enum';
import { FileTransformerEntityType } from '@app/core/common/enum/file-transformer-entity-type';
import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
@Component({
selector: 'app-description-listing-item-component',
@ -69,12 +70,13 @@ export class DescriptionListingItemComponent extends BaseComponent implements On
public referenceTypeService: ReferenceTypeService,
public fileTransformerService: FileTransformerService,
private fb: UntypedFormBuilder,
private analyticsService: AnalyticsService,
) {
super();
}
ngOnInit() {
this.matomoService.trackPageView('Description Listing Item');
this.analyticsService.trackPageView(AnalyticsService.DescriptionListingItem);
if (this.description.isActive === IsActive.Inactive) {
this.isDeleted = true;
} else if (this.description.status === DescriptionStatus.Draft) {

View File

@ -41,6 +41,7 @@ import { IsActive } from '@app/core/common/enum/is-active.enum';
import { DmpInvitationDialogComponent } from '@app/ui/dmp/invitation/dialog/dmp-invitation-dialog.component';
import { DmpBlueprint, DmpBlueprintDefinition, DmpBlueprintDefinitionSection } from '@app/core/model/dmp-blueprint/dmp-blueprint';
import { FileTransformerEntityType } from '@app/core/common/enum/file-transformer-entity-type';
import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
@Component({
@ -92,13 +93,15 @@ export class DescriptionOverviewComponent extends BaseComponent implements OnIni
public fileTransformerService: FileTransformerService,
private referenceTypeService: ReferenceTypeService,
private fb: UntypedFormBuilder,
private lockService: LockService
private lockService: LockService,
private analyticsService: AnalyticsService,
) {
super();
}
ngOnInit() {
this.matomoService.trackPageView('Description Overview');
this.analyticsService.trackPageView(AnalyticsService.DescriptionOverview);
this.canDelete = false;
this.canEdit = false;
this.canFinalize = false;

View File

@ -31,7 +31,6 @@ import { DmpBlueprintService } from '@app/core/services/dmp/dmp-blueprint.servic
import { DmpService } from '@app/core/services/dmp/dmp.service';
import { LockService } from '@app/core/services/lock/lock.service';
import { LoggingService } from '@app/core/services/logging/logging-service';
import { MatomoService } from '@app/core/services/matomo/matomo-service';
import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/services/notification/ui-notification-service';
import { UserService } from '@app/core/services/user/user.service';
import { EnumUtils } from '@app/core/services/utilities/enum-utils.service';
@ -52,6 +51,7 @@ import { DmpEditorModel, DmpFieldIndicator } from './dmp-editor.model';
import { DmpEditorResolver } from './dmp-editor.resolver';
import { DmpEditorService } from './dmp-editor.service';
import { Title } from '@angular/platform-browser';
import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
@Component({
selector: 'app-dmp-editor',
@ -160,14 +160,14 @@ export class DmpEditorComponent extends BaseEditor<DmpEditorModel, Dmp> implemen
private dmpService: DmpService,
private logger: LoggingService,
public dmpBlueprintService: DmpBlueprintService,
private matomoService: MatomoService,
// public visibilityRulesService: VisibilityRulesService,
private languageInfoService: LanguageInfoService,
public enumUtils: EnumUtils,
public descriptionTemplateService: DescriptionTemplateService,
public userService: UserService,
public descriptionService: DescriptionService,
public titleService: Title
public titleService: Title,
private analyticsService: AnalyticsService,
) {
const descriptionLabel:string = route.snapshot.data['entity']?.label;
if (descriptionLabel) {
@ -179,7 +179,8 @@ export class DmpEditorComponent extends BaseEditor<DmpEditorModel, Dmp> implemen
}
ngOnInit(): void {
this.matomoService.trackPageView('DMP Editor');
this.analyticsService.trackPageView(AnalyticsService.DmpEditor);
super.ngOnInit();
if (this.isNew === false && this.step === 0) this.nextStep();

View File

@ -2,8 +2,8 @@ import { Inject, Component, ViewChild, OnInit, Output, EventEmitter } from '@ang
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
import { DmpCriteriaComponent } from './dmp-criteria.component';
import { UntypedFormGroup } from '@angular/forms';
import { MatomoService } from '@app/core/services/matomo/matomo-service';
import { HttpClient } from '@angular/common/http';
import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
@Component({
selector: 'dmp-criteria-dialog-component',
@ -18,13 +18,14 @@ export class DmpCriteriaDialogComponent implements OnInit {
constructor(
public dialogRef: MatDialogRef<DmpCriteriaDialogComponent>,
private httpClient: HttpClient,
private matomoService: MatomoService,
private analyticsService: AnalyticsService,
@Inject(MAT_DIALOG_DATA) public data: { showGrant: boolean, isPublic: boolean, criteria: DmpCriteria, formGroup: UntypedFormGroup, updateDataFn: Function }
) {
}
ngOnInit() {
this.matomoService.trackPageView('DMP Criteria');
this.analyticsService.trackPageView(AnalyticsService.DmpCriteriaDialog);
this.criteria.setCriteria(this.data.criteria);
}

View File

@ -9,7 +9,6 @@ import { ActivatedRoute, Router } from '@angular/router';
import { RecentActivityOrder } from '@app/core/common/enum/recent-activity-order';
import { AuthService } from '@app/core/services/auth/auth.service';
import { DmpService } from '@app/core/services/dmp/dmp.service';
import { MatomoService } from '@app/core/services/matomo/matomo-service';
import { UiNotificationService } from '@app/core/services/notification/ui-notification-service';
import { EnumUtils } from '@app/core/services/utilities/enum-utils.service';
import { GuidedTour, Orientation } from '@app/library/guided-tour/guided-tour.constants';
@ -35,6 +34,7 @@ import { AppPermission } from '@app/core/common/enum/permission.enum';
import { DmpStatus } from '@app/core/common/enum/dmp-status';
import { DescriptionStatus } from '@app/core/common/enum/description-status';
import { SortDirection } from '@common/modules/hybrid-listing/hybrid-listing.component';
import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
@Component({
selector: 'app-dmp-listing-component',
@ -89,13 +89,15 @@ export class DmpListingComponent extends BaseComponent implements OnInit { //IBr
private authService: AuthService,
private guidedTourService: GuidedTourService,
private httpClient: HttpClient,
private matomoService: MatomoService
private analyticsService: AnalyticsService,
) {
super();
}
ngOnInit() {
this.matomoService.trackPageView('DMPs');
this.analyticsService.trackPageView(AnalyticsService.DmpListing);
this.isPublic = this.router.url.startsWith('/explore-plans');
if (this.isPublic) {
//TODO refactor

View File

@ -10,7 +10,6 @@ import { DmpBlueprintService } from '@app/core/services/dmp/dmp-blueprint.servic
import { DmpService } from '@app/core/services/dmp/dmp.service';
import { FileTransformerService } from '@app/core/services/file-transformer/file-transformer.service';
import { LockService } from '@app/core/services/lock/lock.service';
import { MatomoService } from '@app/core/services/matomo/matomo-service';
import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/services/notification/ui-notification-service';
import { ReferenceTypeService } from '@app/core/services/reference-type/reference-type.service';
import { ReferenceService } from '@app/core/services/reference/reference.service';
@ -30,6 +29,7 @@ import { AppPermission } from '@app/core/common/enum/permission.enum';
import { FileTransformerEntityType } from '@app/core/common/enum/file-transformer-entity-type';
import { DmpVersionStatus } from '@app/core/common/enum/dmp-version-status';
import { DmpDeleteDialogComponent } from '../../dmp-delete-dialog/dmp-delete-dialog.component';
import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
@Component({
selector: 'app-dmp-listing-item-component',
@ -61,16 +61,17 @@ export class DmpListingItemComponent extends BaseComponent implements OnInit {
private lockService: LockService,
private location: Location,
private httpClient: HttpClient,
private matomoService: MatomoService,
public referenceService: ReferenceService,
public referenceTypeService: ReferenceTypeService,
public fileTransformerService: FileTransformerService,
private fileUtils: FileUtils) {
private fileUtils: FileUtils,
private analyticsService: AnalyticsService,
) {
super();
}
ngOnInit() {
this.matomoService.trackPageView('DMP Listing Item');
this.analyticsService.trackPageView(AnalyticsService.DmpListingItem);
if (this.dmp.status == DmpStatus.Draft) {
this.isDraft = true;
this.isFinalized = false;

View File

@ -3,12 +3,12 @@ import { Component, Inject } from '@angular/core';
import { MAT_DIALOG_DATA, MatDialog, MatDialogRef } from '@angular/material/dialog';
import { Router } from '@angular/router';
import { DmpService } from '@app/core/services/dmp/dmp.service';
import { MatomoService } from '@app/core/services/matomo/matomo-service';
import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/services/notification/ui-notification-service';
import { BaseComponent } from '@common/base/base.component';
import { TranslateService } from '@ngx-translate/core';
import { takeUntil } from 'rxjs/operators';
import { DmpUploadDialogComponent } from '../upload-dialogue/dmp-upload-dialog.component';
import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
@Component({
selector: 'app-start-new-dmp',
@ -28,14 +28,14 @@ export class StartNewDmpDialogComponent extends BaseComponent {
private language: TranslateService,
private dmpService: DmpService,
private httpClient: HttpClient,
private matomoService: MatomoService
private analyticsService: AnalyticsService,
) {
super();
this.isDialog = data.isDialog;
}
ngOnInit() {
this.matomoService.trackPageView('Start New DMP Dialog');
this.analyticsService.trackPageView(AnalyticsService.StartNewDmpDialog);
}
cancel() {

View File

@ -3,7 +3,7 @@ import { Component, Inject } from '@angular/core';
import { MAT_DIALOG_DATA, MatDialog, MatDialogRef } from '@angular/material/dialog';
import { DescriptionTemplate } from '@app/core/model/description-template/description-template';
import { DmpService } from '@app/core/services/dmp/dmp.service';
import { MatomoService } from '@app/core/services/matomo/matomo-service';
import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
import { MultipleAutoCompleteConfiguration } from '@app/library/auto-complete/multiple/multiple-auto-complete-configuration';
import { BaseComponent } from '@common/base/base.component';
import { Observable } from 'rxjs';
@ -34,14 +34,15 @@ export class DmpUploadDialogComponent extends BaseComponent {
private _service: DmpService,
private dialog: MatDialog,
private httpClient: HttpClient,
private matomoService: MatomoService,
private analyticsService: AnalyticsService,
@Inject(MAT_DIALOG_DATA) public data: any,
) {
super();
}
ngOnInit() {
this.matomoService.trackPageView('DMP Upload Dialog');
this.analyticsService.trackPageView(AnalyticsService.DmpUploadDialog);
}
cancel() {

View File

@ -49,6 +49,7 @@ import { DmpEditorResolver } from '../dmp-editor-blueprint/dmp-editor.resolver';
import { FileTransformerEntityType } from '@app/core/common/enum/file-transformer-entity-type';
import { DmpVersionStatus } from '@app/core/common/enum/dmp-version-status';
import { DmpDeleteDialogComponent } from '../dmp-delete-dialog/dmp-delete-dialog.component';
import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
@Component({
selector: 'app-dmp-overview',
@ -103,13 +104,14 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit {
public referenceService: ReferenceService,
public enumUtils: EnumUtils,
public fileTransformerService: FileTransformerService,
private referenceTypeService: ReferenceTypeService
private referenceTypeService: ReferenceTypeService,
private analyticsService: AnalyticsService,
) {
super();
}
ngOnInit() {
this.matomoService.trackPageView('DMP Overview');
this.analyticsService.trackPageView(AnalyticsService.DmpOverview);
// Gets dmp data using parameter id
this.route.params
.pipe(takeUntil(this._destroyed))

View File

@ -1,11 +1,11 @@
import { Component, OnInit, Input } from '@angular/core';
import { SafeResourceUrl, DomSanitizer } from '@angular/platform-browser';
import { LanguageService } from '@app/core/services/language/language.service';
import { MatomoService } from '@app/core/services/matomo/matomo-service';
import { SupportiveMaterialService } from '@app/core/services/supportive-material/supportive-material.service';
import { BaseComponent } from '@common/base/base.component';
import { takeUntil } from 'rxjs/operators';
import { SupportiveMaterialFieldType } from '@app/core/common/enum/supportive-material-field-type';
import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
@Component({
selector: 'app-faq-content',
@ -23,11 +23,11 @@ export class FaqContentComponent extends BaseComponent implements OnInit {
private supportiveMaterialService: SupportiveMaterialService,
private sanitizer: DomSanitizer,
private languageService: LanguageService,
private matomoService: MatomoService
private analyticsService: AnalyticsService,
) { super(); }
ngOnInit() {
this.matomoService.trackPageView('FAQ');
this.analyticsService.trackPageView(AnalyticsService.FAQ);
this.supportiveMaterialService.getPayload(SupportiveMaterialFieldType.Faq, this.languageService.getCurrentLanguage())
.pipe(takeUntil(this._destroyed))

View File

@ -3,7 +3,7 @@ import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';
import { Router } from '@angular/router';
import { SupportiveMaterialFieldType } from '@app/core/common/enum/supportive-material-field-type';
import { LanguageService } from '@app/core/services/language/language.service';
import { MatomoService } from '@app/core/services/matomo/matomo-service';
import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
import { SupportiveMaterialService } from '@app/core/services/supportive-material/supportive-material.service';
import { BaseComponent } from '@common/base/base.component';
import { LangChangeEvent, TranslateService } from '@ngx-translate/core';
@ -25,13 +25,14 @@ export class GlossaryContentComponent extends BaseComponent implements OnInit {
private supportiveMaterialService: SupportiveMaterialService,
private sanitizer: DomSanitizer,
private languageService: LanguageService,
private matomoService: MatomoService,
private translate: TranslateService,
private router: Router
private router: Router,
private analyticsService: AnalyticsService,
) { super(); }
ngOnInit() {
this.matomoService.trackPageView('Glossary');
this.analyticsService.trackPageView(AnalyticsService.Glossary);
this.translate.onLangChange.subscribe((event: LangChangeEvent) => {
this.router.navigate(['/reload'], { skipLocationChange: true }).then(() => this.router.navigate(['/glossary']));

View File

@ -7,7 +7,6 @@ import { AppRole } from '@app/core/common/enum/app-role';
import { User } from '@app/core/model/user/user';
import { AuthService, LoginStatus } from '@app/core/services/auth/auth.service';
import { LanguageService } from '@app/core/services/language/language.service';
import { MatomoService } from '@app/core/services/matomo/matomo-service';
import { ProgressIndicationService } from '@app/core/services/progress-indication/progress-indication-service';
import { SideNavService } from '@app/core/services/sidenav/side-nav.sevice';
import { BaseComponent } from '@common/base/base.component';
@ -26,6 +25,7 @@ import { nameof } from 'ts-simple-nameof';
import { StorageFile } from '@app/core/model/storage-file/storage-file';
import { StorageFileService } from '@app/core/services/storage-file/storage-file.service';
import { DomSanitizer, SafeUrl } from '@angular/platform-browser';
import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
@Component({
selector: 'app-navbar',
@ -56,13 +56,13 @@ export class NavbarComponent extends BaseComponent implements OnInit {
private dialog: MatDialog,
private progressIndicationService: ProgressIndicationService,
private languageService: LanguageService,
private matomoService: MatomoService,
private sidenavService: SideNavService,
private tenantConfigurationService: TenantConfigurationService,
private inappNotificationService: InAppNotificationService,
private configurationService: ConfigurationService,
private storageFileService: StorageFileService,
private sanitizer: DomSanitizer
private sanitizer: DomSanitizer,
private analyticsService: AnalyticsService,
) {
super();
this.location = location;
@ -72,7 +72,8 @@ export class NavbarComponent extends BaseComponent implements OnInit {
}
ngOnInit() {
this.matomoService.trackPageView('Navbar');
this.analyticsService.trackPageView(AnalyticsService.Navbar);
this.currentRoute = this.router.url;
// this.listTitles = GENERAL_ROUTES.filter(listTitle => listTitle);
// this.listTitles.push(DMP_ROUTES.filter(listTitle => listTitle));

View File

@ -16,7 +16,7 @@ import { takeUntil } from 'rxjs/operators';
import { AuthService } from "@app/core/services/auth/auth.service";
import { UserGuideDialogComponent } from '@app/ui/user-guide/dialog/user-guide-dialog.component';
import { HttpClient } from '@angular/common/http';
import { MatomoService } from '@app/core/services/matomo/matomo-service';
import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
@Component({
selector: 'app-sidebar-footer',
@ -37,13 +37,14 @@ export class SidebarFooterComponent extends BaseComponent implements OnInit {
private formService: FormService,
private authentication: AuthService,
private httpClient: HttpClient,
private matomoService: MatomoService
private analyticsService: AnalyticsService,
) {
super();
}
ngOnInit() {
this.matomoService.trackPageView('Sidebar Footer');
this.analyticsService.trackPageView(AnalyticsService.SidebarFooter);
this.contactEmailFormModel = new ContactEmailFormModel();
this.formGroup = this.contactEmailFormModel.buildForm();
}

View File

@ -3,7 +3,7 @@ import { SafeResourceUrl, DomSanitizer } from '@angular/platform-browser';
import { Router } from '@angular/router';
import { SupportiveMaterialFieldType } from '@app/core/common/enum/supportive-material-field-type';
import { LanguageService } from '@app/core/services/language/language.service';
import { MatomoService } from '@app/core/services/matomo/matomo-service';
import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
import { SupportiveMaterialService } from '@app/core/services/supportive-material/supportive-material.service';
import { BaseComponent } from '@common/base/base.component';
import { TranslateService, LangChangeEvent } from '@ngx-translate/core';
@ -23,13 +23,14 @@ export class TermsComponent extends BaseComponent implements OnInit {
private supportiveMaterialService: SupportiveMaterialService,
private sanitizer: DomSanitizer,
private languageService: LanguageService,
private matomoService: MatomoService,
private translate: TranslateService,
private router: Router
private router: Router,
private analyticsService: AnalyticsService,
) { super(); }
ngOnInit() {
this.matomoService.trackPageView('Terms of Service');
this.analyticsService.trackPageView(AnalyticsService.Terms);
this.translate.onLangChange.subscribe((event: LangChangeEvent) => {
this.router.navigate(['/reload'], { skipLocationChange: true }).then(() => this.router.navigate(['/terms-and-conditions']));
});

View File

@ -3,7 +3,6 @@ import { HttpClient } from '@angular/common/http';
import { Component, OnInit } from '@angular/core';
import { MatDialog } from '@angular/material/dialog';
import { Router } from '@angular/router';
import { MatomoService } from '@app/core/services/matomo/matomo-service';
import { TranslateService } from '@ngx-translate/core';
import { AppRole } from '../../core/common/enum/app-role';
import { AuthService, LoginStatus } from '../../core/services/auth/auth.service';
@ -11,6 +10,7 @@ import { LanguageDialogComponent } from '../language/dialog/language-dialog.comp
import { UserDialogComponent } from '../navbar/user-dialog/user-dialog.component';
import { AppPermission } from '@app/core/common/enum/permission.enum';
import { takeUntil } from 'rxjs/operators';
import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
declare interface RouteInfo {
path: string;
@ -49,12 +49,12 @@ export class SidebarComponent implements OnInit {
public router: Router,
private location: Location,
private httpClient: HttpClient,
private matomoService: MatomoService
) {
}
private analyticsService: AnalyticsService,
) { }
ngOnInit() {
this.matomoService.trackPageView('Sidebar');
this.analyticsService.trackPageView(AnalyticsService.Sidebar);
this.currentRoute = this.router.url;
this.authentication.getAuthenticationStateObservable().pipe().subscribe(authenticationState => {

View File

@ -8,7 +8,6 @@ import { isNullOrUndefined } from '@app/utilities/enhancers/utils';
import { environment } from 'environments/environment';
import { ConfigurationService } from '@app/core/services/configuration/configuration.service';
import { AuthService } from '@app/core/services/auth/auth.service';
import { MatomoService } from '@app/core/services/matomo/matomo-service';
import { SupportiveMaterialService } from '@app/core/services/supportive-material/supportive-material.service';
import { SupportiveMaterialFieldType } from '@app/core/common/enum/supportive-material-field-type';
import { SupportiveMaterial, SupportiveMaterialPersist } from '@app/core/model/supportive-material/supportive-material';
@ -76,7 +75,6 @@ export class SupportiveMaterialEditorComponent extends BaseEditor<SupportiveMate
private logger: LoggingService,
private supportiveMaterialEditorService: SupportiveMaterialEditorService,
private fileUtils: FileUtils,
private matomoService: MatomoService
) {
super(dialog, language, formService, router, uiNotificationService, httpErrorHandlingService, filterService, datePipe, route, queryParamsService, lockService, authService, configurationService);
}

View File

@ -5,7 +5,7 @@ import { Router } from '@angular/router';
import { SupportiveMaterialFieldType } from '@app/core/common/enum/supportive-material-field-type';
import { ConfigurationService } from '@app/core/services/configuration/configuration.service';
import { LanguageService } from '@app/core/services/language/language.service';
import { MatomoService } from '@app/core/services/matomo/matomo-service';
import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
import { SupportiveMaterialService } from '@app/core/services/supportive-material/supportive-material.service';
import { BaseComponent } from '@common/base/base.component';
import { LangChangeEvent, TranslateService } from '@ngx-translate/core';
@ -35,14 +35,15 @@ export class UserGuideContentComponent extends BaseComponent implements OnInit {
private sanitizer: DomSanitizer,
private languageService: LanguageService,
private httpClient: HttpClient,
private matomoService: MatomoService,
private configurationService: ConfigurationService,
private translate: TranslateService,
private router: Router
private router: Router,
private analyticsService: AnalyticsService,
) { super(); }
ngOnInit() {
this.matomoService.trackPageView('User Guide Content');
this.analyticsService.trackPageView(AnalyticsService.UserGuideContent);
this.scrollEvent = ((ev) => this.scroll(ev));
this.tocScrollEvent = ((ev) => {
this.activeToc(ev);

View File

@ -11,7 +11,6 @@ import { AuthService } from '@app/core/services/auth/auth.service';
import { ConfigurationService } from '@app/core/services/configuration/configuration.service';
import { CultureService } from '@app/core/services/culture/culture-service';
import { LanguageService } from '@app/core/services/language/language.service';
import { MatomoService } from '@app/core/services/matomo/matomo-service';
import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/services/notification/ui-notification-service';
import { UserService } from '@app/core/services/user/user.service';
import { EnumUtils } from '@app/core/services/utilities/enum-utils.service';
@ -39,6 +38,7 @@ import { SingleAutoCompleteConfiguration } from '@app/library/auto-complete/sing
import { ReferenceSourceType } from '@app/core/common/enum/reference-source-type';
import { ReferenceType } from '@app/core/model/reference-type/reference-type';
import { Tenant } from '@app/core/model/tenant/tenant';
import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
@Component({
selector: 'app-user-profile',
@ -84,13 +84,13 @@ export class UserProfileComponent extends BaseComponent implements OnInit, OnDes
private dialog: MatDialog,
public enumUtils: EnumUtils,
private httpClient: HttpClient,
private matomoService: MatomoService,
private formBuilder: UntypedFormBuilder,
private keycloakService: KeycloakService,
private principalService: PrincipalService,
private formService: FormService,
private referenceService: ReferenceService,
private referenceTypeService: ReferenceTypeService
private referenceTypeService: ReferenceTypeService,
private analyticsService: AnalyticsService,
) {
super();
this.languages = this.languageService.getAvailableLanguagesCodes();
@ -118,7 +118,8 @@ export class UserProfileComponent extends BaseComponent implements OnInit, OnDes
this.tenantFormGroup = this.formBuilder.group({
tenantCode: [this.authService.selectedTenant(), [Validators.required]]
});
this.matomoService.trackPageView('User Profile');
this.analyticsService.trackPageView(AnalyticsService.UserProfile);
this.organisationsSingleAutoCompleteConfiguration = this.referenceService.getSingleAutocompleteSearchConfiguration(this.referenceTypeService.getOrganizationReferenceType(), null);
this.route.params
.pipe(takeUntil(this._destroyed))

View File

@ -18,7 +18,6 @@ import { FilterService } from '@common/modules/text-filter/filter-service';
import { DatePipe } from '@angular/common';
import { QueryParamsService } from '@app/core/services/utilities/query-params.service';
import { NotificationServiceEnumUtils } from '@notification-service/core/formatting/enum-utils.service';
import { MatomoService } from '@app/core/services/matomo/matomo-service';
import { NotificationTemplateEditorService } from './notification-template-editor.service';
import { Guid } from '@common/types/guid';
import { NotificationTemplateEditorResolver } from './notification-template-editor.resolver';
@ -37,6 +36,7 @@ import { NotificationType } from '@notification-service/core/enum/notification-t
import { EmailOverrideMode } from '@notification-service/core/enum/email-override-mode';
import { NotificationDataType } from '@notification-service/core/enum/notification-data-type';
import { Title } from '@angular/platform-browser';
import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
@Component({
selector: 'app-notification-template-editor',
@ -99,8 +99,8 @@ export class NotificationTemplateEditorComponent extends BaseEditor<Notification
private notificationTemplateService: NotificationTemplateService,
private notificationTemplateEditorService: NotificationTemplateEditorService,
private logger: LoggingService,
private matomoService: MatomoService,
private titleService: Title
private titleService: Title,
private analyticsService: AnalyticsService,
) {
const descriptionLabel:string = route.snapshot.data['entity']?.notificationType;
if (descriptionLabel) {
@ -112,7 +112,8 @@ export class NotificationTemplateEditorComponent extends BaseEditor<Notification
}
ngOnInit(): void {
this.matomoService.trackPageView('Admin: Notification Tempplates');
this.analyticsService.trackPageView(AnalyticsService.NotificationTempplateEditor);
super.ngOnInit();
this.languageHttpService.query(this.languageHttpService.buildAutocompleteLookup())
.pipe(takeUntil(this._destroyed))