Revision 61416
Added by John Balasis almost 3 years ago
app.component.ts | ||
---|---|---|
2 | 2 |
import { NavigationEnd, Router, RoutesRecognized } from '@angular/router'; |
3 | 3 |
import { AuthenticationService } from './services/authentication.service'; |
4 | 4 |
import { environment } from '../environments/environment'; |
5 |
import { MatomoInjector, MatomoTracker } from 'ngx-matomo';
|
|
5 |
import { MatomoTracker } from 'ngx-matomo'; |
|
6 | 6 |
import { ConfirmationDialogComponent } from './shared/reusablecomponents/confirmation-dialog.component'; |
7 | 7 |
import { RepositoryService } from './services/repository.service'; |
8 | 8 |
import { RepositorySnippet } from './domain/typeScriptClasses'; |
... | ... | |
34 | 34 |
|
35 | 35 |
constructor(private router: Router, |
36 | 36 |
private authService: AuthenticationService, |
37 |
private matomoInjector: MatomoInjector, |
|
38 | 37 |
private matomoTracker: MatomoTracker, |
39 | 38 |
private repositoryService: RepositoryService, |
40 | 39 |
private fb: FormBuilder) { |
41 | 40 |
|
42 | 41 |
console.log('21-06-2019. Fixed matomo to log userIds?'); |
43 | 42 |
|
44 |
let piwikUrl; |
|
45 |
if (window.location.origin.includes('beta')) { |
|
46 |
// piwikUrl = 'https://analytics.openaire.eu/piwik.php?idsite=92&rec=1'; |
|
47 |
piwikUrl = '92'; |
|
48 |
} else if (window.location.origin.includes('localhost:4200') || |
|
49 |
window.location.origin.includes('athenarc')) { |
|
50 |
// piwikUrl = 'https://analytics.openaire.eu/piwik.php?idsite=92&rec=1'; |
|
51 |
piwikUrl = '9222222'; |
|
52 |
} else { |
|
53 |
// piwikUrl = 'https://analytics.openaire.eu/piwik.php?idsite=111&rec=1'; |
|
54 |
piwikUrl = '111'; |
|
55 |
} |
|
56 |
this.matomoInjector.init('https://analytics.openaire.eu/', piwikUrl); |
|
57 |
|
|
58 | 43 |
/*disabling console.log in production*/ |
59 | 44 |
if ( environment.production === true ) { |
60 | 45 |
console.log = function () {}; |
Also available in: Unified diff