diff --git a/package-lock.json b/package-lock.json index 825d54bac84bbf39e459b33cc6ee5c265aff81c9..75e90fd17ab080d081a7b2608084c1428bbd5ccc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,6 +22,7 @@ "@angular/platform-browser": "^14.0.4", "@angular/platform-browser-dynamic": "^14.0.4", "@angular/router": "^14.0.4", + "@ngx-matomo/tracker": "^3.0.0", "@types/pako": "^1.0.1", "@types/sprintf-js": "^1.1.2", "angular2-chartjs": "^0.5.1", @@ -46,7 +47,6 @@ "mermaid": "^8.8.0", "ngx-markdown": "^14.0.1", "ngx-material-file-input": "^4.0.0", - "ngx-matomo-v9": "^0.6.0", "ngx-webstorage-service": "^4.1.0", "pako": "^1.0.11", "primeng": "^14.0.0-rc.1", @@ -5220,6 +5220,18 @@ "node >=0.6.0" ] }, + "node_modules/@ngx-matomo/tracker": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@ngx-matomo/tracker/-/tracker-3.0.0.tgz", + "integrity": "sha512-J3952aKGZrCNvfcvkDGij424GDlNEpvef1t2dtOrdNLKxGo0OkkPow4my8PoRKR+LQor/sjM4ogoy86V++imug==", + "dependencies": { + "tslib": "^2.0.0" + }, + "peerDependencies": { + "@angular/common": "^14.0.0", + "@angular/core": "^14.0.0" + } + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz", @@ -19524,17 +19536,6 @@ "@angular/material": "^14.0.0" } }, - "node_modules/ngx-matomo-v9": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/ngx-matomo-v9/-/ngx-matomo-v9-0.6.0.tgz", - "integrity": "sha512-nLJC1QDpOB12BJ/kkcKsx+uqiE4I8hWh87cfqRaordhb98ihDrQssusOvQ2sANz2Ujdo7hXAbbtvzQ4DtCssVQ==", - "dependencies": { - "tslib": "^2.0.0" - }, - "peerDependencies": { - "@angular/core": ">=8.0.0 <14.0.0" - } - }, "node_modules/ngx-webstorage-service": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/ngx-webstorage-service/-/ngx-webstorage-service-4.1.0.tgz", @@ -30898,6 +30899,14 @@ } } }, + "@ngx-matomo/tracker": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@ngx-matomo/tracker/-/tracker-3.0.0.tgz", + "integrity": "sha512-J3952aKGZrCNvfcvkDGij424GDlNEpvef1t2dtOrdNLKxGo0OkkPow4my8PoRKR+LQor/sjM4ogoy86V++imug==", + "requires": { + "tslib": "^2.0.0" + } + }, "@nodelib/fs.scandir": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz", @@ -42100,14 +42109,6 @@ "tslib": "^2.3.0" } }, - "ngx-matomo-v9": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/ngx-matomo-v9/-/ngx-matomo-v9-0.6.0.tgz", - "integrity": "sha512-nLJC1QDpOB12BJ/kkcKsx+uqiE4I8hWh87cfqRaordhb98ihDrQssusOvQ2sANz2Ujdo7hXAbbtvzQ4DtCssVQ==", - "requires": { - "tslib": "^2.0.0" - } - }, "ngx-webstorage-service": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/ngx-webstorage-service/-/ngx-webstorage-service-4.1.0.tgz", diff --git a/package.json b/package.json index 285113d896a2e3f3acebe19fcc19002881e174f8..c4c662a9393cde1dff3ea345e683ae6d166aaed6 100644 --- a/package.json +++ b/package.json @@ -48,6 +48,7 @@ "@angular/platform-browser": "^14.0.4", "@angular/platform-browser-dynamic": "^14.0.4", "@angular/router": "^14.0.4", + "@ngx-matomo/tracker": "^3.0.0", "@types/pako": "^1.0.1", "@types/sprintf-js": "^1.1.2", "angular2-chartjs": "^0.5.1", @@ -72,7 +73,6 @@ "mermaid": "^8.8.0", "ngx-markdown": "^14.0.1", "ngx-material-file-input": "^4.0.0", - "ngx-matomo-v9": "^0.6.0", "ngx-webstorage-service": "^4.1.0", "pako": "^1.0.11", "primeng": "^14.0.0-rc.1", diff --git a/src/app/app.component.ts b/src/app/app.component.ts index d96808db9988cd9c72d2947065c4ceb81b8f1833..c82cf3c6e5d970ae013aa81f118a2de4418eba62 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -26,7 +26,7 @@ import { decodeHtml } from "./util"; import { HotkeysService, Hotkey } from "angular2-hotkeys"; -import { MatomoInjector, MatomoTracker } from "ngx-matomo-v9"; +import { MatomoTracker } from "@ngx-matomo/tracker"; import { saveAs } from "file-saver"; @@ -90,7 +90,6 @@ export class AppComponent implements OnInit, OnDestroy, Observer { private loadSessionDialog: MatDialog, private confirmCloseCalcDialog: MatDialog, private hotkeysService: HotkeysService, - private matomoInjector: MatomoInjector, private matomoTracker: MatomoTracker ) { ServiceFactory.httpService = httpService; @@ -104,8 +103,6 @@ export class AppComponent implements OnInit, OnDestroy, Observer { this.matomoTracker.disableCookies(); // Set custom dimension for Electron / Cordova / pure Web browser this.matomoTracker.setCustomDimension(1, this.getRunningPlatform()); - // Matomo open-source Web analytics - this.matomoInjector.init("https://stasi.g-eau.fr/", 1); } this.router.events.subscribe((event: Event) => { diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 3bc05ee6f5aade92964f7f2e9556731bbb8f7795..d81af7b4eead0944956b55271706584020ec28f4 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -44,7 +44,7 @@ import { FormsModule, ReactiveFormsModule } from "@angular/forms"; // <-- NgMode import { ChartModule } from "angular2-chartjs"; import { RouterModule, Routes } from "@angular/router"; import { HotkeyModule } from "angular2-hotkeys"; -import { MatomoModule } from "ngx-matomo-v9"; +import { NgxMatomoTrackerModule } from "@ngx-matomo/tracker"; import { FormulaireService } from "./services/formulaire.service"; import { I18nService } from "./services/internationalisation.service"; @@ -170,7 +170,11 @@ const appRoutes: Routes = [ MatToolbarModule, MatTooltipModule, MatExpansionModule, - MatomoModule, + NgxMatomoTrackerModule.forRoot({ + // Matomo open-source Web analytics + siteId: 1, + trackerUrl: "https://stasi.g-eau.fr/" + }), RouterModule.forRoot(appRoutes, { useHash: true, enableTracing: false, diff --git a/src/app/components/app-setup/app-setup.component.ts b/src/app/components/app-setup/app-setup.component.ts index 0124b5cb5ff20f929f37aa1d9e105041ce4c3b7f..3efd4371100c752edf8a6c10e84ca98ff156a5b6 100644 --- a/src/app/components/app-setup/app-setup.component.ts +++ b/src/app/components/app-setup/app-setup.component.ts @@ -8,7 +8,7 @@ import { NgBaseParam } from "../base-param-input/base-param-input.component"; import { ErrorStateMatcher } from "@angular/material/core"; import { MatSnackBar } from "@angular/material/snack-bar"; -import { MatomoTracker } from "ngx-matomo-v9"; +import { MatomoTracker } from "@ngx-matomo/tracker"; @Component({ diff --git a/src/app/components/generic-calculator/calculator.component.ts b/src/app/components/generic-calculator/calculator.component.ts index f3335faf58d23eedb7545662334168ba870288ff..06c2735f6bd9098e41525317badc6a6388942691 100644 --- a/src/app/components/generic-calculator/calculator.component.ts +++ b/src/app/components/generic-calculator/calculator.component.ts @@ -56,7 +56,7 @@ import { FormulairePrebarrage } from "../../formulaire/definition/form-prebarrag import { HotkeysService, Hotkey } from "angular2-hotkeys"; -import { MatomoTracker } from "ngx-matomo-v9"; +import { MatomoTracker } from "@ngx-matomo/tracker"; import { sprintf } from "sprintf-js"; diff --git a/src/app/components/modules-diagram/modules-diagram.component.ts b/src/app/components/modules-diagram/modules-diagram.component.ts index fe9aee01f51c614ce675e02a01b08460aa75d852..c7e5521c7c1f488c59eafc8ad7e2b3f4b7fdd9d8 100644 --- a/src/app/components/modules-diagram/modules-diagram.component.ts +++ b/src/app/components/modules-diagram/modules-diagram.component.ts @@ -31,7 +31,7 @@ import * as mermaid from "mermaid"; import * as SvgPanZoom from "svg-pan-zoom"; -import { MatomoTracker } from "ngx-matomo-v9"; +import { MatomoTracker } from "@ngx-matomo/tracker"; import { fv } from "../../util"; diff --git a/src/app/components/session-properties/session-properties.component.ts b/src/app/components/session-properties/session-properties.component.ts index c46c37e982ee897107482373295a2d2299fee45e..a576831e11857e9fc97638f70c8ece29b8407ccf 100644 --- a/src/app/components/session-properties/session-properties.component.ts +++ b/src/app/components/session-properties/session-properties.component.ts @@ -7,7 +7,7 @@ import { Session } from "jalhyd"; import { KatexOptions } from "ngx-markdown/src/katex-options"; -import { MatomoTracker } from "ngx-matomo-v9"; +import { MatomoTracker } from "@ngx-matomo/tracker"; @Component({ selector: "session-properties",