Most of the sites are using Google Analytics to track visitors and have different reports. The default Analytics code can be heavy and will increase your site load time. In this article, we will see how easy is in WordPress to optimize Analytics and have your site load faster.
The optimization will be done with the help of a plugin and the results are as follows after using it:
Before:
After:
As can be seen the load time decreased but this can be also from the server communication and processes, the important thing is that the page size decreased with more then 10KB and we have fewer request.
Bellow are the easy steps to have this done on your WordPress Website:
1.Remove the previous code
In case you have Analytics already set deactivate the old plugin you are using or remove the code from the footer or header.
2. Install Flying Analytics
Flying Analytics is a WordPress plugin developed by Gijo from wpspeedmatters.com that will add a reduced analytics code on your site or the default one but loaded locally.
3. Configure Flying Analytics
After the plugin is installed you need to go into Settings – Flying Analytics and add your tracking ID.
Then you can chose from :
After you should have an analytics code that will speed up your website load time.