How to Install Google Analytics in WordPress with a Plugin

Adding Google Analytics to your WordPress site which will help to track your website who has been visiting. The best way to know your audience is through your traffic, where that traffic is coming from, and how visitors interact with your site once they arrive. Once the blog is started the first aim is to get more traffic and subscribers to the website. Google Analytics provides this service for FREE just signing in.

Is Google Analytics is important for Website or Blog?

What is Google Analytics?

Google Analytics is a free service offered by Google.

Google Analytics is a free website tracking service that reports website traffic, conversions, user behaviour, and more. It is the most popular website tracking service available.

Google Analytics can show you how much traffic your website receives, where that traffic is coming from, and how visitors interact with your site once they arrive and also what is the bounce rate (the percent of users exit your site on the first visit).

By using the information you can decrease the bounce rate and increase your page views.

How Does Google Analytics Works?

Google Analytics involves adding code (called Javascript) to your site so it can gather data on how your site is performing.

Whenever someone lands on your site in their browser by the tracking code and their “Session” on your website begins.

The tracking code (if properly implemented) should be on every page of your website for which you want to gather traffic data. This ensures that the tracking can follow every website visitor as they move through your site. 

  • Page views: The number of individual pages a visitor goes to on your site.
  • Sessions: The number of individual visitors your website receives.
  • Traffic Source: Where your site visitors came from (A Google search, a paid Google ad, another website, directly to your site, a social media network, etc.)
  • Bounce Rate: A measure of how many visitors came to one page on your site and then immediately left.
  • Session Duration and Pages per Session: Measurements of how long someone stayed on your site and how many pages they visited during their Session.

Goals (sometimes referred to as “Conversions”): These are a measure of how many people completed an action on your site. For example, if you have a contact form, you could measure how many people filled out and submitted that form, where they came from, etc.

Installing Google Analytics on your Site

1.The first thing you need to add Google Analytics to your website with your Google Account

2.Once you have your account ready, go to and log in.

3.You will see a screen prompting you to sign up for Google Analytics. Follow the steps to set up your analytics 


4. To get started you’ll need to sign up at the Google Analytics site. After you click “Sign up” you can begin creating your account.

5. After that enter account name (It will be the Google Analytics profile name for this website), Website name, website’s URL, country, and the time zone.

6. Once you have entered this information, Scroll Down to the bottom you will get Data Sharing Settings. By default, all four Data Sharing settings are selected. When you’re ready, click “Get Tracking ID”.

You will be presented with Google Analytics terms and service which you must agree to, so click on I Agree button.

7. Now you will be presented with your Google Analytics tracking code. You can copy this tracking code because you will need to enter it on your WordPress site depending on the method you use below.

8.On the next page, look for the “Tracking ID”. It will look something like UA–90363941–1

9. Add this UA code to your WordPress site

Installing the Code

There are Two ways add analytics to WordPress

Method 1: Manually adding the tracking code

1.Now add Google Analytics code to your WordPress site

2Login to your WordPress Account and go to “Editor” in the “Appearance” menu

3. On the right side of the screen, you will see a list of templates.

Find the template file named “header.php”. The easiest way to find this file is usually to do a CTRL + F and search for “header.php”:

4. Next, you want to look for the following tag: </head>. You can again use CTRL+F to search for it. Once you’ve found the tag, paste the tracking code snippet immediately before it.

5.Once the code is pasted in, click the “Update File” button.

6.After few minutes go back to the area where the code was copied. Refresh the screen and check whether the code placed and your account is receiving data.

7.It usually takes 12-24 hours for actual traffic data to be coming in through Google Analytics. After that period of time has passed, you can log in to your account and go to “Reporting” in the main menu to see your data.

Method 2: The another process to add Analytics code to WordPress plugin 

There are hundreds of plugin available in WordPress. This is an easy step and also provide analytics data. We are going to set up code Analytics code with the help of plugin named NK Analytics.his plugin is one of the most powerful of the analytics plugins that is also very easy to configure and start tracking your traffic immediately.

  1. On the right-hand side click on Plugins and go to Plugins page search for NK Analytics
  2. Download the NK analytics plugin to your account and then activate it
  3.  If you are signed in to your Google Analytics account, click the “Authenticate with your Google account”, go through the prompts, and your account will be connected.
  4. Now manually enter UA code
  5. Then go back to Google analytics account click on the admin link on the menu and then click on property settings and under the property column under you will get Tracking ID and paste the code into field into plugin
  6. Save the changes, Now your site is tracking.

Once you have installed Analytics code properly it will take 12-24 hours to see data appearing on your personal Google Analytics interface.

The menu on the left side is how you will navigate between the different data sections. It is broken up into sections based on the type of metrics presented. You can change your date range in the upper right.

Data will available from the date you have installed and sign in code to your site

  • Audience →Mobile→Overview: This will show you the type of devices people use to access your site. This can help you determine if you need a better mobile site.
  • Acquisition→Overview→All Traffic→Channels: This section will show you what channels are sending traffic to your site (Organic Search, Paid Search, Social Media, Referrals (other websites)
  • Behavior→Overview: This section will show you the pages on your site that get the most traffic.
  • Conversions→Goals→Overview: This section will show you the number of conversions that have occurred on your site if you have set up goals.

Add Comment