Skip to main content
ReDem only uses the last 300 MOUSE_MOVEMENT and last 300 MOUSE_CLICK events per BAS data point. Cap client-side tracking at the same limits — storing more only inflates browser session data without improving scoring.
CATI / shared browser sessions: When interviewers run back-to-back interviews in the same browser tab, clear BAS sessionStorage data after each interview is submitted to ReDem (success or error) and again at survey entry. Otherwise mouse and keystroke events from a prior interview can bleed into the next respondent. Do not clear on every question page — only at survey entry and after addRespondent, so multi-page interviews can still accumulate tracking data.
1

Implementing a JavaScript Tracker for User Behavior Data

Copy the simple JavaScript tracker code (attached) into your survey platform’s frontend codebase or UI. This ensures that, whenever respondent complete surveys, it tracks input behavior data for open-ended questions directly from their individual browsers.

2

Integrate ReDem API into your workflow

We are using this script to persist this input_behavior in the browser until you are ready to call the API.

3

Use API response to trigger your next step

When you are making the API call to ReDem use this structure from the session storage and make sure to connect QUESTION_ID during the integration process. For CATI, clear BAS keys at survey entry and again after addRespondent (success or error):