Skip to content

Commit

Permalink
removing ga tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
iimpulse committed May 23, 2024
1 parent ae12be9 commit 4c18bbd
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,40 +1,15 @@
import {Component} from '@angular/core';
import {environment} from '../environments/environment';

declare let ga: Function;

@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
ga = null;
gaTrackId = '';
mobileNavSection = 'home';
parentSections = [];

constructor() {

// Avoid google analytics for dev and testing unless explicitly indicated
if (environment.production && window.location.host === 'hpo.jax.org') {
this.gaTrackId = environment.HPO_GOOGLE_ANALYTICS_TRACKING_ID;

} else if (!environment.production && environment.HPO_ENABLE_GA_TEST) {
this.gaTrackId = environment.HPO_GOOGLE_ANALYTICS_TEST_TRACKING_ID;
}

if (this.gaTrackId.length > 0) {
ga('create', this.gaTrackId, 'auto');

// Only require the plugins you've imported above.
ga('require', 'eventTracker');
ga('require', 'outboundLinkTracker');
ga('require', 'urlChangeTracker');
ga('require', 'cleanUrlTracker');

ga('send', 'pageview');
}
}

backNavigate() {
Expand Down

0 comments on commit 4c18bbd

Please sign in to comment.