Using HTTP logs to track the users who visit your site isn’t always as useful as you think it’s going to be. While metrics, like the total number of page hits and, within that, page hits over time or from a specific IP address, easily identify, they don’t always tell how people are viewing your site or answer specific questions the marketing department may pose.
This article looks at how to track progress through a site using an Apache module and provides answers to some of the more complex marketing-led questions that may be posed.
Sometimes when monitoring site usage you want to ask more detailed questions than “how many users” or “how many hits.” You may, for example, want to determine if users are visiting your new product pages because they saw an advertisement on the home page or because they’ve been sent a link directly to it. Also, with most companies using firewalls, Network Address Translation (NAT), and proxy servers, identifying individual users can be impossible. Actually “following” a user as he works through the site is difficult.
|Table of Contents
Adding mod_usertrack to Your Apache Installation
Choosing an Expiry Time
Configuring the Log
Analyzing the Results
The Performance Trade Off
If you look at a typical log, it’s easy to determine general information, such as page hits, but it’s difficult to determine what an individual user might have been doing. Although you can configure the logs to include an IP address, this is neither as unique nor as easy to use as it sounds. Many users access the Internet through a NAT or proxy solution, which means hundreds, even thousands of users are hidden behind a single IP address.
Even if you can identify a single user as using a single IP address, tracking what she does — beyond simply viewing different pages — is more difficult, especially if the site uses a combination of static and dynamic elements or is entirely dynamic.
Like other modules, mod_usertrack is configured through a series of directives. The first step however, is confirming mod_usertrack is in your Apache installation.