Adding Google Analytics To Your Website

Adding Google Analytics To Your WebsiteIt’s no doubt that Google Analytics is one of the best tools available for tracking visitors on your website. Some may argue that there are better tools out there and there probably are but Google offers a completely 100% free service that has some kick ass features. Now, can you really go and compare a free service to a paid one? I think not.

Note: This post assumes you know how to access your website and edit it either through FTP or your web host’s file manager.

Adding Your Site In Analytics

This tutorial already assumes that you have a Google Analytics account. If you don’t, you can sign up for a free one at http://www.google.com/analytics/.

Log into your account and access the main account screen. You are going to want to find the section at the bottom that says “Add Website Profile>>”.

Adding Google Analytics To Your Website

After clicking on “Add Website Profile>>” you will be taken to the page where you will enter the domain you want to start tracking.

Adding Google Analytics To Your Website

Don’t worry about the first section with the radio buttons as the default setting is the one that you want. Under the “Add a Profile for a new domain” section is where you enter in the URL for your domain. In the box type in the domain that you are going to be tracking.

You can choose to either leave the box checked or uncheck it yourself under “Apply Cost Data” as leaving it checked won’t hurt anything.

Once you have all those details set go ahead and click the Finish button at the bottom of the screen.

Adding The Tracking Code To Your Site

Now that you have your site setup in Analytics it is time to grab the code that will be added to your website to track your visitors. If you are following the steps from above you should see a screen similar to the following.

Adding Google Analytics To Your Website

Without going into detail about this page because this tutorial isn’t about that, look towards the bottom of the screen and find the area where it says “Paste this code on your site”. You’ll notice in the box below that setting some code as shown in the image above. This is the code that you will be adding to your website to track people coming to and moving around your site.

Click inside of the box and press Ctrl+A to select all the text inside. Once you have that done, make sure to copy it to your clipboard with Ctrl+C. Once you have that done you are going to need to gain access to your website. There are various different ways to do this and will be covered in a later tutorial.

I realize that most every website is going to have different code than the next one. So in order to keep this simple I will provide some sample code to make sure you know where to place the code. Typically you are going to look for an index.html, index.htm, index.php file or even possibly a header.php (if you are using WordPress).

Inside of that file should be some code similar to the following code below.

<html>
<head>
<title>This Is A Webpage</title>
<link href="stylesheet.css" type="text/css" rel="stylesheet" />
</head>

Google asks us to insert the code we copied before the ending </head> tag. So in the above example it would look like the following.

<html>
<head>
<title>This Is A Webpage</title>
<link href="stylesheet.css" type="text/css" rel="stylesheet">
Your Code Goes Here
</head>

I bolded and italicized the line where you should add in the code. Use the code that you had copied onto your clipboard by pressing Ctrl+V to paste it before the </head> tag.

Once you have this done and have saved your file back onto the webserver all that is left to do is to go back to the page where you copied the code from and click the “Save and Finish” button at the bottom of the screen.

If you did everything right you should be all set and Analytics will start tracking visitors on your website. You can check out the reports by visiting http://www.google.com/analytics/ and signing in with your account information.

This entry was posted in Analytics, Google, Internet, Tutorials and tagged , , , , . Bookmark the permalink.

Leave a Reply

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

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>