PsyCloud

Telemetry & Events

As a study runs, PsyCloud records a stream of structured events — the same stream you see in the Preview Events dock and that powers Time Machine and your exported data. Events use a versioned envelope (current schema 2.0.0).

The event envelope

Every event is wrapped in an envelope with consistent metadata:

  • timingwallTime (ISO clock), perfNowMs (high-resolution monotonic time, used for accurate RT), and epochMs.
  • sequence — a globally unique eventId, a monotonic sequenceNumber, and parent/cause links for hierarchical events.
  • session — context attached to every event: sessionId, experimentId, subjectId (a study-scoped pseudonym, not PII), and the current trialNumber / blockNumber / phaseId / stepId.
  • payload — the event-type-specific data.

Event types

There are ~31 core event types (plus custom_*), grouped by concern:

GroupEvents
Session lifecyclesession_start, session_resume, session_end, session_pause, session_wake
Experiment lifecycleexperiment_start, experiment_end, block_start, block_end, trial_start, trial_end
Structured timephase_start, phase_end, step_start, step_end
Stimulusstimulus_present, stimulus_update, stimulus_remove
Responseresponse (a single unified event — see below)
Quality signalsquality_attention_check, quality_bot_detection, quality_data_validation, quality_timing_anomaly
Systemerror, warning, checkpoint
Focus & networkfocus_change, visibility_change, asset_load, network_status

The response event

Responses are captured by one unified response event with a kind discriminator (keypress | mouse | touch | timeout | form | custom). Its key fields:

  • responseTime{ stimulusOnsetPerfNowMs, responsePerfNowMs, rtMs } (all performance.now() milliseconds, for precise RT).
  • collector — which component collected it (componentId, componentVersion, manifestHash, params).
  • data — the response value(s) (key, value, choice, …).
  • accuracy{ isCorrect, correctResponse, actualResponse } when correctness is computed.
  • nonResponsetrue for timeouts.

When you write authoring expressions, read the canonical fields (outcome.correct, outcome.rtMs, outcome.timedOut, response.primary.*) rather than these raw telemetry paths.

Reliable, offline-first

Events are buffered and persisted locally (IndexedDB) with per-event sync state, so capture survives flaky connectivity and syncs when the connection returns. Each stored event keeps its sync status and retry metadata — the basis of PsyCloud's reliability guarantees.

Next

Components →

Which components emit which events.