In this week’s post we will talk about WPO, web optimization and how we like it for WordPress.
We will deal with the typical leverage browser cache notice that usually appears when we test our website in Google Pagespeed Insights, Pingdom or GTMetrix.
And this happens because Google has set the cache expiration time at 2 hours for analytics.js / gtag.js / ga.js and this leads us to the previous notice and slows down the loading and measurement results of our website by this reason.
One way to overcome this warning is to host analytics.js / gtag.js / ga.js locally and thus make your website load faster, because the user’s browser does not have to make a round trip to download the file from Google’s external server.
CAOS | Host Google Analytics Locally
Indeed in the CHAOS There is the solution and it is that this plugin does exactly that, host the Analytics script locally to take advantage of the browser cache and that the user does not have to make the round trip to download the external file from Google, he will do it locally and at the time.
You just have to install the plugin and enter your Google Analytics Tracking-ID and the plugin adds the necessary tracking code for Google Analytics in the header (or footer) of your theme, download and save the analytics.js / ga file .js / gtag.js in your hosting and the plugin is in charge of keeping it updated (automatically) using a script programmed in the wp_cron of our WordPress.
The idea of this plugin is to install, configure the basics and forget about its maintenance (except for updating it to new versions) to overcome the Google Analytics Leverage Browser Cache warning
This plugin is available for free in the official WordPress repository, you just have to search for it from your own WordPress and install and activate.
Looking for a quality hosting at a good price and that has it all?
Don’t think twice, you are in the right place, Host-Fusion.Com offers you the latest technology in Web servers, LiteSpeed, LsCache, image optimization, CDN, extra security for your WordPress, Free SSL certificates, optimization, IP and Data center in Spain and technical support in Spanish.