【发布时间】:2017-09-07 23:27:14
【问题描述】:
我已经在 index.html 文件中包含了javascript代码并删除了
行ga('send', 'pageview');
在我的应用组件中,我做了
declare const ga: any;
我已经把这段代码放在了构造函数中
constructor(public router: Router,activatedRoute: ActivatedRoute) {
router.events.filter(e => e instanceof NavigationEnd).subscribe((event:Event) => {
if(event instanceof NavigationEnd ){
console.log(event);
ga('send', 'pageview', event.urlAfterRedirects);
}
});
}
扩展显示发送已完成。 Tag Assistant ; GA Debug
毕竟,我的谷歌分析仪表板上没有显示任何内容。
【问题讨论】:
-
您在查看 GA 中的实时报告吗?标准报告最多可能需要 48 小时才能显示数据。