screen_view is not triggered if multiple router-outlets
- Langage dominant
- TypeScript
- Étoiles
- 7.8k
- Forks
- 2.2k
- Merge moyen
- 22 h 28 min
- PR mergées (30 j)
- 6
Description
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
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par reproduire la navigation maître-détail dans le StackBlitz lié, avec ScreenTrackingService fourni dans app.module et deux outlets dans app.component.html. Comparez la navigation principale et la navigation de détail, puis déterminez pourquoi seul page-view est émis ; le travail est terminé lorsque screen_view est émis pour la navigation du detail-outlet avec l’URL correcte.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- angular, firebase, typescript
- Domaine
- analytics, frontend
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 35/100