3 ways to install Google Analytics on WordPress sites

Installing Google Analytics on WordPress sites

In the previous articles of Appchar, we talked about the importance of website analysis and explained that Google Analytics service is the most popular website analysis service that is freely available to site managers.

In this article, we are going to explain the methods of installing Google Analytics on WordPress sites.

How to install Google Analytics on WordPress sites

There are different ways to install Google Analytics on WordPress sites. In this article, we will explain three different ways to install Google Analytics on WordPress sites. The first method is the easiest method, and the last method is the hardest method. You can install Google Analytics on your WordPress site using the method that suits you best.

1- Installing Google Analytics in WordPress with MonsterInsights

MonsterInsights plugin is the most popular plugin for installing Google Analytics on WordPress sites. More than 1 million websites, including famous sites such as Bloomberg and PlayStation, use this plugin.

This method is the easiest and best way to install Google Analytics on WordPress sites (for all users from beginners to experts).

MonsterInsights plugin has free and paid versions. In this article we explain its free version. If you want to use its more advanced features, you can get the paid version. How to set up the paid version and the free version are the same.

To install Google Analytics on WordPress sites using the MonsterInsights plugin, you must first install and activate this plugin. After activating the plugin, a new menu called Insights will be added to the WordPress admin menus. You can make the desired settings by entering its Settings section.

On the settings page, click the Authenticate with your Google account button to establish a connection between WordPress and Google Analytics. Then you will be automatically redirected to the Google login page. Here, you need to log in to your Google account for the analytics service and click the Next button.

At this point you will be asked to give MonsterInsights permission to access your Google Analytics account. Click the Allow button to accept the license.

Finally, click on the profile you want to track. Here you have to select your website and then click on Complete authentication button to continue. You will now be returned to your WordPress site.

In this way, you can successfully install the Google Analytics service on your WordPress site. Keep in mind that it usually takes some time for Google Analytics to display the statistics and information of your site.

The good thing about MonsterInsights is that you can see the Google Analytics report inside the WordPress dashboard. To do this, you need to go to the Insights and Reports page and preview your analytics data. Also, you can go to the Tracking tab and set tracking settings based on your needs.

This was the first way to install Google Analytics on WordPress sites.

2- Using the Insert Headers and Footers Plugin

This method is not as good and convenient as MonsterInsights; Because you cannot have advanced tracking settings, and it is not possible to display Google Analytics data in the WordPress dashboard. However, you can also use this method to install Google Analytics on WordPress sites.

First, you need to install and activate the Insert Headers and Footers plugin. After activation, you should go to the Settings page and then Insert Headers and Footers. Here you need to enter the Google Analytics tracking code, which you created in your account, in the Header section.

Remember to click the Save Changes button to apply your settings. This was the second method of installing Google Analytics on WordPress sites

3- Installing Google Analytics in the form of WordPress sites

This method is for professional users who are familiar with coding. Of course, this method is not very reliable; Because if you change or update the template (and graphic skin), your code will disappear. We usually do not recommend using this method, but since this method exists, we will explain it here.

Add the code to the header.php file
Edit the header.php file in the WordPress template and add the tracking code you created in your Google Analytics account immediately after the body tag.

Then save the changes you made in the file and upload it again to your server.

Add with Functions file
You can add the Google Analytics tracking code to the WordPress functions file. Then the tracking code will be automatically added to all pages of your WordPress site.

You need to add this code to your template's functions.php file:

This was the third method of installing Google Analytics on WordPress sites.

View reports on the Google Analytics website

Google Analytics is able to display very valuable information that it has received from your site. You can view this information by visiting the Google Analytics dashboard and clicking on the report tab.

Installing Google Analytics on WordPress sites

You can see pre-built Google Analytics reports in the left column. Each section is divided into different tabs and by clicking on each tab you can open it and see more information.

The Audience tab shows you reports related to users.
The Acquisition tab tells you where users entered your site.
The Behavior report shows user behavior and tells you what users do after entering your site.
The Conversion report shows how successful you have been in reaching the set goals.

We hope this article was useful for you and you were able to install it Google Analytics Get to know WordPress sites. If you wish, you can also read our article about SEO and its importance.

What do you think about this article?!
en_US
WeCreativez WhatsApp Support
Our customer support team is here to answer your questions. Ask us anything!We will be in touch with you as soon as possible in the following 24 hours.
Hi, how can I help?