Skip to content

Commit dc3be92

Browse files
committed
chore: broken playground example
1 parent 4e00987 commit dc3be92

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: playground/pages/third-parties/google-tag-manager.vue

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ useHead({
66
})
77
88
// composables return the underlying api as a proxy object and the script state
9-
const { dataLayer, then, status } = useScriptGoogleTagManager({
9+
const { proxy, onLoaded, status } = useScriptGoogleTagManager({
1010
id: 'GTM-MNJD4B',
1111
onBeforeGtmStart(gtag) {
1212
gtag('consent', 'default', {
@@ -18,13 +18,13 @@ const { dataLayer, then, status } = useScriptGoogleTagManager({
1818
})
1919
},
2020
}) // id is set via runtime config
21-
dataLayer.push({
21+
proxy.dataLayer.push({
2222
event: 'page_view',
2323
page_title: 'Google Analytics',
2424
page_location: 'https://harlanzw.com/third-parties/google-analytics',
2525
page_path: '/third-parties/google-analytics',
2626
})
27-
then(({ google_tag_manager, dataLayer }) => {
27+
onLoaded(({ google_tag_manager, dataLayer }) => {
2828
// eslint-disable-next-line no-console
2929
console.log('google_tag_manager is ready', google_tag_manager)
3030
// eslint-disable-next-line no-console

0 commit comments

Comments
 (0)