Skip to content
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

enabled option does not work #26

Open
Fukao0129 opened this issue Feb 20, 2024 · 2 comments
Open

enabled option does not work #26

Fukao0129 opened this issue Feb 20, 2024 · 2 comments

Comments

@Fukao0129
Copy link

The "enabled" option seems not to work.

nuxt.config.ts

  modules: [
   "@zadigetvoltaire/nuxt-gtm"
  ],
  gtm: {
    id: my-id,
    enabled: false
  },

Even with the above settings, tags are still being delivered from Google Tag Manager.
Something wrong?

@zadigetvoltaire/nuxt-gtm0.0.13
node 18.18.2
npm 9.8.1
vue 3.3.8
nuxt 3.8.2

@gmenunes
Copy link

Had the same issue.

@Fukao0129
Copy link
Author

Fukao0129 commented Jun 26, 2024

I haven't resolved this issue yet, but I came up with an alternative solution.
After adding an environment variable to indicate whether the server is a localhost or not, make the following change.

  modules: [
    process.env.APP_ENV === "local" ? "" : "@zadigetvoltaire/nuxt-gtm",
  ],

This seems to be working well so far.
However, this is not a fundamental solution, so I will continue to wait for support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants