diff --git a/examples/with-google-tag-manager/lib/gtm.js b/examples/with-google-tag-manager/lib/gtm.js index 7044f1aa8389d..299c4aa7b8d8c 100644 --- a/examples/with-google-tag-manager/lib/gtm.js +++ b/examples/with-google-tag-manager/lib/gtm.js @@ -1,7 +1,7 @@ export const GTM_ID = process.env.NEXT_PUBLIC_GOOGLE_TAG_MANAGER_ID export const pageview = (url) => { - window.dataLayer({ + window.dataLayer.push({ event: 'pageview', page: url, })