screen_view is not triggered if multiple router-outlets
- 主要言語
- TypeScript
- スター
- 7.8k
- フォーク
- 2.2k
- 平均マージ
- 22時間 28分
- マージ済み PR(30日)
- 6
説明
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
コントリビューションガイド
調査の方向性
まず、app.module で提供される ScreenTrackingService と app.component.html の 2 つの outlet を使って、リンク先の StackBlitz でマスター詳細ナビゲーションを再現します。プライマリナビゲーションと詳細ナビゲーションを比較し、なぜ page-view だけが発行されるのかを特定します。detail-outlet のナビゲーションに対して正しい URL とともに screen_view が発行されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, firebase, typescript
- 領域
- analytics, frontend
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 35/100