Analytics

This commit is contained in:
Unknown 2018-05-14 17:14:21 +01:00 committed by Thomas Bloor
parent 673d481cac
commit 5bf608585e
4 changed files with 33 additions and 6 deletions

View file

@ -1,3 +1,5 @@
import { environment } from '../environments/environment';
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { LocationStrategy, HashLocationStrategy } from '@angular/common';
@ -38,6 +40,8 @@ import { P500Component } from './pages/500.component';
import { AuthModule } from './auth/auth.module';
import { DashboardModule } from './dashboard/dashboard.module';
@NgModule({
imports: [
BrowserModule,
@ -78,4 +82,10 @@ import { DashboardModule } from './dashboard/dashboard.module';
],
bootstrap: [ AppComponent ]
})
export class AppModule { }
export class AppModule {
constructor () {
if (environment.enableAnalytics) {
(<any>window).ga('create', environment.analyticsKey, 'auto');
}
}
}