Step by Step Guide to Registering and Implementing Google Analytics With WordPress Websites

Posted in WordPress on May 17, 2014

Google Analytics is a must for anybody with a website. Knowing where traffic is coming from lets an owner understand which of his efforts to get the word out about his site are paying off and which are not. You will need a Google account before you can get a Google Analytics account, and will be walked through both activities below.

A note about Gmail accounts

If you have a Gmail account, all of the Google services registered for may be tied to that account. If ever it is necessary to change or abandon your Gmail account however, it would be necessary to associate the Google services with a new account and dissociate them from the old account. While it is possible to change the primary account associated with the services, it is a taxing process and best avoided (as the author has learned through hard experience). Therefore the instructions below do not require that you associate any of the services with a Gmail account.

Registering for a Google Account

If you already have a Google account, skip down to the Registering for Google Analytics section below. You could register through Google Accounts as well, but that would create a Gmail account for you and this instruction set avoids that possibility.

1. Type “google.com/analytics” into your browser to be taken to the Analytics homepage.

2. Below the header menu, to the upper right of the page, is a big blue button that you should click on labeled “Access Analytics”.

3. You are transported to a login page. Since you need to register for an account, look for the link labeled “Sign Up for a new Google Account” in the upper right corner of the page and click on it.

4. Now you are looking at a registration page. You need to input the following information:

a. Your email address – this can be any email address and does not have to be a Gmail address

b. Your new password

c. Retype your new password

d. Your location

e. Your birthday

f. A Captcha (of course)

5. You should, of course, read the terms of service before you click the “I accept. Create my account” button. It is a legally binding contract.

6. Once you accept the terms of service, you are shown an account creation screen that directs you to confirm your email address.

7. To confirm your email address, open the email that Google sent to the email address you provided in step 4.a. and click the link provided.

8. You will be taken to a confirmation screen that informs you that your account has been activated. Now you will be able to sign in when you see that “Access Analytics” button we saw back in step 2.

A valid question at this point is why did you not register through the Google Accounts sign-up. Signing up directly through the Google Accounts registration creates a Gmail account for you in your account name. Because we do not want to associate our Analytics account with a Gmail account, we took a different path to registration.

Registering for Google Analytics

Having a Google account, you are ready to register for Google Analytics. If you just registered, you will note how steps one through three are nearly identical to steps one through three above.

1. Type “google.com/analytics” into your browser to be taken to the Analytics homepage.

2. Below the header menu, to the upper right of the page, is a big blue button that you should click on labeled “Access Analytics”.

3. You are transported to a login page. Use your email address and password to log in. If you have and are using a Google id (such as your Gmail address) you can just enter the portion before the “@” symbol. If you are not using a Gmail id, you need to enter your entire email address. Click the “Sign In” button.

4. The initial screen gives a brief overview of signing up for Analytics and what you can do. Click the “Sign Up” button on the right side of the screen. This takes you to a screen where you can create your analytics account.

5. You need to enter in information about the website whose traffic you want to monitor. Specifically you need:

a. An account name – This does not have to match the website name, though it would make your life easier if it did.

b. The URL of your website to track. Your URL is simply what people type into their browser to get to your page directly. Select the proper prefix from the dropdown box (99% of the time http:// is correct), and type the rest in the box. As an example, you would select “http://” and then type “yourdomain.com” if your site was YourDomain.com.

c. Select your location time zone.

d. Data sharing is up to you. You do not have to do it and if it makes you nervous don’t. If you do choose to share you have two options.

i. Share with Google – Google can see what your site is up to. If you are going to have AdSense advertisements they can use this to enhance the interaction.

ii. Anonymously share with anybody. This enables comparisons between sites without anybody knowing who your specific data belongs to.

e. Select your country.

f. Read the terms and conditions and click the checkbox when you have.

g. Click the Create Account button.

6. You are now transported to a subsection of your site management zone. The reason you are on this specific page is because you need to add some code to your website to enable Analytics to track the traffic.

a. Towards the middle of the screen you will see “1. What are you tracking?” Generally the answer is a single domain, which is the first available radio button. Leave it alone.

b. A block of code beneath the title “2. Paste this code on your site”.

i. It is not necessary that you understand this code for it to work!

ii. Immediately between the title and the block of code are the instructions,” Copy the following code, then paste it onto every page you want to track immediately before the closing </head> tag.” This is precisely what you will do, as explained below.

iii. The </head> tag is part of the HTML code that creates a web page. Specifically, it demarks the end of the header of a page. To add Google Analytics to your WordPress website:

a. These steps will enable tracking for your entire WordPress website. You only need to make this one change.

b. Navigate from your WordPress Dashboard, select Appearance -> Editor.

c. Select the Header (header.php) option on the right side of the screen. A block of code will appear in the editor in the middle of the screen.

d. Find the </head> tag in the block of code. It should be hard up against the left side of the editor, not indented at all. Where within the code is difficult to say as it depends on the theme you have installed.

e. Copy the block of code from the Google page and paste it into your WordPress header, immediately before the </head> tag.

f. Click the blue “Update File” button beneath the editor.

c. After you have edited your page and saved it (you did remember to save after adding the code, right?), click the “Save” button on the Google Analytics page. There will be a small green tab at the top of the screen that says “Success” that denotes that you have done what you need to on the Google end.

With that you should be able to track visitors to your site. Be aware of two things. First is that you should not assume that the data is up to the second correct. Second, your own visits get logged as well. It is quite possible that the traffic you see initially is all you.

By Nick Von Cover

Leave a Reply

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