Fun with Web Metrics

What's going on?

Session IDs: I – Why and Where

One of the things that we changed a while back that has made our lives easier was to tag every visit to the site with a session ID.   Basically, if the session cookie doesn’t exist, one is created, and the cookie’s expiration time is reset with each page load, unless it times out (30 minutes for our sites).

The data stored is just the IP of the client and the UNIX time stamp of the cookie’s creation, e.g.:

12.34.56.78.1291045546123700

Then we append this to each line of the HTTP server log as an extra field.

In doing so, it makes it very straightforward to pull out individual sessions for analysis.  It also gets around some of the problems you have with IP overlapping from routers.   For example if you are trying to look at classroom usage of a resource, and all the traffic is logged as coming from the same IP, it’s not really possible to tell how many concurrent sessions there are, nor what the traffic pattern is.   Because the session ID is stored by each client, unless (in this case) two sessions begin at the same time, they’ll still have separate IDs.

 

Advertisements

November 29, 2010 - Posted by | sessions |

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

%d bloggers like this: