mirror of
https://github.com/geekgeekrun/geekgeekrun.git
synced 2026-09-05 15:38:46 +08:00
enhance page_view gtag
This commit is contained in:
@@ -157,7 +157,10 @@ router.afterEach((to, from) => {
|
||||
from_path: from.fullPath,
|
||||
to_path: to.fullPath
|
||||
})
|
||||
gtagRenderer('page_view')
|
||||
gtagRenderer('page_view', {
|
||||
page_location: location.href,
|
||||
page_title: document.title
|
||||
})
|
||||
})
|
||||
|
||||
export default router
|
||||
|
||||
@@ -4,8 +4,6 @@ export function gtagRenderer(name, params: any = null) {
|
||||
name,
|
||||
params: {
|
||||
...(params ?? {}),
|
||||
page_location: location.href,
|
||||
page_title: document.title,
|
||||
screen_w: window.screen?.width ?? null,
|
||||
screen_h: window.screen?.height ?? null,
|
||||
screen_dpr: window.devicePixelRatio
|
||||
|
||||
Reference in New Issue
Block a user