This commit is contained in:
A1300399510
2023-08-09 11:51:41 +08:00
parent e56dcd4ca7
commit 497b50f7c8
4 changed files with 50 additions and 19 deletions

View File

@@ -140,6 +140,21 @@ router.beforeEach((to, from, next) => {
let meta = to['meta'] || {}
let title = meta['title']
if (title) setSeoTitle(title)
if (window._hmt) {
if (to.path) {
window._hmt.push(['_trackPageview', '/#' + to.fullPath])
}
}
if (window._czc) {
let location = window.location
let contentUrl = location.pathname + location.hash
let refererUrl = "/"
// 用于发送某个URL的PV统计请求
window._czc.push(["_trackPageview", contentUrl, refererUrl])
}
})
router.afterEach(() => {