Repository logo

MouseView.js: Reliable and valid attention tracking in web-based experiments using a cursor-directed aperture.

Published version

Change log


Anwyl-Irvine, Alexander L 
Armstrong, Thomas 


Psychological research is increasingly moving online, where web-based studies allow for data collection at scale. Behavioural researchers are well supported by existing tools for participant recruitment, and for building and running experiments with decent timing. However, not all techniques are portable to the Internet: While eye tracking works in tightly controlled lab conditions, webcam-based eye tracking suffers from high attrition and poorer quality due to basic limitations like webcam availability, poor image quality, and reflections on glasses and the cornea. Here we present MouseView.js, an alternative to eye tracking that can be employed in web-based research. Inspired by the visual system, MouseView.js blurs the display to mimic peripheral vision, but allows participants to move a sharp aperture that is roughly the size of the fovea. Like eye gaze, the aperture can be directed to fixate on stimuli of interest. We validated MouseView.js in an online replication (N = 165) of an established free viewing task (N = 83 existing eye-tracking datasets), and in an in-lab direct comparison with eye tracking in the same participants (N = 50). Mouseview.js proved as reliable as gaze, and produced the same pattern of dwell time results. In addition, dwell time differences from MouseView.js and from eye tracking correlated highly, and related to self-report measures in similar ways. The tool is open-source, implemented in JavaScript, and usable as a standalone library, or within Gorilla, jsPsych, and PsychoJS. In sum, MouseView.js is a freely available instrument for attention-tracking that is both reliable and valid, and that can replace eye tracking in certain web-based psychological experiments.



Attention, JavaScript, cyberpsychology, eye tracking, online experiments, open-source, Data Collection, Eye-Tracking Technology, Fixation, Ocular, Humans, Internet

Journal Title

Behav Res Methods

Conference Name

Journal ISSN


Volume Title



Springer Science and Business Media LLC
Templeton World Charity Foundation (grant TWCF0159) UK Medical Research Council (grant MC-A0606-5PQ41)