How session tracking works

🇧🇷denko
|
Denko Rooker
·

As you can imagine, we don’t have access to the actual session data — that belongs exclusively to CipSoft. Instead, we have to rely on inference techniques that I like to call a snapshot-based session inference loop. Basically, we take frequent snapshots of the players online, and through a simple reconciliation algorithm (state diffing) we’re able to reconstruct session events by inference with acceptable reliability. I’ll explain the details below.

Snapshots

Every 5 minutes we run a snapshot algorithm: it first checks online list on every world. For each player we check if there's already an opened session, if it does we do nothing, otherwise a new session is opened. We can now safely close the rest of opened sessions, as the player has been logged out.

. . . . .

|¦¦¦¦|¦¦¦¦|¦¦¦¦|¦¦¦¦|

"Gaps and Islands"

This brings us much closer to a common pattern known as "gaps and islands", where islands of data are separated by five-minute gaps. However, in our case the islands don’t accurately represent the accumulated data across adjacent gaps, because they are snapshot-based and the gaps function essentially as blind spots.

Session dodging

Because of these blind spots, players can dodge sessions.

For example, if a player logs in at 12:06 and logs out at 12:09, and our snapshots occur at 12:05 and 12:10, they will completely “dodge” the tracker. Their session will never be detected or recorded.

Similarly, if a player with an open session logs out at 12:06 and logs back in at 12:09, the tracker will miss both events and treat it as a single continuous session instead of two separate ones, since the relog was never observed.

Error margin and confidence level

This can also result in slight differences in the total time tracked per session from the actual time the player stayed online.

Imagine a player logs in at 12:05:00 and logs out at 15:05:05: our tracker will open the session at the 12:05 snapshot and closes the session at the 15:10 snapshot, leading to a tracked time of 3h 5m while effectively they stayed online for 3h.

. . . . .

|¦¦¦¦|¦¦¦¦|¦¦¦¦|¦¦¦¦|

[ ( ] )

On Open Off Close

If we ignore the session dodgings, the error margin is confidently 5 minutes higher or 5 minutes lower T ∈ [Tₛ – 5, Tₛ + 5]

For short-time sessions it may impact the confidence a little bit, but for longer sessions the confidence starts to increasing and the error margin impact becomes negligible.

In practice, the confidence level can be calculated as the median between the best case scenario (± 0 min, always 100%) and the worst case scenario (± 5 minutes) using the formula:

C = 100 * (1 - 2.5 / Tₛ)

---

C → Level of confidence in %

Tₛ → Tracked session time in minutes

Given that, for a 3h session (Tₛ=180) the confidence is ≈98.61% (worst ≈97.22%), while for a 10m session (Tₛ =10) the confidence is ≈75% (worst ≈50%)

Fun facts

We started our tracking in April 2024. Since then, we have processed, computed, or stored so far:

178,560 snapshots

626,751 sessions

1,253,465 session events

24,082,112 session minutes

0 comments
Please write your comment in English. Comments in another language may be deleted