Jump to Content

Setting Up Google Analytics on Your Site

September 20, 2009

Note: This post is one of a series of posts that breaks out the individual topics of my presentation “Pimp My Web Page” given at WebVisions 2009. Code tested for XHTML 1.0 Strict pages on IE 6 and 7 for PC, Firefox 3 for PC/mac, Safari 4 public beta for mac.

Tracking site statistics through Google Analytics is remarkably easy. Basically you just sign up for your free Analytics account, then paste some provided JavaScript code into the bottom of your page. Simple! To get going, follow these steps:

  1. Create a Google Analytics Account (www.google.com/analytics)
  2. Complete signup process, copy tracking code
  3. Paste the code just above </body>

Notes

Don’t expect the stats to start working immediately–there’s about a 24 hour lag processing data.

Also, Google Analytics doesn’t track file downloads by default, just page views.