Guest Author - Elizabeth Connick
How many people are viewing your site every day? What pages are they visiting most often? What is the first page they land on? How about the last page? If you want your website's effectiveness, you need to keep a tally of your visitors and their activities. The practice of tracking website activity is called web analytics.
Back in the good old days of the early Internet, most webmasters kept track of "hits" to determine their sites' popularity. Nowadays there are more accurate ways to keep track of who is visiting which pages.
What's wrong with tracking hits, you ask? Wikipedia defines a hit as "any request for a file from a web server." That includes dependent files such as images and scripts. If you have a page on your site with three images and an associated stylesheet, then every time someone visits that page it counts as five hits – one for each image, one for the stylesheet and one for the page itself. Tracking the number of hits to a page will give you a grossly inflated number compared to your actual number of visitors.
These days web analytics is based on pageviews rather than hits. Pageviews track the loading of documents rather than files, so it gives you a far more accurate view of your website's traffic. Documents typically include web pages (HTML, PHP, ASP and so on), text files such as Word documents and Adobe PDFs, and CGI scripts.
For an accurate picture of your website's activity you'll want to track user sessions as well. According to our old friend Wikipedia, a session is "A series of requests from the same uniquely identified client with a set timeout." In other words, it's a period during which one person browses through your site before he or she goes elsewhere. Combining user session tracking with pageview information gives you an excellent picture of what is happening on your site. This can help you identify which pages are generating a lot of interest, versus pages that cause your visitors to flee the site.
If you'd like to begin tracking visitor behavior on your site, Google Analytics is a good place to start. It's a free tool that allows you to track visitor behavior on each page through an easy-to-use interface. You can see the path each visitor took through your site, and how they got there (from a search engine, link on another site, or directly by typing in the url). Google Analytics will even tell you what keyword phrase a visitor entered to pull up your site from a search engine, which is vital information if you're trying to optimize your site for certain keywords. You'll need to add a small script to each webpage so that Google can track the activity on that page.