Do you want to host gtag.js locally? Keep reading this article if you are interested in it!
Calling external files such as Google Fonts, images, or other static files can affect your website’s speed. And as you know, speed is an essential factor when it comes to website ranking and conversions.
Saying that using Google Analytics (calling Google Analytics script) can also affect your website’s speed. If you are using the MonsterInsights WordPress plugin, you have to host gtag.js locally to prevent the effect.
And in this article, we will show you how to host gtag.js locally and boost the website’s speed.
MonsterInsights
If you need to integrate Google Analytics with WordPress, MonsterInsights is the right plugin you need to use. This is a freemium Google Analytics plugin created by Awesome Motive, Inc. The free version plugin is available in the WordPress plugins repository, and the premium version can be found on their official website.
If you check the free version plugin, you can see that more than 3 million WordPress websites are using it.
The lite version plugin comes with all the basic features. However, if you are running a business website or online shop, you must choose their premium version plugin. The premium plan starts at $99.50 a year.
Some of the popular features of MonsterInsights are:
- Universal Tracking
- Affiliate Link Tracking
- Scroll Tracking
- File Download Tracking
- Forms Tracking
- eCommerce Tracking
- Site Speed Report
- Real Time Report
If you need to know more about MonsterInsights, check out our complete MonsterInsights review.
Now, you know about MonsterInsights. Let’s see how to host gtag.js locally and boost the website’s speed in the right way.
How to Host gtag.js Locally and Boost Website’s Speed
Now, let’s see how to host gtag.js locally using MonsterInsights.
Total Time: 12 minutes
Purchase MonsterInsights
If you are not using MonsterInsights, you need to purchase it. As of today, the free version plugin doesn’t come with such features. So, you need to pick a plan according to your requirements.
First of all, go to MonsterInsights and their pricing page.
You can pay for the plugin using your credit card or PayPal account.
Install the Plugin
Once you have purchased the plugin, log in to the MonsterInsights dashboard and download the plugin’s latest version. Once you have downloaded the plugin, log in to your WordPress site, install the plugin.
Activate It
Once you have installed the plugin, activate it.
Verify License Key
After activation, you need to verify your license key. A valid license key will help you to get priority support and updates from the developer team.
Complete Integration and Host gtag.js Locally
After verifying your key, you will see the license type just below the submit box. Next, connect MonsterInsights with Google Analytics property. You can do it by pasting the tracking code inside the MonsterInsights settings page or manually opening the integration prompt.
Once you have verified the Google Analytics property with MonsterInsights, you can start using the features.
Go to the add-ons section, install and activate the performance add-on. The developer team already added gtag.js local hosting to the add-on. By using this feature, anyone who uses MonsterInsights can host their gtag.js file locally.
Go to the performance section, enable the gtag.js local hosting feature.
Once you have done that, save the update. From now on, MonsterInsights will update the gtag.js file every 24 hours. If you want, you can also fetch and update the local gtag.js file manually.
Estimated Cost: 99.50 USD
Supply:
- Internet Connection
- A Computer
Tools:
- MonsterInsights WordPress plugin
That’s it. This is how you can host gtag.js locally and improve the website speed. As you can see above, with a plugin like MonsterInsights, Google Analytics integration and management are simple.
Conclusion
Nobody likes a slow website. Not me, not you.
When it comes to website speed optimization, you need to focus on the web hosting environment, theme, installed plugins, and so on. On top of all, calling files from external domains has a significant impact on speed.
By hosting the files locally on your server, you can reduce additional HTTP requests and improve the overall performance. When you use Google Analytics, host gtag.js locally, and you can improve your overall performance.
With a plugin like MonsterInsights, hosting gtag.js locally is pretty simple.
We hope you have found this article helpful and enjoyed the read. If you did, please consider sharing this article with your friends and fellow bloggers on social media. Also, if you need more related articles, check out our blog.
Related Articles You Might Like:
- MonsterInsights Review: Why This Is the Best Analytics Solution?
- Best WordPress Site Speed Hacks to Improve Your Vital Score
- How to Set Up File Download Tracking In WordPress?
- How to Enable Scroll Depth Tracking and Track Your Visitor’s Experience?
- How to Track Authors In WordPress and Google Analytics (Step-By-Step)
Did you find the article useful?
Then pin me to your Pinterest Board, so that more people will find me
(Remember: The more you give to the Universe, the more you will get from the Universe)
So, Pin me