Skip to main content

setExpInfo(experimentID, participantID, saveData)

Register experiment and participant identifiers. Call this before setting up the tracker so data is associated with the correct experiment.

chiasm.setExpInfo('abc123def456ghi789jkl012', 'participant_42', true);
ParameterTypeRequiredDefaultDescription
experimentIDstringYes24-character alphanumeric experiment identifier
participantIDstringYesArbitrary participant identifier (from your platform or your own scheme)
saveDatabooleanNofalseWhether to save gaze data to the Chiasm dashboard

Throws an error if experimentID is not a valid 24-character alphanumeric string or if boolean flags are not booleans.