In this knowledgebase article, we’re going to walk you through how to self-host the Google Analytics tracking JavaScript file.
How to Self-Host Google Analytics Tracking JS File PRO
Table of Contents
1 Enable the Analytics Module
To begin with, ensure that you’ve enabled the Analytics module by navigating to Rank Math SEO → Dashboard as shown below.
2 Connect Your Google Account
The next step is to connect your Google account. If you’re doing this for the very first time, we recommend you read our tutorial on how to install Google Analytics with Rank Math SEO.
Once you’ve connected Google Analytics, enable the Install analytics code option which you’ll find in Rank Math’s General Settings which are located under Rank Math SEO → General Settings → Analytics, as shown below:
Once enabled, the additional options shown above will appear allowing you to choose whether you’d like to anonymize IP addresses, and self-host the Google Analytics tracking JavaScript file.
3 Enable Self-Hosted Analytics JS File Option
Enable the Self-Hosted Analytics JS File option. When enabled, Rank Math will host the Google Analytics tracking file locally (automatically updating the script every 12 hours), which can help accelerate the speed of your website as an external request no longer needs to be made.
If you still have any questions about self-hosting your Google Analytics tracking file, please feel free to reach out to our support team who are always more than happy to help.