Core Web Vitals update has already been rolled out by Google. This update is bad for websites that load slow & good for fast-loading sites.
If you are looking for some simple ways to speed up your WordPress site, you can take a look at this article. These might help you to achieve a good score in terms of speed & web vitals.
Now, another thing that is recommended to speed up the site is reducing external requests. This also includes the popular Google Analytics. Really?
Yes. Google analytics is important to know your visitors but it also adds an external request that makes your website slow. So, how can you tackle this problem?
Host Google Analytics Locally
Whenever you run an analysis of your website on Google Pagespeed Insights, Pingdom, or GTMetrix, it’ll tell you to leverage browser cache when you’re using Google Analytics. Because Google has set the cache expiry time to 2 hours.
This method will get you a higher score on Pagespeed and Pingdom and make your website load faster because the user’s browser doesn’t have to make a roundtrip to download the file from Google’s external server.
How To Host gtag.js Locally?
MonsterInsights has a performance addon. It includes the option to host your gtag.js script locally on your server. It will also automatically fetch the latest gtag.js file from Google every 24hrs to make sure it’s up to date.
Besides hosting the file locally, the plugin also provides a ton of features like reports based on audience, behavior, content, eCommerce, various tracking methods to get the most of your analytics.
If you don’t want these additional features & just want to host the gtag.js locally, you can try installing this plugin – CAOS | Host Google Analytics Locally. Either way, you can speed up your site to some extent.