One of the first things we want to know is whether our application concerns itself with only known or "registered" users, or whether we need to worry about anonymous users (also called visitors or guests). This decision will mostly be a function of the nature of our web application. For a content-centric web application, we will not care who the user is as he browses around and requests pages. He has little interaction with the system, and it is only when he wants to contribute an article, access premium content for a fee, or purchase something from us that we will concern ourselves with who he is.
On the other hand, if we are writing an E-Commerce application, we might want to track and watch anonymous users. We certainly want to let users who are not registered in our system navigate around our site, browse inventory, and add items to their cart. When they go to check out and pay for their products, we can either let them log in as an existing user or register as new users without losing the contents of their shopping cart (see Figure 15-2). Also, we might be able to use the information we learn from them to help us improve our site or business. If we see a large amount of interest in a product that dies when the price is shown to the customer, it might be a good idea to offer a discount and see how it affects sales.
Figure 15-2. Anonymous users navigating through our E-Commerce site.
Like all things related to programming, there are no hard and fast rules for when you should track anonymous users and when it is a waste of time. Still, there are a few questions you might want to ask yourself as you design the application:
If you answered "yes" to any of these questions, then this is a suggestion that it is worth paying attention to visitors in addition to registered users.