Get the Data
Chiasm returns gaze data as an array of prediction objects. Each object contains a unique frame ID, a timestamp (in milliseconds), and the predicted gaze coordinates on the screen. If you provide an eventId, it is included as well:
[
{
"frameId": "15813239-5902-404d-acf6-fd3c784a1cce",
"timestamp": 132724,
"x": 692.23,
"y": 581.55
},
{
"frameId": "1011fe71-61f8-4e2c-bfa9-3927a313bc1a",
"timestamp": 132757,
"x": 723.48,
"y": 562.01,
"eventId": "stimulus_onset"
},
{
"frameId": "709d98ff-5c1c-4300-bec4-8cfc689b0a26",
"timestamp": 132795,
"x": 734.27,
"y": 563.36,
"eventId": "stimulus_onset"
}
]
| Field | Description |
|---|---|
frameId | Unique identifier for each captured frame |
timestamp | Time in milliseconds since the recording started |
x | Predicted horizontal gaze position (pixels) |
y | Predicted vertical gaze position (pixels) |
eventId | (optional) User-provided label for tagging frames with experiment events |
Gaze predictions are always returned as a response to the calling code — there is no separate data endpoint to configure. The saveData parameter in setExpInfo controls whether a copy is also saved to the Chiasm dashboard.
Option A — Response only (saveData: false)
When saveData is set to false (the default), gaze predictions are returned in the response to your calling code but not stored on Chiasm servers.
tracker.setExpInfo('YOUR_EXPERIMENT_ID', 'YOUR_PARTICIPANT_ID', false);
After startRecording, predictions come back directly in the response. You can then store or process them however you like — no additional routing or endpoint setup is needed.
Option B — Response + dashboard (saveData: true)
When saveData is set to true, gaze predictions are returned in the response and a copy is uploaded to the Chiasm servers.
tracker.setExpInfo('YOUR_EXPERIMENT_ID', 'YOUR_PARTICIPANT_ID', true);
You still receive the data in your code exactly the same way, but you can also:
- Open your experiment in the Chiasm dashboard.
- Browse individual participant sessions.
- Download the gaze data as CSV files for analysis (contact us so we can provide a private link)
Which should I choose?
Response only (false) | Response + dashboard (true) | |
|---|---|---|
| Data returned in response | Yes | Yes |
| Data saved to Chiasm | No | Yes |
| Dashboard access & CSV export | No | Yes |
| Best for | Custom pipelines, strict data-residency requirements | Fast setup, backup copy |
Next Steps
- Custom Code tutorial — full walkthrough for a vanilla JavaScript experiment
setExpInforeference — details on all parametersstartRecordingreference — how gaze data is captured during a session