File tree Expand file tree Collapse file tree 1 file changed +0
-25
lines changed Expand file tree Collapse file tree 1 file changed +0
-25
lines changed Original file line number Diff line number Diff line change 1
1
import { Component } from '@angular/core' ;
2
- import { environment } from '../environments/environment' ;
3
-
4
- declare let ga : Function ;
5
2
6
3
@Component ( {
7
4
selector : 'app-root' ,
8
5
templateUrl : './app.component.html' ,
9
6
styleUrls : [ './app.component.css' ]
10
7
} )
11
8
export class AppComponent {
12
- ga = null ;
13
- gaTrackId = '' ;
14
9
mobileNavSection = 'home' ;
15
10
parentSections = [ ] ;
16
11
17
12
constructor ( ) {
18
-
19
- // Avoid google analytics for dev and testing unless explicitly indicated
20
- if ( environment . production && window . location . host === 'hpo.jax.org' ) {
21
- this . gaTrackId = environment . HPO_GOOGLE_ANALYTICS_TRACKING_ID ;
22
-
23
- } else if ( ! environment . production && environment . HPO_ENABLE_GA_TEST ) {
24
- this . gaTrackId = environment . HPO_GOOGLE_ANALYTICS_TEST_TRACKING_ID ;
25
- }
26
-
27
- if ( this . gaTrackId . length > 0 ) {
28
- ga ( 'create' , this . gaTrackId , 'auto' ) ;
29
-
30
- // Only require the plugins you've imported above.
31
- ga ( 'require' , 'eventTracker' ) ;
32
- ga ( 'require' , 'outboundLinkTracker' ) ;
33
- ga ( 'require' , 'urlChangeTracker' ) ;
34
- ga ( 'require' , 'cleanUrlTracker' ) ;
35
-
36
- ga ( 'send' , 'pageview' ) ;
37
- }
38
13
}
39
14
40
15
backNavigate ( ) {
You can’t perform that action at this time.
0 commit comments