-
Notifications
You must be signed in to change notification settings - Fork 45
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
Comments
Hi, thanks for the issue. You should understand that Nuxt Scripts's performance optimizations are micro at best, they just allow Nuxt to start before loading in other scripts. The fact is you're still loading in 104kb of scripts just for GTM, for reference Nuxt itself is only like ~50kb iirc. My suggestion is to drop GTM if you're only using it as a container for GA, then wait for either one of these that will provide significant improvements: |
Ok, thanks for clearing that up @harlan-zw. I ended up implementing partytown instead of @nuxt/scripts but will look forward to it being embedded. |
@ejerskov Can you tell me the specific implementation details of partytown? As far as I know, |
📚 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:
I've done the simple implementation of adding this in my App.vue:
GTM:
Google Analytics:
Have I misunderstood the concept of this package?
🔍 What have you tried?
No response
ℹ️ Additional context
No response
The text was updated successfully, but these errors were encountered: