Documentation "Avia Support Pro" Sessions


Content:

General Information:

A complete description about Activity Log and Sessions you find in the main documentation.

This part of the documentation shows in a few examples, how user sessions are built from the activity log. Currently only the support request queue page is monitored, therefore it is limited to moderators. But this feature can be extended to frontend and all users. It will also give you an idea how to adopt the available options for your need.

Accessable options are set to following default values:

  • Session Expire Time: 20 minutes
  • Keyboard Inactive Timeout: 15 minutes

Following important hidden options are set to following default values (are visible and can be altered for test purpose when "define( ‘WP_DEBUG’, true );", in release with a WP filter):

  • Keyboard Activity Interval: 5 minutes
  • Minimum Key Only Characters: 300 characters

Normal Workflow

This is a standard situation, where a moderator can answer topics within "Session Expire Time" minutes.

Example 1:

User Activity Activity Log Sessions
User opens SRQ page (= starts to work in forum) timestamp – open SRQ New session (#1) starts with timestamp
User opens a topic timestamp – open topic session (#1) is extended
User submits answer within "Session Expire Time" minutes timestamp – submit session (#1) is extended
….. User continues to open and submit topics within "Session Expire Time" minutes ….. timestamps session (#1) is extended
User stops working – goes for a break for MORE than "Session Expire Time" minutes xxxx xxxx
User returns to work and opens a topic timestamp – open topic
  • session (#1) is closed with last recognized timestamp before leaving for break
  • new session (#2) is started with current timestamp
User submits answer within "Session Expire Time" minutes timestamp – submit session (#2) is extended
User stops working – goes for a break for LESS than "Session Expire Time" minutes xxxx xxxx
User returns to work and opens a topic timestamp – open topic
  • session (#2) is extended, because current timestamp within "Session Expire Time" minutes
……… user is working ( = open topic, submit and all ajax callbacks, see main documentation ) ………
  • session (#n) is extended, when current timestamp within "Session Expire Time" minutes
  • session (#n) is closed with last recognized timestamp and a new session (#n + 1) is started when current timestamp outside "Session Expire Time" minutes

Topics that need more attention

This is a situation, where a moderator has a topic which he cannot answer within "Session Expire Time" minutes.

A moderator uses keyboard AND mouse to write the answer. As jQuery allows to distinguish between real events and triggered events by JavaScript code we can limit activity to real events only. Mousemoves are captured but regarded as no activity until we capture a keyboard event (a mouseclick is regarded as a keyboard event).

To limit number of keyboard activity events we send to the activity log on the server we only send all "Keyboard Activity Interval" minutes one keyboard activity event. Meanwhile the timestamp of the last recognised keyboard event is cached on the client in case the user makes a longer break (= "Keyboard Inactive Timeout").

Example 2: Keyboard and Mouse

This is the standard situation:

  • A keyboard activity event is sent to server, when option "Keyboard Activity Interval" in minutes is passed AND we have keyboard and mouse move events
User Activity Client Cache Activity Log Sessions
…. …. …. ….
User opens a topic xxxx timestamp – open topic session (#n) is extended
User starts to type text
  • set last send to current
  • set cache to current
xxxx xxxx
…..User continues with text and mouse when "Keyboard Activity Interval" passed since last send:

  • send keyboard activity to server
  • set last send to current
  • clear cache
timestamp keyboard activity
  • session (#n) is extended, when current timestamp within "Session Expire Time" minutes
  • session (#n) is closed with last recognized timestamp and a new session (#n + 1) is started when current timestamp outside "Session Expire Time" minutes
…. …. …. ….

Example 3: Taking a break

A user is supposed to take a break, when we cannot capture any keyboard events within the time period of "Keyboard Inactive Timeout".

When captureing the next keyboard event we send to the server:

  • the last cached keyboard timestamp to extend the last session to last recognised activity timestamp
  • the current timestamp – depending on length of break this will:
    • extend the last session when within "Session Expire Time"
    • starts a new session when outside "Session Expire Time"
User Activity Client Cache Activity Log Sessions
…. …. …. ….
User opens a topic xxxx timestamp – open topic session (#n) is extended
User starts to type text
  • set last send to current
  • set cache to current
xxxx xxxx
…..User continues with text and mouse when "Keyboard Activity Interval" passed since last send:

  • send keyboard activity to server
  • set last send to current
  • clear cache
timestamp keyboard activity
  • session (#n) is extended, when current timestamp within "Session Expire Time" minutes
  • session (#n) is closed with last recognized timestamp and a new session (#n + 1) is started when current timestamp outside "Session Expire Time" minutes
User stops working – goes for a break for MORE than "Keyboard Inactive Timeout" minutes xxxx xxxx xxxx
User returns and continues with text
  • send keyboard activity to server from cache
  • send keyboard activity to server current
  • set last send to current
  • clear cache
  • timestamp keyboard activity from cache
  • timestamp keyboard activity current
  • session (#n) is extended, when from cache timestamp within "Session Expire Time" minutes
  • session (#n) is extended, when from current timestamp within "Session Expire Time" minutes
  • session (#n) is closed and a new session (#n + 1) is started when current timestamp outside "Session Expire Time" minutes
…..User continues with text and mouse when "Keyboard Activity Interval" passed since last send:

  • send keyboard activity to server
  • set last send to current
  • clear cache
timestamp keyboard activity
  • session (#n) is extended, when current timestamp within "Session Expire Time" minutes
  • session (#n) is closed with last recognized timestamp and a new session (#n + 1) is started when current timestamp outside "Session Expire Time" minutes
User stops working – goes for a break for LESS than "Keyboard Inactive Timeout" minutes xxxx xxxx xxxx
User returns and continues with text when "Keyboard Activity Interval" passed since last send:

  • send keyboard activity to server
  • set last send to current
  • clear cache
timestamp keyboard activity
  • session (#n) is extended, when current timestamp within "Session Expire Time" minutes
  • session (#n) is closed with last recognized timestamp and a new session (#n + 1) is started when current timestamp outside "Session Expire Time" minutes
…. …. …. ….

Example 4: Typing long text without using the mouse

If the moderator is typing more than "Minimum Key Only Characters" within "Keyboard Activity Interval" we send a keyboard activity to the server immediatly.

Cheating

Following precautions are already implemented to ensure the moderator is really working in the forum:

  • Continuous opening of preloaded topics does not trigger an activity in backend
  • Keybord and mouse events triggered by js code are ignored (except these clicks trigger an ajax callback that is monitored in backend)
  • Sessions have column "reply_count" > 0 if user worked with topics/replies and notes in the session (new, edited, spam, trash, restore, delete)

Following precautions could be implemented to ensure the moderator is really working in the forum like:

  • Analyse activity log for activity sequences to invalidate sessions
  • ….