diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 4210b7cdb6..5245290cf0 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -9,7 +9,6 @@ import { PlatformService } from 'src/app/site-common/platform.service'; import { environment } from '../environments/environment'; import { LayoutComponent } from './layout/layout.component'; import { SiteMetaService } from './site-common/site-meta.service'; -import { TrackService } from './site-common/track.service'; import { filter, pairwise, startWith } from 'rxjs'; declare const gtag: ( @@ -28,7 +27,6 @@ export class AppComponent implements OnInit { private router = inject(Router); private platformService = inject(PlatformService); private siteMetaService = inject(SiteMetaService); - private trackService = inject(TrackService); ngOnInit() { this.router.events @@ -50,9 +48,6 @@ export class AppComponent implements OnInit { ) .subscribe((events) => { if (!this.platformService.isServer && environment.production) { - this.trackService.sendTrack( - (events[0] as NavigationEnd | null)?.url || '', - ); gtag('event', 'page_view', { page_path: (events[1] as NavigationEnd | null)?.url || '', }); diff --git a/src/app/site-common/track.service.ts b/src/app/site-common/track.service.ts deleted file mode 100644 index 2f913b85c8..0000000000 --- a/src/app/site-common/track.service.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { HttpClient } from '@angular/common/http'; -import { Injectable, inject } from '@angular/core'; -import { environment } from 'src/environments/environment'; -import { catchError, of } from 'rxjs'; - -@Injectable({ - providedIn: 'root', -}) -export class TrackService { - private http = inject(HttpClient); - - sendTrack(referrer = '') { - const trackUrl = environment.trackUrl; - if (trackUrl) { - this.http - .post(trackUrl, { - url: document.location.href, - referrer: referrer || document.referrer, - }) - .pipe(catchError(() => of())) - .subscribe(); - } - } -} diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts index a625b3a258..22dcf17074 100644 --- a/src/environments/environment.prod.ts +++ b/src/environments/environment.prod.ts @@ -1,5 +1,4 @@ export const environment = { production: true, url: '', - trackUrl: 'https://mike-dashboard.azurewebsites.net/api/wt?code=AsqZnNWtZj90MnA1eufWnBNSFshKcyG_YNPKTHMaIkQkAzFuwRDbRg==' }; diff --git a/src/environments/environment.ts b/src/environments/environment.ts index e97cc98cce..54dbac7f7c 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -5,7 +5,6 @@ export const environment = { production: false, url: '', - trackUrl: '' }; /*