Skip to main content
. 2024 Jun 8;24(12):3735. doi: 10.3390/s24123735
Algorithm 1 Telemetry Data Collection
  • upon Document is fully loaded do

  •      on KeyDown event on window do

  •         timestamp Current timestamp

  •         Call SendTelemetryData with ‘keyboard’ and timestamp

  •      end on

  •      on MouseMove event on window do

  •         timestamp Current timestamp

  •         mouseX Mouse X coordinate from event

  •         mouseY Mouse Y coordinate from event

  •         Call SendTelemetryData with ‘mouse’, timestamp, mouseX, mouseY

  •      end on

  •      function SendTelemetryData(eventType, timestamp, x, y)

  •         Send POST request to ‘/track_telemetry’ with event data

  •         on Response received do

  •            Log response message

  •         end on

  •      end function

  • end upon