How to Install Google Analytics Code on a WordPress Site


Google AnalyticsWhat is Google Analytics?

Google Analytics was developed by Google Inc. and eliminates the need for you to build a website analysis package from scratch as well as to makes it easier to track activities on your website. By using Google Analytics, you will be able to see who visited your site, what  pages they viewed and for how long, when they were on your site, the source of traffic, and how they interacted with your content.

What’s so unique about Google Analytics?

The truth is Google Analytics has been the talk among many, but it is almost always a topic that many beginners do not understand. In addition to this, many developers are aware of its existence, but they often choose to set up their tools in the name of “I want to be unique” or “I can do it better”. Regardless, the power of Google Analytics and its implementation is incomparable to many website analytical tools today. Because Google Analytic is robust, simple to use and – for a part – free, it is highly unlikely that you are going to spend time thinking about how to create your model that emulates the same application.

Do I need this tool for my WordPress Blog?

The short answer is Yes. There are tons of reasons why you should install Google Analytics on your WordPress blog. By using it, you can get an accurate estimate of the number of visitors to your site and the duration they stay there. Also, it’s worth noting not a single WordPress Template comes with a pre-installed Analytics plug-in.

If you do not care about analyzing your traffic, or you are just blogging without the intention to make money, you needn’t bother with this tool. However, we know Google Analytics has many benefits, including but not limited to the following:

  1. Google Analytics helps you not only to understand the location of your audience but also it gives you a clear report of the device and the web browser they used. For example, wouldn’t it be nice to see how effective your Facebook posts are performing in directing traffic to your blog?
  2. Google Analytics will help you to track the pages that visitors viewed, the total amount of time they spent on your website, and, more importantly, the bounce rate of the website, which is the number of visits in which a person leaves your website from the landing page without browsing any further.

How to Install the Solution on my WordPress Blog

Step #1: Get the Analytics’ Tracking Code

Google Tracking Code 1

  1. Click the Admin link; the link is at the top navigation section, immediately after the Customization Anchor text.
  2. Next, click the Tracking Info option, and a slide-down menu will appear.
  3. In the menu, click the Tracking Code anchor text; the link will open a new section and slide the property container to the left. The section has the code that we are looking for; you are going to add this code to your WordPress Blog.

Step #2: Add the Tracking Code to Your WordPress Blog

  1. Google Tracking 2Log in to your WordPress website. Please note that this installation is not for blogs hosted on the official website of WordPress. We are talking about the WordPress website hosted on your paid hosting, registered with your unique domain name.
  2. Next, navigate using your username and password. From the Admin Panel on the left, click appearance, and then click the Editor link to open the editor of your WordPress Themes and Templates. Note that the editor will allow you to make changes to your WordPress Themes and Templates.
  3. Place the Google Analytics’ code on either the header file or the footer file. It is important to remember that placing the tracking code in the header section of the page will load Google Analytics immediately, even before the other sections of the page loads. In this case, you give more priority to the Google Analytics tracking code first. Putting the code in the footer file of your WordPress Themes and Templates will do just the opposite; your website’s pages will load first and then the Google Analytics.


When it comes to an analytical tool for your website, the is no equivalent to Google Analytics. Almost every web developer is satisfied with it’s functionality and reports. Though there are different plugins available, the quality and features in Google Analytics is unparalleled. Everyone can benefit by installing Google Analytics and make use of its features.

What are your experiences with Google Analytics on your website? Let us know in the comments below!

Leave a Reply