I'd be very tempted to add info to the DB - a value which identifies a session, so they are "automatically" grouped.
If you add a GUID field to the DB, then when you record an action you can do a trivial search for the previous session entry: it's the same user, and with a time stamp less than 30 minutes ago. If it exists, use it's GUID value for your new entry. If it doesn't, create a new GUID and insert that.
Then when you want to run your metrics, it's a relatively simple GROUP BY clause, either in SQL or Linq.
The reason I'd do it like that is that it's a tiny bit of extra processing as a result of a human-scale event, making the data processing trivial. If you don't, then first you have to work out the groups, and then process them to get the info - which is going to be a lot more complex a query (though the SQL Server
LAG[
^] and
LEAD[
^] statements introduced to SQL 2012 would help).
[edit]Typo: "woudl" for "would" - OriginalGriff[/edit]