Silicon Themes

How to Install Google Analytics on Your WordPress Site

How to Install Google Analytics on Your WordPress Site

What would it mean if you had a way to know everything about the visitors of your website? Everything! Their age, their sex, their country, the keywords that lead them to your site, which types of social media they use. Wouldn’t it be pure power in your hands? Wouldn’t you adjust the content of your site to make it more compelling for your audience? The answer is a straightforward YES! “Wait! Is that possible?” you would object. Of course, it is! There’s no need to become a Big Brother, however. Google Analytics offers all the data you will ever need to define your audience and better serve them. The purpose of this article is to guide you through the installation of Google Analytics on your WordPress site. Enjoy your reading!

What is the Google Analytics service and why do I need it?

If you are a seasoned site administrator, you probably know the answers to the questions above, and you may skip this paragraph right away. If you, however, are a newcomer to the world of WordPress and site creation, please continue reading!

Google Analytics is a free service provided by Google which allows the monitoring of website visits as well as YouTube videos views, etc. The reports that the service offers are top-notch enabling millions of website administrators to collect valuable data for the visitors of their sites. There are a variety of reasons that make people prefer Google Analytics over other Analytics platforms.

Here’s a list containing the most prevalent amongst them.

Google Analytics:

– is a 100% free service.
– is an easy, yet powerful, tool to use, once you get used to it.
– offers excellent analysis options allowing you to collect data about:


Enough theory for today! How about installing WordPress on your site?

Now you have a grasp of what Google Analytics is, you can install it on your WordPress website and begin monitoring your visitors and their behavior. Let’s examine the process step-by-step:

Step #1:

To use Google Analytics you need to set up an account first.
If you don’t have a Gmail account, head to https://www.google.com/analytics/ and click on the Sign Up button on the upper right of the page. Input your e-mail in the form that appears and follow the confirmation instructions to confirm you’re the owner of that e-mail account. However, if you already have a Gmail account, just sign-in Google Analytics using this account and Google will take care of the rest.


Step #2:

Once you’ve signed in Google Analytics, either using a Gmail account or any other e-mail address you own, you’ll be looking at a new page containing a box with the message Start using Google Analytics.
Just click Sign Up and you’re ready to set up your brand new Google Analytics Account.


Step #3:

On the screen that follows, ensure that Website is selected instead of Mobile App and then fill in the form fields with the necessary details about your site. You will have to fill the following fields:

When you finish populating the above fields, click on the Get Tracking ID button. Note: You’re advised to let the remaining fields and tick boxes as they are by default.

Step #4:

As soon as you click on the Get Track ID button, a pop-up box containing the Terms of Service will appear. Read them and click on the I Accept button.


Step #5:

You are now looking at the Tracking ID page which contains the ID you’ll need to monitor your website as well as a box with the tracking code you can also use for the same purpose. Voila! You can install Google Analytics on your site right now. Don’t close this window, however, as you will surely need to copy some elements to use them in WordPress.


Step #6:

It’s now time to integrate Google Analytics with your WordPress Site. There are many ways to do so. We will examine a couple of them (the easiest ones), however, so that you can implement them immediately. The concept is simple: you must provide WordPress with either the Tracking ID or the Tracking Code, somehow, so that Google Analytics can begin collecting data for you.


1st Option – Add the Tracking Code in header.php


2nd Option – Use a plugin

Well Done! You can now track your visitors and through your Google Analytics account.

Right, let’s sum up, shall we? In this guide you’ve learned about the importance of having Google Analytics installed on your site. Next, you’ve learned how to create a brand new Google Analytics account. Finally, you’ve learned everything you need to know about integrating Google Analytics with your WordPress website and begin monitoring your visitors. Thanks for reading!