Loop/Session

From MozillaWiki
< Loop
Revision as of 20:12, 22 July 2015 by Erikrose (talk | contribs) (They call the Lua session aggregator "the sessionizer".)
Jump to navigation Jump to search

Unfortunately, "session" has 2 distinct meanings in a Loop context:

  1. A strong entity maintained by TokBox that has a 1-to-1 mapping to our rooms
  2. The simultaneous presence of 2 people in a room. A session in this sense begins when the number of people in a room rises to 2 and ends when one of them leaves.

This page is about sense #2.

Measurement

Sessions are, at the moment, computed differently for different metrics:

  • The Session Progress graph uses the "linkclicker theorem" (≤1 linkclicker in a room at once, ≤1 FF user in a room at once) as an aid to deciding when 2 people are in a room.
  • The code behind the Room Sessions graph ("the sessionizer") doesn't use the linkclicker theorem. It's all based on uids (Hawk IDs). It currently assumes all "unknown" (linkclicker) UIDs are the same person. Previously, it assumed they are all different people. Neither assumption is accurate; they didn't have the userType data when they wrote the Lua code. ErikRose believes whd or twist are going to update it to match the Session Progress algorithm.
  • Google Analytics trends the same as Session Progress numbers but uses a very different method of computation. Upon successful connection between 2 parties and the stream starts, we trigger an event to Google Analytics. 2 discrete conversations in 1 room count twice toward GA’s Media Connected events but once on the Session Progress graph. Thus, the 2 numbers are each valid in comparison to themselves, but they shouldn’t be expected to be the same as each other.