-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for Nuxt 3 #152
Comments
Would be very appreciated indeed. Any alternative until the release of a compatible version ? |
import { createGtm } from '@gtm-support/vue-gtm'
export default defineNuxtPlugin((nuxtApp) => {
if (useRuntimeConfig().public.appEnv !== 'production') return
nuxtApp.vueApp.use(createGtm({
id: 'GTM-???????',
defer: false,
compatibility: false,
enabled: true,
debug: true,
loadScript: true,
vueRouter: useRouter(),
trackOnNextTick: false,
}))
}) |
Amazing, thanks @acidjazz I wasn't expecting anything anymore from this thread but what a great surprise on this monday morning ! Have a nice day 🌞 |
no problem! make sure its client only: |
After install |
Are anyone working on this? |
We have been using this implementation, but the vue-gtm seems only to add the script in the body, en not in the head. Data is received, but not everything is working correctly in GTM. Seems that the script needs to be added to the head as well. Anybody else had this before? |
modules: [ it's working fine |
Are you sure it's GTM? Just checking as this suggests otherwise: johannschopplich/nuxt-gtag#13 |
I have made a drop in replacement for this module - https://www.npmjs.com/package/gtm-nuxt3 |
Hi,
It seems this plugin doesn't work on Nuxt 3 (
v3.0.0-rc.1
)When I run
npm run dev
it saysCannot start nuxt: Invalid Version: null
My
nuxt.config.ts
:Is there any workaround for that or do you planning on updating the plugin to work with Nuxt 3?
Thanks!
The text was updated successfully, but these errors were encountered: