jsPsych
Step 1. Setup Tracker
The Alias tracker integrates with JsPsych survey-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 API also does digital fingerprinting for additional security and duplicate detection.
The extension generates arrays of all the change events to open-ended questions (the “question histories”) as well as a fingerprint id, both of which you pass to our API. To use it:
- Add a link to it in
index.html
- Include it in the
initJsPsych
call - Pass it as an extension to any
jsPsychSurveyText
questions you want to track (you must include at least onesurvey-text
question 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_history
can be (by default, this is 50,000; we highly recommend setting it to at least 20,000). The extension also requires apage_id
parameter 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.
We include a full example of using our extension in a JsPsych experiment in the public/ directory of our GitHub repository. Here’s a simplified example:
Step 2. Call the API
Our tracker adds all data the Alias API needs to trial data with the jsPsychAliasTracker
extension, stored as alias_questions
, alias_responses
, alias_question_histories
, and alias_fingerprint_id
. This data can be passed to our API without any further modifications. See an example in call-api.py.
Step 3. Deploy on Heroku
Deploy an Alias JsPsych experiment to Heroku, a cloud platform service.