import { NgModule , Optional } from '@angular/core' ; import { ScreenTrackingService } from './screen-tracking.service' ; import { AngularFireAnalytics } from './analytics' ; import { UserTrackingService } from './user-tracking.service' ; import firebase from 'firebase/compat/app' ; import { VERSION } from '@angular/fire' ; @ NgModule ( { providers : [ AngularFireAnalytics ] } ) export class AngularFireAnalyticsModule { constructor ( analytics , @ Optional ( ) screenTracking , @ Optional ( ) userTracking ) { firebase . registerVersion ( 'angularfire' , VERSION . full , 'analytics-compat' ) ; analytics . app . then ( ( ) => { } ) ; } }