angularfire icon indicating copy to clipboard operation
angularfire copied to clipboard

screen_view is not triggered if multiple router-outlets

Open elinake opened this issue 3 years ago • 1 comments

I'm using ion-split-pane in my project to follow master-detail pattern, in which you place two router-outlets on your app.component.html and then you can navigate separately on each side of the view. An example of this pattern is here: https://ionic-angular-v5-cduaar.stackblitz.io

I have ScreenTrackingService in providers of the app.module. When I navigate in the main router-outlet, "screen-view" and "page-view" events are fired.

Processing data layer push: {event: "gtm.historyChange-v2", gtm.oldUrl: "http://localhost:4200/master-1", gtm.newUrl: 
"http://localhost:4200/master-2", gtm.triggers: "1_30"}

Processing GTAG command: ["event", "screen_view", { page_path: "/master-2", outlet: "primary" ...etc }]

When I navigate in the detail router-outlet, only "page-view" event is fired. There I can see that it has the correct url, but screen-view event is not fired.

Processing data layer push: {event: "gtm.historyChange-v2", gtm.oldUrl: "http://localhost:4200/detail-1", gtm.newUrl: 
"http://localhost:4200/detail-2", gtm.triggers: "1_30"}

Versions: Angular: 12.2.0 Ionic/angular: 5.7.0 firebase: 9.6.6 angular/fire: 7.2.1

elinake avatar Feb 22 '22 13:02 elinake

This issue does not seem to follow the issue template. Make sure you provide all the required information.

google-oss-bot avatar Feb 22 '22 13:02 google-oss-bot