@@ -10,7 +10,6 @@ import { environment } from './environments/environment';
10
10
import { AppConfig } from './config/app-config.interface' ;
11
11
import { extendEnvironmentWithAppConfig } from './config/config.util' ;
12
12
import { enableProdMode } from '@angular/core' ;
13
- import { matomoSettings } from './matomo/matomo-settings' ;
14
13
15
14
const bootstrap = ( ) => platformBrowserDynamic ( )
16
15
. bootstrapModule ( BrowserAppModule , { } ) ;
@@ -27,8 +26,8 @@ const main = () => {
27
26
if ( environment . production ) {
28
27
enableProdMode ( ) ;
29
28
}
30
- addMatomoStatistics ( ) ;
31
29
30
+ addMatomoStatistics ( ) ;
32
31
if ( hasTransferState ) {
33
32
// Configuration will be taken from transfer state during initialization
34
33
return bootstrap ( ) ;
@@ -48,15 +47,15 @@ function addMatomoStatistics() {
48
47
( window as any ) . _paq = ( window as any ) . _paq || [ ] ;
49
48
50
49
// Push all configuration commands first
51
- ( window as any ) . _paq . push ( [ 'setTrackerUrl' , matomoSettings . hostUrl + 'matomo.php' ] ) ;
52
- ( window as any ) . _paq . push ( [ 'setSiteId' , matomoSettings . siteId ] ) ;
50
+ ( window as any ) . _paq . push ( [ 'setTrackerUrl' , environment . matomo . hostUrl + 'matomo.php' ] ) ;
51
+ ( window as any ) . _paq . push ( [ 'setSiteId' , environment . matomo . siteId ] ) ;
53
52
( window as any ) . _paq . push ( [ 'enableLinkTracking' ] ) ;
54
53
55
54
const g = document . createElement ( 'script' ) ;
56
55
g . type = 'text/javascript' ;
57
56
g . async = true ;
58
57
g . defer = true ;
59
- g . src = matomoSettings . hostUrl + 'matomo.js' ;
58
+ g . src = environment . matomo . hostUrl + 'matomo.js' ;
60
59
document . getElementsByTagName ( 'head' ) [ 0 ] . appendChild ( g ) ;
61
60
}
62
61
0 commit comments