Skip to content

Commit 64e5a55

Browse files
committed
feat: improve nuxt scripts GA example
1 parent 60a370f commit 64e5a55

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

app/app.vue

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,11 @@ useHead({
1010
})
1111
1212
// Uncomment and adjust when you need Google Analytics
13-
// const { onLoaded, proxy } = useScriptGoogleAnalytics(
14-
// { id: 'G-1234567' },
15-
// { trigger: 'manual' }
13+
// const { load } = useScriptGoogleAnalytics(
14+
// { id: 'G-1234567', scriptOptions: { trigger: 'manual' } },
1615
// )
17-
// // send events
18-
// proxy.gtag('config', 'UA-123456789-1')
19-
// // ..
20-
// onLoaded(() => {
21-
// // script loaded
22-
// })
16+
17+
// load()
2318
</script>
2419

2520
<template>

0 commit comments

Comments
 (0)