angular / angular/angularfire

screen_view is not triggered if multiple router-outlets

Abierto
#3,168 1 comentario 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
TypeScript
Estrellas
7.8k
Forks
2.2k
Merge medio
22 h 28 min
PR fusionados (30 d)
6

Descripción

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

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza reproduciendo la navegación maestro-detalle en el StackBlitz enlazado, con ScreenTrackingService proporcionado en app.module y dos outlets en app.component.html. Compara la navegación principal y la de detalle, y determina por qué solo se emite page-view; se considerará terminado cuando se emita screen_view para la navegación del detail-outlet con la URL correcta.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
angular, firebase, typescript
Área
analytics, frontend
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.