Skip to content

Session Handling

Martin Treacy-Schwartz edited this page Mar 16, 2017 · 3 revisions

Sessions are the concept of a user spending focused time in your game - from game launch to the user leaving the game.

On UWP and Universal Windows 8 a new session will start once the game is launched (or when the app is "resuming"). A session will end once the game is suspended.

On Mono / .Net 4.5 GameAnalytics.OnStop() should be called manually before quiting the game to create an end session event.

Session start

  1. Generate new session.
  2. Add a session start event (a "user" event).
  3. Start the periodic activation of submitting queued events.
  4. Next event submit will fix potential missing session_end from earlier sessions.

Session end

  1. Stop the periodic activation of submitting queued events.
  2. Add a session_end event.
  3. Submit queued events.

 

NEXT  →