@@ -47,13 +47,12 @@ export class ScreenTrackingService implements OnDestroy {
47
47
const ret = new Array < Promise < void > > ( ) ;
48
48
if ( automaticallyLogScreenViews !== false ) {
49
49
if ( component ) {
50
- const screen_class = component . hasOwnProperty ( 'name' ) && ( component as any ) . name || component . toString ( ) ;
51
- ret . push ( analytics . logEvent ( "screen_view" , { app_name, screen_class , app_version, screen_name, outlet, url } ) ) ;
50
+ const firebase_screen_class = component . hasOwnProperty ( 'name' ) && ( component as any ) . name || component . toString ( ) ;
51
+ ret . push ( analytics . logEvent ( "screen_view" , { app_name, firebase_screen_class , app_version, screen_name, outlet, url } ) ) ;
52
52
} else if ( activationEnd . snapshot . routeConfig && activationEnd . snapshot . routeConfig . loadChildren ) {
53
53
ret . push ( ( activationEnd . snapshot . routeConfig . loadChildren as any ) ( ) . then ( ( child :any ) => {
54
- const screen_class = child . name ;
55
- console . log ( "logEvent" , "screen_view" , { app_name, screen_class, app_version, screen_name, outlet, url } ) ;
56
- return analytics . logEvent ( "screen_view" , { app_name, screen_class, app_version, screen_name, outlet, url } ) ;
54
+ const firebase_screen_class = child . name ;
55
+ return analytics . logEvent ( "screen_view" , { app_name, firebase_screen_class, app_version, screen_name, outlet, url } ) ;
57
56
} ) ) ;
58
57
} else {
59
58
ret . push ( analytics . logEvent ( "screen_view" , { app_name, app_version, screen_name, outlet, url } ) ) ;
0 commit comments