From 55ab5062de4855a2652c93e355eb049b2345e90b Mon Sep 17 00:00:00 2001 From: Michael Schramm Date: Mon, 1 Jun 2020 23:35:45 +0200 Subject: [PATCH] fix installation registration --- src/service/installation.metrics.service.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/service/installation.metrics.service.ts b/src/service/installation.metrics.service.ts index 8257f95..1b24059 100644 --- a/src/service/installation.metrics.service.ts +++ b/src/service/installation.metrics.service.ts @@ -12,13 +12,16 @@ export class InstallationMetricsService implements OnApplicationBootstrap { } async onApplicationBootstrap(): Promise { - const tracker = new MatomoTracker(1, this.host) + const tracker = new MatomoTracker(2, this.host) tracker.on('error', () => { - this.logger.error('failed to register instance') + this.logger.error('failed to add installation metrics') }) + this.logger.info('try to add installation metrics') + tracker.track({ + url: `http://localhost/version/${process.env.npm_package_version}`, // eslint-disable-next-line @typescript-eslint/camelcase action_name: 'startup', ua: process.arch