User Session Analysis: Investigating Sessions

In the previous post in this series I laid out the work that we were going to do with session data from the UNT Libraries’ Digital Collections.  In order to get the background that this post builds from take a quick look at that post.

In this post we are going to look at the data for the 10,427,111 user sessions that we generated from the 2017 Apache access logs from the UNT Libraries Digital Collections.

Items Per Sessions

The first thing that we will take a look at in the dataset is information about how many different digital objects or items are viewed during a session.

Items Accessed Sessions Percentage of All Sessions
1 8,979,144 86.11%
2 809,892 7.77%
3 246,089 2.36%
4 114,748 1.10%
5 65,510 0.63%
6 41,693 0.40%
7 29,145 0.28%
8 22,123 0.21%
9 16,574 0.16%
10 15,024 0.14%
11 10,726 0.10%
12 9,087 0.09%
13 7,688 0.07%
14 6,266 0.06%
15 5,569 0.05%
16 4,618 0.04%
17 4,159 0.04%
18 3,540 0.03%
19 3,145 0.03%
20-29 17,917 0.17%
30-39 5,813 0.06%
40-49 2,736 0.03%
50-59 1,302 0.01%
60-69 634 0.01%
70-79 425 0.00%
80-89 380 0.00%
90-99 419 0.00%
100-199 2,026 0.02%
200-299 411 0.00%
300-399 105 0.00%
400-499 63 0.00%
500-599 24 0.00%
600-699 43 0.00%
700-799 28 0.00%
800-899 20 0.00%
900-999 6 0.00%
1000+ 19 0.00%

I grouped the item uses per session in order to make the table a little easier to read.  With 86% of sessions being single item accesses that means we have 14% of the sessions that have more than one item access. This is still 1,447,967 sessions that we can look at in the dataset so not bad.

You can also see that there are a few sessions that have a very large number of items associated with them. For example there are 19 sessions that have over 1,000 items being used.  I would guess that this is some sort of script or harvester that is masquerading as a browser.

Here are some descriptive statistics for the items per session data.

N Min Median Max Mean Stdev
10,427,111 1 1 1,828 1.53 4.735

For further analysis we will probably restrict our sessions to those that have under 20 items used in a single session.  While this might remove some legitimate sessions that used a large number of items, it will give us numbers that we can feel a bit more confident about.  That will leave 1,415,596 or 98% of the sessions with more than one item used still in the dataset for further analysis.

Duration of Sessions

The next thing we will look at is the duration of sessions in the dataset.  We limited a single session to all interactions by an IP address in a thirty minute window so that gives us the possibility of sessions up to 1,800 seconds.

Minutes Sessions Percentage of Sessions
0 8,539,553 81.9%
1 417,601 4.0%
2 220,343 2.1%
3 146,100 1.4%
4 107,981 1.0%
5 87,037 0.8%
6 71,666 0.7%
7 60,965 0.6%
8 53,245 0.5%
9 47,090 0.5%
10 42,428 0.4%
11 38,363 0.4%
12 35,622 0.3%
13 33,110 0.3%
14 31,304 0.3%
15 29,564 0.3%
16 27,731 0.3%
17 26,901 0.3%
18 25,756 0.2%
19 24,961 0.2%
20 32,789 0.3%
21 24,904 0.2%
22 24,220 0.2%
23 23,925 0.2%
24 24,088 0.2%
25 24,996 0.2%
26 26,855 0.3%
27 30,177 0.3%
28 39,114 0.4%
29 108,722 1.0%

The table above groups a session into buckets for each minute.  The biggest bucket by number of sessions is the bucket of 0 minutes. This bucket has sessions that are up to 59 seconds in length and accounts for 8,539,553 or 82% of the sessions in the dataset.

Duration Sessions Percent of Sessions Under 1 Min
0 sec 5,892,556 69%
1-9 sec 1,476,112 17%
10-19 sec 478,262 6%
20-29 sec 257,916 3%
30-39 sec 181,326 2%
40-49 sec 140,492 2%
50-59 sec 112,889 1%

You might be wondering about those sessions that lasted only zero seconds.  There are 5,892,556 of them which is 69% of the sessions that were under one minute.  These are almost always sessions that used items as part of an embedded link, a pdf view directly from another site (google, twitter, webpage) or a similar kind of view.

Next Steps

This post helped us get a better look at the data that we are working with.  There is a bit of strangeness here and there with the data but this is pretty normal for situations where you work with access logs.  The Web is a strange place full of people, spiders, bots,  and scripts.

Next up we will actually dig into some of the research questions we had in the first post.  We know how we are going to limit our data a bit to get rid of some of the outliers in the number of items used and we’ve given a bit of information about the large number of very short duration sessions.  So more to come.

If you have questions or comments about this post,  please let me know via Twitter.