refactor(router): 将XSTAT.trackNewPage移到router.afterEach中
将XSTAT.trackNewPage从router.beforeEach移动到router.afterEach,以确保页面加载完成后再进行跟踪,提高统计数据的准确性。
This commit is contained in:
2
dist/index.html
vendored
2
dist/index.html
vendored
@@ -1,4 +1,4 @@
|
|||||||
<!doctype html><html lang=""><head><meta charset="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><meta name="viewport" content="width=device-width,initial-scale=1"/><link rel="icon" href="https://ansnid.oss-cn-shenzhen.aliyuncs.com/fang/favicon.ico"/><title>港校租房</title><script defer="defer" src="https://ansnid.oss-cn-shenzhen.aliyuncs.com/fang/js/chunk-vendors.6d96b969.js"></script><script defer="defer" src="https://ansnid.oss-cn-shenzhen.aliyuncs.com/fang/js/app.bd24a19a.js"></script><link href="https://ansnid.oss-cn-shenzhen.aliyuncs.com/fang/css/chunk-vendors.7885d77e.css" rel="stylesheet"><link href="https://ansnid.oss-cn-shenzhen.aliyuncs.com/fang/css/app.5341a9f0.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but zufang doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><script src="https://app.gter.net/bottom?tpl=header&menukey=fang"></script><div id="app"></div><div style="display: none;"><script>var _hmt = _hmt || []
|
<!doctype html><html lang=""><head><meta charset="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><meta name="viewport" content="width=device-width,initial-scale=1"/><link rel="icon" href="https://ansnid.oss-cn-shenzhen.aliyuncs.com/fang/favicon.ico"/><title>港校租房</title><script defer="defer" src="https://ansnid.oss-cn-shenzhen.aliyuncs.com/fang/js/chunk-vendors.6d96b969.js"></script><script defer="defer" src="https://ansnid.oss-cn-shenzhen.aliyuncs.com/fang/js/app.e2006f78.js"></script><link href="https://ansnid.oss-cn-shenzhen.aliyuncs.com/fang/css/chunk-vendors.7885d77e.css" rel="stylesheet"><link href="https://ansnid.oss-cn-shenzhen.aliyuncs.com/fang/css/app.5341a9f0.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but zufang doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><script src="https://app.gter.net/bottom?tpl=header&menukey=fang"></script><div id="app"></div><div style="display: none;"><script>var _hmt = _hmt || []
|
||||||
;(function () {
|
;(function () {
|
||||||
var hm = document.createElement("script")
|
var hm = document.createElement("script")
|
||||||
hm.src = "//hm.baidu.com/hm.js?4bd66cbe45a640b607fe46c48f658746"
|
hm.src = "//hm.baidu.com/hm.js?4bd66cbe45a640b607fe46c48f658746"
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -166,10 +166,11 @@ router.beforeEach((to, from, next) => {
|
|||||||
// window._czc.push(["_trackPageview", contentUrl, refererUrl])
|
// window._czc.push(["_trackPageview", contentUrl, refererUrl])
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
XSTAT.trackNewPage()
|
|
||||||
})
|
})
|
||||||
|
|
||||||
router.afterEach(() => {
|
router.afterEach(() => {
|
||||||
NProgress.done(true);
|
NProgress.done(true);
|
||||||
|
|
||||||
|
XSTAT.trackNewPage()
|
||||||
})
|
})
|
||||||
export default router
|
export default router
|
||||||
|
|||||||
Reference in New Issue
Block a user