background img
Jun 14, 2020
124 Views
0 0

How to install google analytics in wordpress

Written by

Do you want to install Google Analytics tools in your WordPress site? It is a free tool developed by Google to help you know what visitors like to read on the site, where they are coming from and the bounce rate of the site.

Today in this article I will tell you how to install Google Analytics in WordPress.

What is Google Analytics Tools

Google Analytics is Google’s free tool that reports website traffic, conversions, user behavior, and much more. This is a very popular tool for website analytics.

Google Analytics shows how much traffic is coming to your website and that traffic is coming from where. Also, how visitors behave with your site.

You can export web analytics data in various formats or create your own custom “Dashboard” for web analytics.

Why Google Analytics Tools are Important for Websites

After creating a website or blog, the most important thing for you is how people are using your site, that is, what they are seeing, where they are coming from, and what content is being read more on your website.

Apart from this, it also shows the Bounce rate of your site. There is no other way to find out all this information, so Google analytic tool is used to know the site’s stats.

Also, you can set a Goal (target) for your site.

How do tools work?

To install Google Analytics on your site, you will need to add a Google Analytics tracking code to your site. When a visitor visits your site after adding the Google Analytics code, it tracks them.

Through this tracking code you can get various types of useful data:

  • Pageviews: The number of visitors to each of the pages on your site.
  • Traffic Source: Visitors are coming from your website (Google search, paid traffic, another website, direct, or social media network, etc.)
  • Bounce Rate: How quickly visitors to your site get exit from your site.
  • Session Duration and Pages per Session: How long visitors stayed on your site and how many pages they visited during their session.
  • Goals: Through this, you can find the analytics of the goal you have set for your site.
    So let’s install Google Analytics in our WordPress…

How to install google analytics in WordPress

You will need a Gmail ID to install Google Analytics. If you have a Gmail ID, go to https://analytics.google.com and log in to Google Analytics with your Gmail ID. After logging in you will see a screen like this.

Google Analytics

Once you have filled all your required information, click on the “Get Tracking ID” button. After this, you will get a Google analytics code. Which you will have to copy and paste it in your site.

 google-analytics

Now let’s install it on our site.
There are many ways to add Google Analytics tracking code to a WordPress site. But here I will tell you about the four easiest and popular methods.

Manually Add Tracking Code

For this method, you should have knowledge of some WordPress templates. Follow the steps given below to add your Google Analytics tracking code.

1. Once you have copied your tracking code, login to your WordPress website and go to “Appearance >> Editor”.

 analytics tracking

2. On the right side of the screen, you will see a list of templates. Search the “header.php” template file here. The easiest way to find this file is to press CTRL + F and search for “header.php”.

google analytics tracking

3. After this, again search </head> using CTRL + F and paste the copied Google Analytics tracking code before </head>.

4. After paste the code, click on the “Update File” button.

5. After a few hours, return to the Google Analytics tools from where you copied your tracking code. If you are not receiving any analytics data from the site, then click the “Send test traffic” button to check it.

Google Analytics typically takes 12-24 hours to display your web analytics data.

Also Read:-

Article Categories:
SEO

Leave a Reply

Your email address will not be published. Required fields are marked *


The maximum upload file size: 300 MB.
You can upload: image, audio, video, document, text, other.
Links to YouTube, Facebook, Twitter and other services inserted in the comment text will be automatically embedded.