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

No performance gain using GTM / Google Analytics #272

Open
ejerskov opened this issue Sep 18, 2024 · 1 comment
Open

No performance gain using GTM / Google Analytics #272

ejerskov opened this issue Sep 18, 2024 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@ejerskov
Copy link

📚 What are you trying to do?

As I understand it, @nuxt/script should give better performance using the embedded third-party scripts.

However when I use GTM or GoogleAnalytics I see the same hit in PageSpeed reports as using the "vanilla" scripts:
image

I've done the simple implementation of adding this in my App.vue:
GTM:

useScriptGoogleTagManager({
  id: 'GTM-WHHKRNTJ',
})

Google Analytics:

useScriptGoogleAnalytics({
  id: 'G-0HXKBMGTW0',
})

Have I misunderstood the concept of this package?

🔍 What have you tried?

No response

ℹ️ Additional context

No response

@ejerskov ejerskov added the help wanted Extra attention is needed label Sep 18, 2024
@melasculla
Copy link

melasculla commented Sep 18, 2024

image

image

for me the same

$production: {
    scripts: {
      registry: {
        googleTagManager: {
          scriptOptions: {
            tagPosition: 'bodyClose',
          },
          id: id,
        }
      }
    }
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants