In this recipe, we are going to take a look at a common task for most sites. We want to be able to keep track of how many users are present on our site at any given time. We will also attempt to distinguish between known (logged-in users) and unknown (anonymous) users. To keep track of users as they come to our site, we will need to attach some of the events, such as
Session_End, which our application exposes. To distinguish between the known and unknown users, we will have to tap into our membership functionalities, such as registration, logging on, and logging off.