mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-02 22:37:32 +00:00
fix: align gtm page view payload
This commit is contained in:
@@ -36,15 +36,14 @@ function getBasePath(): string {
|
||||
|
||||
const basePath = getBasePath()
|
||||
|
||||
function pushPageView(to: RouteLocationNormalized): void {
|
||||
function pushPageView(): void {
|
||||
if (!isCloud) return
|
||||
|
||||
const dataLayer = window.dataLayer ?? (window.dataLayer = [])
|
||||
dataLayer.push({
|
||||
event: 'page_view',
|
||||
page_location: window.location.href,
|
||||
page_title: document.title,
|
||||
page_path: to.fullPath
|
||||
page_title: document.title
|
||||
})
|
||||
}
|
||||
|
||||
@@ -105,8 +104,8 @@ installPreservedQueryTracker(router, [
|
||||
}
|
||||
])
|
||||
|
||||
router.afterEach((to) => {
|
||||
pushPageView(to)
|
||||
router.afterEach(() => {
|
||||
pushPageView()
|
||||
})
|
||||
|
||||
if (isCloud) {
|
||||
|
||||
Reference in New Issue
Block a user