Step 1. Setup Tracker
The Alias tracker integrates with JsPsychsurvey-text trials to identify potential fraudelent, inattentive, or bot-like responses to open-ended questions. You can use this as a naturalistic captcha to identify participants to exclude from your analyses.
The extension generates arrayss of all the change events to open-ended questions (called “question histories”), which you can pass to our API. To use it:
- Add a link to it in
index.html - Include it in the
initJsPsychcall - Pass it as an extension to any
jsPsychSurveyTextquestions you want to track (you must include at least onesurvey-textquestion with our extension) The Alias tracker takes an optional initialization argumentmax_n_characters, when specifies the max number of characters the JSON string of eachquestion_historycan be (by default, this is 50,000; we highly recommend setting it to at least 20,000). The extension also requires apage_idparameter on every trial where the extension is used. This allows you to easily compare responses across participants even if there are conditional timelines or repeated questions.
Step 2. Call the API
Our tracker adds all data the Alias API needs to trial data with thejsPsychAliasTracker extension, stored as alias_questions, alias_responses, and alias_question_histories. This data can be passed to our API without any further modifications. See an example in call-api.py.

