Get client data with javascript
Available information from your user at page load with simple javascript, events and two simple external requests.
This information can be used in multiple scenarios to customize the user experience and populate forms without needing to manually input the information.
JavaScript:
information | value | javascript |
---|---|---|
platform | - | navigator.platform |
screen orientation | - | screen.orientation |
screen width | - | screen.width |
screen height | - | screen.height |
screen color depth | - | screen.colorDepth |
screen pixel ratio | - | devicePixelRatio |
connection type | - | navigator.connection.effectiveType |
download speed | - | navigator.connection.downlink |
round trip time | - | navigator.connection.rtt |
browser | - | navigator.userAgent |
localStorage | - | localStorage |
referrer | - | document.referrer |
language | - | navigator.language |
window width | - | window.outerWidth |
window height | - | window.outerHeight |
website width | - | window.innerWidth |
website height | - | window.innerHeight |
page visibility | - | document.visibilityState |
microphone | - | navigator.mediaDevices |
web camera | - | navigator.mediaDevices |
External requests:
information | value | request |
---|---|---|
http version | - | GET https://www.cloudflare.com/cdn-cgi/trace |
ip | - | GET https://www.cloudflare.com/cdn-cgi/trace |
country | - | GET https://www.cloudflare.com/cdn-cgi/trace |
User interaction:
information | value | javascript |
---|---|---|
mouse left | - | MouseEvent.pageX |
mouse top | - | MouseEvent.pageY |
scroll top | - | window.scrollY |
keylogger | - | KeyboardEvent.code |