Comments (6)
Seems like we should be able to do this by referring to the navigator variable (navigator.userAgent). See, e.g.,
https://www.tutorialspoint.com/how-to-find-operating-system-in-the-client-machine-using-javascript
from nivturk.
Or navigator.platform, perhaps: https://stackoverflow.com/questions/9038625/detect-if-device-is-ios
from nivturk.
Seconding your suggestion for using navigator.userAgent
based on this tutorial.
Trying to give some thought as to why we want this info. I can think of two immediate reasons:
- Debugging: If our task fails with a participant, knowing their set up will make it easier to debug.
- Exclusion: If we want to exclude mobile users.
The first motivation merely requires logging the information. The second motivation requires doing something with the info. It seems detecting a mobile user is doable but nontrivial, and requires periodic updating of regex.
Another potential solution, as suggested here, is simply logging the size of the screen and preventing users from advancing until their screen has reasonable dimensions.
In any event, implementing (1) seems reasonable.
from nivturk.
See also: https://github.com/matomo-org/device-detector
from nivturk.
Recording user platform/device with ad6bdc4.
Turns out Flask includes platform/browser detection. Will work on excluding mobile users with next push.
from nivturk.
Mobile users excluded with 95565b2.
from nivturk.
Related Issues (20)
- How to save data to the data folder HOT 12
- save data as CSV HOT 1
- Redirection in experiment.py vs experiment.html HOT 2
- When debug=true, works. Once set debug=false, server gives error HOT 2
- [bug] nivturk plugins sometimes fail to load
- Add "Download" button on consent form for participants to keep a copy of the consent form. HOT 3
- add CHANGELOG.md
- consent form updates (2022, Dec)
- handling saving errors HOT 1
- updates to consent form (2023 feb)
- user_agent does not return browser/platform info
- upgrade jquery (3.3.1 => 3.7.0)
- update consent forms
- update flask version
- [docs] write testing / troubleshooting guide
- [bug] interference across different nivturk experiments HOT 1
- partial data saving
- [mturk] cloudresearch no longer uses dynamic codes
- "Basic Usage" section in the documentation disappeared HOT 1
- [docs] update mturk page
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nivturk.