Boost Your WordPress Site Speed by Hosting Google Analytics’ gtag.js locally

Want better core vitals, try this great hack to increase site speed of wordpress by Hosting Google Analytics' gtag .js locally and get better core vitals from Google

Nobody enjoys a sluggish website, and Google’s newest algorithm might cause your site problems with slow speeds. Consider how many times you visit a webpage during your work day or during down time, and the page takes too long to load. Let’s take a look at some data to sort through the problem. Did you know that 40% of users abandon a website that takes longer than three seconds to load? For e-commerce sites, these figures are very concerning. 80% of shoppers are less inclined to return to a site if they are dissatisfied with its speed or functionality. Furthermore, a one-second delay reduces consumer satisfaction by 16 percent and reduces conversions by 8%.

Google’s ranking system takes speed into account as well. If your site is slow, your Google ranks will suffer, and you will receive significantly less traffic. Mobile page speed will be a key ranking element, as we saw with Google’s Accelerated Mobile Pages (AMP) launch.

So now you know how site performance affects user experience, engagement, and SEO. What can you do to speed up the loading of your website? This article will walk you through ten efficient and straightforward strategies to make your WordPress site faster.

Google’s Page Experience update

As you probably already know, because of the powerful tools Google analyzes websites with, Google Analytics is no doubt the gold standard when it comes to online analytics. Google Metric and algorithms have a number of useful capabilities, including the ability to track your website’s analytics. In a nutshell, it allows you to see how your website compares to industry standards. These are just a few of the major advantages of incorporating Google Analytics into your website.

Google scripts are one of the factors that contribute to your website’s slowness. The update, which incorporates Core Web Vitals as a new ranking criterion, began going out in June of 2021. Your website must pass the new Core Web Vitals exam to get the top ranks in search results.

While it may seem counterintuitive a Google product can damage its own Core Web Vitals score. The Google Analytics tracking script can slow down your website and lower your score if there is no optimization for speed. Users of MonsterInsights, on the other hand, don’t have to be concerned about how Google Analytics loads. MonsterInsights recently released MonsterInsights 7.18 today. It features a change to the way their primary tracking script launches on your site. They have also included some intriguing new integrations to the All in One SEO plugin.

Script loading time should be reduced

MonsterInsights has developed faster script loading and the Performance Addon feature option to host gtag.js locally. Their plugin’s script will help your site load quicker.  You are assured that MonsterInsights loads quickly enough to get excellent Core Web Vitals scores, which are so critical for the best search results and rankings.

You also get the ability to host your gtag.js script directly on your server to their Performance Addon. By limiting the number of external resources your website must load, you will reduce your load time considerably. Google Analytics features a two-hour cache duration by default. You have complete control over the caching of the file by serving the script locally, which reduces load time even further. Additionally, the Performance plugin will automatically download the most recent gtag.js file from Google every 24 hours. This ensures your website is always running the most recent plugin to optimize performance.


Google and other social media platforms are notorious for slowing down websites. This happens regardless of how fast their CDN is. When there is a third-party request to another domain without adequate cache policies, your site will slow down. After installing MonsterInsights on your WordPress site, you should notice a significant difference.

Check out more in our Entrepreneurship section today!