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:

  • – who visits your website, meaning your visitor’s age, geographical location, sex, language, country.
  • – the average and exact duration of visits.
  • – how your users interact with your site i.e. what content they see, which links they click on etc.
  • – how your visitors arrived at your site.
  • – the browser of your visitor and the device they are using, and much more information.
  • can be easily integrated with other Google services like Webmaster tools (suitable for advanced users) etc.
  • can be easily installed on WordPress websites and this is the exact purpose of this article. So you’d better keep on reading if you want to find out how.

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.

analytics-signup1


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:

  • Account Name: Here you set a unique account name so that you can distinguish each website monitor from others.
  • Website Name: Input the name of your website. It doesn’t have to be its full address. Input an easy-to-remember name.
  • Website URL: In this field, you must input the full address of your website, preferably with the www prefix.
  • Industry Category: Select the category that matches the category of your site best.
  • Reporting Time Zone: Make sure you set your time zone correctly. Having the correct time zone, results in a better analysis for your website. You’ll know the exact time your visitors landed on your site.

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.

analytics-signup2

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

  • – Log into your WordPress Website.
  • – Click Appearance->Editor.
  • – Find the Theme Header file in your right sidebar header.php
  • – Paste the tracking code you have in your Google Analytics account right after the <body> tag.
  • – Click on the Update File button and you’re ready.

2nd Option – Use a plugin

    If the idea of messing with any .php files sound petrifying, don’t worry! There are a variety of plugins you can use to achieve the desired WordPress – Google Analytics. Just:

  • – Log into your WordPress Website.
  • – Click Plugins->Add New
  • – Type Google Analytics in the search field
  • – Pick any Google Analytics plugin that you like and install it on your site. For example, you can choose this one
  • – Paste your Tracking ID from Google Analytics Website in the plugin settings page and save your changes. That’s it! It wasn’t difficult, wasn’t it?

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!

Total
3
Shares

Leave a Reply

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

*
*