PageSpeed Insights Issue
See original GitHub issueHey everyone, improved page speed on a project today but one issue seems to be difficult to solve. I’m using the awesome nuxt GTM module and loading it like this from nuxt.config.js:
gtm: {
id: '<my-ID>',
pageTracking: true
}
Google Pagespeed Insights tells me under “Remove unused JavaScript” the following items:
/gtm.js?id=<my-ID>(www.googletagmanager.com) | 26.2 KB | 12.5 KB
/analytics.js(www.google-analytics.com) | 18.6 KB | 6.7 KB
Is this caused by gtm module (which I don’t think) or by GTM / Analytics / Pagespeed Insights itself?
Maybe you can help me, thank you very much in advance and I really appreciate it!
Issue Analytics
- State:
- Created 3 years ago
- Reactions:11
- Comments:6
Top Results From Across the Web
PageSpeed Insights
Make your web pages fast on all devices ; More on PageSpeed InsightsWhat's newDocumentationLearn about Web PerformanceAsk questions on Stack OverflowMailing list.
Read more >How do I resolve Google PageSpeed Insight errors?
Eliminate render-blocking JavaScript and CSS in above-the-fold content: Your page has 1 blocking CSS resource. This causes a delay in rendering your page....
Read more >Pagespeed insights page stuck on "Running performance ...
I've tried running a pagespeed insight analysis on a webpage and it's been stuck on "Running performance analysis" for a long time (>15...
Read more >Google PageSpeed Insights: The Truth About Scoring 100/100
The reality is that Google does use PageSpeed Insights to determine rankings – kind of. Site speed is a ranking factor, plain and...
Read more >Frequently Asked Questions | PageSpeed Insights
The PageSpeed Insights tools help you diagnose speed and mobilization issues with your site. Updated Nov 3, 2022.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@bart have you tried setting the
scriptDefer
totrue
? This should hold the loading of the GTM script until all other scripts are ready. It works for me.And since I also enabled
pageTracking
. In GTM i also make sure the tag is fired during the “nuxtRoute” custom event instead of the standard “Page View”.Here’s my settings btw:
Hey @rizkysyazuli Its works, Thank you!, Just we need to add “pageTracking: true”