Thanks for reaching out @lukascech. Firstly with regards the “Unused JavaScript” opportunity you see within PageSpeed Insights, this is normal if you’re using JavaScript libraries such as Google Analytics or any third party JavaScript Resource. It can appear due to not all the JavaScript from these libraries being executed at once, resulting in some unused JavaScript. You’ll find out more on this If you run PageSpeed Insights test on other websites that load third party scripts, you’ll likely find the same.
For further information on this you can also review this Lighthouse GitHub issue, with Lighthouse being the technology used to run PageSpeed Insights scores.
While you can disregard this notice as being normal, you may wish to consider AMP on your site if you’re looking to improve performance score.
In relation to Universal Analytics (UA) firing on your site, I can see that you’re using the latest version of Site Kit, and that Site Kit has only placed a UA snippet on your site. Can you disconnect the Analytics module within Site Kit and connect once more? We’ve recently made changed to Site Kit to only support Google Analytics 4 (GA4), so this will hopefully ensure that only a GA4 snippet is placed.
If you still see a UA snippet placed on your site after disconnecting and connecting Analytics once more, please share your Site Health information and we can check this further.
Let me know if you have any questions with the above.
As we didn’t receive a response I’ll mark this as resolved. Feel free to open a new support topic if you continue to encounter issues, or reopen this topic and we’d be happy to assist.
Hi James,
sorry, I missed your earlier response. Your suggestion to disconnect Analytics and reconnect again helped – the old UA- analytics code is no longer loaded.
thanks
Lukas
Glad to hear it @lukascech. Thanks for the update.