How to detect people's hardware (e.g., using a pc or a tablet)

Hey Roberto :slight_smile:

This isn’t natively part of Pavlovia as far as I know, but in principle you can add custom JavaScript to do this. You can grab a function that returns true/false for either just mobile or mobile and tablet browsers from the top answer here: https://stackoverflow.com/questions/11381673/detecting-a-mobile-browser

Then add it as a code component at the start of the experiment that saves a variable with the relevant info. Then you just need to save that information somewhere, so in the “begin routine” code pane for your first trial, just add a “currentLoop.addData” function call and you should be able to save it to your data file.

EDIT: see also What access we have to the computer (i.e. can we tell which operating system is being used) during the online experiment?

1 Like