Algorithm 1 Telemetry Data Collection |
upon Document is fully loaded do
on KeyDown event on window do
Current timestamp
Call SendTelemetryData with ‘keyboard’ and
end on
on MouseMove event on window do
Current timestamp
Mouse X coordinate from event
Mouse Y coordinate from event
Call SendTelemetryData with ‘mouse’, , ,
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
|