How to install Google Analytics in WordPress site?

How to install Google Analytics in WordPress site?

If you are a website owner and want your site be successful with target goals, you must be very concerned about how many visitors are on your site, how they can find your site or what they are doing on?

Google Analytics is the on-of-the-top and market leader tool to monitor and analyst traffics on your website. This useful tool lets you know clearly your audience behavior, track the daily traffic, and show the weaknesses and strengthens of your site.

Today, we will share you some tips to install and use this powerful tool for your WordPress Site.

What Google Analytics Shows you

Once your site is installed this amazing tool, you can go to the Google Analytics site to see all the statistics or have a quick look right on your site.

Page Views

You will know how many views your website has gained for a period of time.

Unique Pageviews

represent an aggregate of pageviews generated by the same user during the same session (i.e. the number of sessions during which that page was viewed one or more times).  The time limit for a given session is 24hrs.

Bounce Rate

Your bounce rate is the percentage of people that clicked off your website after one page

Average Time on Site

This is also an indicator into the success of your site architecture, your content and landing pages. The more time spent on site, the better it is and the greater your chance of success.

New Visits

New visits is a great indicator of brand growth

Traffic Sources

Users arrive at your website through a variety of sources, including advertising campaigns, search engines, and social networks. Traffic sources will reveal where your customers come from


With information about keywords, you can set up and manage your SEO campaign to reach more customers.

Top Page and Posts

Which pages and which posts are the most visited? Can you expose these pages further with SEO activity?

Insides the above indicates, Google Analytics provides more other data to let you know insight into your website. Using these analytics you stand in a better position to determine how to proceed to continue any success for your site.

Google Analytics provide not only website insights, but it can also be linked with Google Adwords account. If you run a PPC campaigns, you are tottally see the results on Google Analytics.

How to Signup with Google Analytics

Step 1:  To create a Google Analytics account >> Visit Google Analytics Signup Page and enter your Gmail account.

Step 2: Once you sign-in with your Gmail account, you will be moved to the next page like the one below. This is where you will signup for Google analytics with your Gmail account.

Step 3: Fill up your information to set up a GA (Google Analytics) account. In which Account name is the GA profile name for this website, you can use your website name to make it easy to remember.

Once you have entered this information, click on the Get Tracking ID button. You will be presented with Google Analytics terms and service which you must agree to, so click on I Agree button.

Step 4: Now you will be received your Google Analytics tracking code. You can copy this tracking code because you will need to enter it in your WordPress site depending on the method you use below.

How to Install Google Analytics in WordPress

There are many different ways to setup Google Analytics in WordPress. We will show you three different methods, so you can choose the easiest method that best suits your needs.

1. Installating Google Analytics by Using MonsterInsights Free Version

One of the most easiest way to insert Google Analytics into WordPress site is to install GA Plugins. You can use MonsterInsights – it’s one of the most popular Google Analytics plugins for WordPress.

Firstly, you need to do is install and activate the MonsterInsights plugin like other plugins. Upon activation the plugin will add a new menu item labeled ‘Insights’ to your WordPress admin menu. You go to visit Insights » Settings to configure the plugin settings.

Then, you need to click on ‘Authenticate with your Google account’ button to connect Google Analytics with your WordPress site.

Then you will see a popup >> Click on ‘Next’ to continue. Now you need to click on ‘Click to get Google code’ button.

The another popup will appear with the message ‘MonsterInsights would like access to your Google Analytics data’. Click on the ‘Allow’ button to continue. The popup will now show you a line of code which you need to copy.

Next, you need to enter this code in the MonsterInsights popup and then click on ‘Next’ to continue.

The final step is to select the profile you want to track. You need to select your website here and then click on the next button to continue.

That’s all you have successfully installed and setup Google Analytics on your WordPress site. Remember, it will take Google Analytics sometime before showing your stats.

The best part about MonsterInsights is that you can view your Google Analytics report inside your WordPress dashboard. Simply visit Insights » Reports page to checkout a quick overview of your analytics data.

2. Insert Tracking Code by Headers and Footers Plugin

With this method, you need to go to the GA page to Google Analytics data, you will not be able to view statistics in your WordPress dashboard.

First, you need to install and activate the Insert Headers and Footers plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Upon activation, you need to visit Settings » Insert Headers and Footers page. Here you need to paste the Google Analytics code that you copied in step 4 into the headers section.

Don’t forget to click on the save changes button to store your settings.

Add code in header.php file

Simply edit the header.php file in your WordPress theme and paste the code you copied in step 4 right after the <body> tag.

Don’t forget to save your changes and upload the file back to your server.

Add via Functions File

You can also add Google Analytics tracking code to WordPress functions file. It will then automatically add code to every page on your WordPress site.

You will need to add this code to your theme’s functions.php file.


add_action(‘wp_head’, ‘wpb_add_googleanalytics’);

We hope this article helped you learn how to install Google Analytics in WordPress and bring you valued analytics to make important business decisions.

SW Shop4 - Free MarketPlace WordPress Theme with Mobile Layout

Best selling multi vendor wordpress themes

 Best Selling Multi Vendor MarketPlace WordPress Themes

You might also like

Leave Your Comment

Quà Tết Cao Cấp Hộp quà tết Giỏ quà tết Túi quà tết