3 Ways to Speed Up Google Analytics in WordPress (Updated Solution for 2022)

Google Analytics is a great tool, but it slows down your WordPress website. Even Google’s own PageSpeed Insights is complaining about Google Analytics when you run a speed test. In this article, I’ll explain what causes this problem with speed and more importantly, how to solve it.

Disclosure: Please note that some of the links in this post are affiliate links for products I use and love. This means if you click on such a link and take action (like subscribe, or make a purchase), I may receive some coffee money at no extra cost to you. This helps me creating more content free of charge to you. And, as an Amazon Associate, I earn from qualifying purchases. Thanks for your support!

Size matters

Every kilo byte matters, but when you place Google Analytics script to your website, it will force you to load additional 73KB which contains tag manager and the script itself. The problem is that you don’t probably even need 99% of the features you are loading with this bloated gtag.js file.

Too many connections

The second problem is connected with too many third-party HTTP requests. The current Google Analytics code you need to place to your WordPress forces your website to make 2 additional HTTP requests to 2 separate domains.

I hope that this clearly demonstrates how harmful to your website Google Analytics in a default implementation is, but does it mean that you should stop using it? Not at all. You just need to optimize it.

In this article, I will show you 3 ways to speed up Google Analytics, so it won’t slow down your WordPress website anymore.

3 Ways to Speed Up Google Analytics in WordPress (Updated Solution for 2022)

  1. MonsterInsights
  2. Flying Analytics
  3. WP Rocket

1. MonsterInsights

MonsterInsights plugin

MonsterInsights is a well-known solution for WordPress users that offers not only real-time website analytics, but also reports about audience and its behavior.

From version 7.18 MonsterInsights comes with the option to serve that big gtag.js file locally from your server. This means less connections and less DNS lookups. This solution will also make it possible to cache the file which further reduces load time.

MonsterInsights local gtag.js file

2. Flying Analytics

Flying Analytics plugin

This simple WordPress plugin allows you to self-host just the Google Analytics JavaScript file without all the code integrated in gtag.jsfile. There is a minimal version of Analytics.js available that has just 1.4KB and offers only basic features like real time users, traffic sources etc.

Flying Analytics settings

3. WP Rocket

WP Rocket plugin

This premium plugin offers Google Tracking add-on that will improve browser caching for Google Analytics. This means that WP Rocket will host the scripts locally on your server.

WP Rocket add-on

Conclusion

Default Google Analytics implementation slows down you WordPress website, but luckily, there are 3 ways to change it. You can use any of the plugins introduced in this article to improve load times and thus the overall speed of your WordPress website which will improve your SEO.