Add Google Analytics to Your Site in 10 Minutes

Sometimes people tell me that they’re not sure how to get started with Google Analytics. Here is how to get through the basics in a few easy steps.

Google provides a complete guide to this with their Google Analytics Installation Guide: http://www.google.com/support/googleanalytics/bin/answer.py?answer=66983. I’ve simplified the process here and given you relevant links to guide you through the most basic version of the process.

  1. Create a Google Account. (If you already have a Google Account, skip this step.) You only need an email to do this. The page to create your account is here: https://www.google.com/accounts/NewAccount. Complete the form and Google will send you an email with a link. Click the link to verify your sign up and you’ll have created a Google Account. Only takes a few minutes.
  2. Create your Google Analytics Account. Sign into Google Analytics with your new Google Account here: http://www.google.com/analytics/ and then follow the steps to create your Google Analytics account. Once you are logged into the site, you’ll have to accept the User Agreement and configure your site’s profile. This is roughly equivalent to Step 1 in the Installation Guide.
  3. Start tracking your site. Once you have configured your first account, you can start tracking your site. You do that by adding tracking code to your site. This is Step 4 in the Installation Guide. You should see the tracking code immediately after creating your Google Analytics account. If not, information on finding the tracking code is here: http://www.google.com/support/googleanalytics/bin/answer.py?answer=55603.

It is easy to get confused on how to add the tracking code as it requires a little technical know-how. The code needs to exist on every page. Most websites use common templates or includes for controlling the look and feel of the site. Typically, a site will have one or two templates that all pages in the site will use. That way if you need to change the look and feel of a site, you only need to change the template. The tracking code should be placed in one of the templates or includes, somewhere before the </body> tag. That way, when the page is rendered and the template is included, your tracking code is included too. If you are working with a web developer, they will know how to add the tracking code.

Another consideration is that your site has a homepage or default page. This page comes up automatically when somebody types in your domain name and is often named index.html, index.php, default.aspx or something similar. This page can be called in two different ways (e.g. http://www.somedomain.com/ or http://www.somedomain.com/index.html) but it is actually the same page and we want to track it is one page. So we tell Google what the default page is so it treats it as one. Refer to Step 2 in the Google Analytics Installation Guide: http://www.google.com/support/googleanalytics/bin/answer.py?answer=66983#0.1.1_step2.

Once you have these basics steps completed, you are up and running with Google Analytics!

Posted on Jan 14 2008 by Rob under Analytics.

You must be logged in to post a comment.

Subscription Options Subscribe for updates via (RSS or Email)