You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It caused me quite a headache and cost me a lot of time, but the way that this module breaks Nuxt's head functionality should be addressed urgently. It resets settings intentionally:
console.warn('[@nuxtjs/gtm] head is provided as a function which is not supported by this module at the moment. Removing user-provided head.')
But: Not everybody checks their server console when the browser console output is pretty accurate every time; and some people are even slowed down on checking the server console due to corporate access restrictions, or only use static builds and never see an error, they only see the program misbehaving...let's not talk about use-cases, there are plenty.
To reproduce:
I've simply installed both @nuxtjs/gtm and the module @nuxtjs/i18n and enabled SEO attribute generation (a pretty common functionality to enable) according to the manual. It doesn't have to be this module, it breaks as soon as you want a bit of dynamic code to fill your head setting (using a function instead of an object).
I'm trying some stuff to fix this, but until there is an official bugfix, any workaround would be decent.
The text was updated successfully, but these errors were encountered:
@gekkedev I think I've found the solution. I've replaced the head() function inside nuxt.config.js by a head object with only the static tags. And I've moved all the dynamic ones (especially i18n) to a head() function inside the layouts/default.vue file.
Issue
It caused me quite a headache and cost me a lot of time, but the way that this module breaks Nuxt's
head
functionality should be addressed urgently. It resets settings intentionally:gtm-module/lib/module.js
Line 86 in ae9199e
Indeed, there is a warning:
gtm-module/lib/module.js
Line 85 in ae9199e
But: Not everybody checks their server console when the browser console output is pretty accurate every time; and some people are even slowed down on checking the server console due to corporate access restrictions, or only use static builds and never see an error, they only see the program misbehaving...let's not talk about use-cases, there are plenty.
To reproduce:
I've simply installed both
@nuxtjs/gtm
and the module@nuxtjs/i18n
and enabled SEO attribute generation (a pretty common functionality to enable) according to the manual. It doesn't have to be this module, it breaks as soon as you want a bit of dynamic code to fill yourhead
setting (using a function instead of an object).I'm trying some stuff to fix this, but until there is an official bugfix, any workaround would be decent.
The text was updated successfully, but these errors were encountered: