The Computer Gal Logo - Laptop with coffee and plants
Installing Google Analytics

Google Analytics is a free tool available from Google to help you analyze the traffic coming to your website. It is very simple to install on your website, and, if you look at the results regularly, will help you plan your website maintenance. There are screenshots in this article, but Google may change their site at any time.

It is best if you sign up for your Google Analytics account, even if you have someone else working on your website. It should be in your control, and at some point, you might have someone else working on your website.

1) Go to http://google.com and click the Business Solutions link.

Getting started with Google Analytics - click Business Solutions

2) Click the Analytics link a little ways down the page

Get started with Google Analytics - go to Analytics section of their site

3) Sign up for Analytics

Get started with Google Analytics - click Sign Up Now

4) If you don't have a Google Account, sign up for one. If you do have a Google Account, sign in.

Get started with Google Analytics - Sign up for a Google Account or login

If you need to sign up for a Google Account, the system will ask you for the following:

  1. Your current email address
  2. A password - and enter again to be sure you got it right the first time.
  3. A couple of checkbox choices
  4. Enter the text from a nearly impossible to read. In fact, you may have to enter this a half a dozen times before you get it right. It's not your eyesight; it is genuinely difficult to read. It's a pain, but they are just trying to keep hacker and spammer programming out of their system.
  5. Click to accept the fine print.
  6. If you successfully enter the secret code, you should go to a welcome page. And you should see My Account in the links in the upper right-hand corner of the page.
  7. Check your email and click the link to confirm that it's a valid email address.
  8. You only have to do all of that once!

5) Log in to Google Analytics

  1. If you are already logged in, all you have to do is click the My Account link, and you will go to the page shown below.
  2. If you aren't logged in, you will see Sign in, instead of Sign out. Signing in will take you to the page shown below.
  3. If you have not clicked the link the email, this will take you to a page asking you to verify your email address. You will be in an endless loop until you verify your email address.
  4. Click on Analytics

 

6) Now you are ready to get the code for the Google Analytics for your site

  1. Click on Sign Up (this is signing up for the code.)
  2. Enter your information in the form. The Account Name field will pick up your URL, unless you change it to something else.
    Google Analytics website information form
  3. Enter your contact information.
    Google Analytics contact information form
  4. Agree to the terms and conditions.
  5. And, you have your Google Analytics code!
    Google Analytics code

7) Add the Google Analytics tracking code to the HTML code at the bottom of every page on your website, right above the </body>. If you don't work on your own site, copy the code and email it to your web developer.

  • Example (this is an older version of Google Analytics code):
    </table>
    <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
    </script>
    <script type="text/javascript">
    _uacct = "UA-1711149-1";
    urchinTracker();
    </script>
    </body>
    </html>

8) It will take Google 24 hours to start showing your stats after you have uploaded the files with the code.

Some Sites are Harder than Others

The Google Analytics code goes right above the </body> tag to allow the full page to load before a call is made to the Google server. Then if the Google servers are running slowly because of the traffic load, your viewer's experience is not slowed down. If your site was built with Dreamweaver templates, it's easy to find the </body> tag - it's in the template(s). However, if your site was built with WordPress or some other CMS, it might not be so easy to find.

WordPress has 800+ files. If you open the index.php file, there is no </body>. That's because that part of the page is in the footer.php file. So, where is the footer.php file. It's in wp-content/themes/???. The ??? means that it could be different for each person. When you install WordPress, you get to install the theme(s) of your choice. You might try several themes; so, all the themes are in your site files. Which folder is ??? depends on which theme you decided to use in the end. If you switch themes, you will have to add Google Analytics to the new footer.php that comes with that theme.

And, to make it more complicated, if you use WordPress on the WordPress server (you have an address that is something.wordpress.com,) you don't get to install Google Analytics. WordPress has their own online stats for you in your account.

 

 

Related Articles

  1. Installing Google Analytics on your Site
  2. Google Alerts
Nora McDougall | Missoula, Montana 59801 | 406.253.4045 | Contact Nora
© 2010, Nora McDougall-Collins