-
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
$gtm is undefined #32
Comments
Did you try using the built in option for disabling the plugin in development mode? // nuxt.config.js
{
buildModules: [
'@nuxtjs/gtm',
],
gtm: {
id: 'GTM-XXXXXXX' // your actual id
dev: false // << this here
}
} |
I have same issue. |
Sorry, I can use $gtm to set |
I have same issue with dev set to false
|
@pi0 thank you so much for this! Console logs are also very useful. |
@pi0 Should I be setting enabled to true in production mode? |
any update ? |
I just moved from the previous google-tag-manager nuxt plugin to this one and stumbled on a significant problem:
In development mode I don't intend to use the gtm plugin, so I load it with a bogus ID (
GTM-XXXXX
). This is causing me a lot of problems in the moment I try to trigger custom events where the plugin breaks the whole application, with the error:is there a solution to this that doesn't mean to fence all calls with a check if
$gtm
is defined?[edit] this is not happening with the old module
The text was updated successfully, but these errors were encountered: