Commit b664009a authored by Klaus-Dieter Quibeldey-Cirkel's avatar Klaus-Dieter Quibeldey-Cirkel
Browse files

Merge branch '366-web-analytics-with-matomo' into 'master'

implemented matomo with the ngx-matomo package

Closes #366

See merge request arsnova/frag.jetzt!348
parents 7d3b5ede dad446b4
......@@ -9451,6 +9451,11 @@
"prismjs": "^1.16.0"
}
},
"ngx-matomo": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/ngx-matomo/-/ngx-matomo-0.1.4.tgz",
"integrity": "sha512-AKZMnJGyytZqAxuSh+k/AulyQhgqlnnsmtkfvHMJyNuh5g+wVpIbwac36RyeFU3El6INgZVso2CCLElV3bQnBQ=="
},
"nice-try": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
......
......@@ -4,6 +4,8 @@ import { SwUpdate } from '@angular/service-worker';
import { NotificationService } from './services/util/notification.service';
import { Rescale } from './models/rescale';
import { CustomIconService } from './services/util/custom-icon.service';
import { MatomoInjector } from 'ngx-matomo';
import { environment } from '../environments/environment';
@Component({
selector: 'app-root',
......@@ -16,11 +18,13 @@ export class AppComponent implements OnInit {
constructor(private translationService: TranslateService,
private update: SwUpdate,
private matomoInjector: MatomoInjector,
public notification: NotificationService,
private customIconService: CustomIconService) {
translationService.setDefaultLang(this.translationService.getBrowserLang());
sessionStorage.setItem('currentLang', this.translationService.getBrowserLang());
customIconService.init();
if (environment.name === 'prod') { this.matomoInjector.init('https://arsnova.thm.de/stats/', 6); }
}
public static rescale: Rescale = new Rescale();
......
......@@ -61,6 +61,7 @@ import { QrCodeDialogComponent } from './components/shared/_dialogs/qr-code-dial
import { MatIconModule } from '@angular/material/icon';
import { HttpClientModule } from '@angular/common/http';
import { RemoveFromHistoryComponent } from './components/shared/_dialogs/remove-from-history/remove-from-history.component';
import { MatomoModule } from 'ngx-matomo';
export function dialogClose(dialogResult: any) {
}
......@@ -99,6 +100,7 @@ export function initializeApp(appConfig: AppConfig) {
OverlayComponent
],
imports: [
MatomoModule,
AppRoutingModule,
BrowserModule,
BrowserAnimationsModule,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment