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