How To Add Google Analytics To WordPress

Hi Everyone!! Today, I am going to share the methods to Add Google Analytics To WordPress. Google Analytics is one of the most popular and best website analytics tools. But, may of WordPress users face problems when it comes to actually Add Google Analytics To WordPress. So, I am listing some methods to help you with that.

Methods To Add Google Analytics To WordPress

I will show you all the steps of a method but before this, you should have already signed up for a Google Analytics Account. If you haven’t done it yet then, please go here and do that.

Method 1: Using Google Analytics for WordPress By MonsterInsights

MonsterInsights is one of the most popular Google Analytics plugins which is used by more than 2 million WordPress users.

It is the easiest and the best way to Add Google Analytics to WordPress.

So, let’s see the steps.

Install and Activate the plugin – Google Analytics for WordPress by MonsterInsights. When you will Activate the plugin, the MonsterInsights setup page will open. Choose a category for your website and click on “Save and Continue” button.

Choosing The Category
  1. Then click on “Connect MonsterInsights” button. This will lead to a Google accounts pop-up where you will be asked to sign in or choose an account if you are already signed in. Remember: Choose the account with which you signed up for Google Analytics.
  2. Then, click on “Allow” button.
  3. The last step is to select the site you want to connect.
  4. Click on “Complete Connection” button. Now, click on “Finish Setup & Exit Wizard”.

That’s it you have added Google Analytics to WordPress.

Must Read: How To Clear WordPress Cache

Method 2: Using Insert Headers and Footers Plugin

This is a very easy method to Add Google Analytics To WordPress. For this, implement the following steps:-

Install & Activate Insert Headers and Footers plugin. After Activation, go to Settings → Insert Headers and Footers.

  1. Log in to your Google Analytics Dashboard. Then, click on Admin present on the bottom left corner.
  2. Click on Tracking Info under Property then, click on Tracking Code.
  3. Copy the Website Tracking Code and paste it in the text box present under Scripts in Header.
  4. Then, click on the Save Changes button.
Copying The Code

Hurray!! You have successfully installed Google Analytics to WordPress.

Must Read: How To Optimize Website Speed

Method 3: Using the header.php file

This method is for advanced and experienced users. It is very simple but unreliable as your code can disappear when you update or change your theme. So, let’s see the steps:-

  1. Click on Appearance and hit the Editor button.
  2. Click on your website’s header.php file.
  3. Now, copy Google Analytics’ Website Tracking Code and paste it in below the <head> section of the file.
Copying The Code

So, these were the steps to Add Google Analytics To WordPress. If this post was helpful to you in adding Google Analytics then, please share it with your friends and colleagues. If you have any doubts or suggest regarding the post then, please comment in the comment box below.

error: Content is protected !!