Report touch input status in rageshakes, analytics
This reports whether the device has touch input as a primary input mechanism in rageshakes and analytics. For analytics, this replaces the identity server (which ends up being reported as "<redacted>" by default anyway) because Matomo only supports a limited number of custom variables.
This commit is contained in:
@@ -73,6 +73,12 @@ export default async function sendBugReport(bugReportEndpoint, opts) {
|
||||
installedPWA = window.matchMedia('(display-mode: standalone)').matches;
|
||||
} catch (e) { }
|
||||
|
||||
let touchInput = "UNKNOWN";
|
||||
try {
|
||||
// MDN claims broad support across browsers
|
||||
touchInput = window.matchMedia('(pointer: coarse)').matches;
|
||||
} catch (e) { }
|
||||
|
||||
const client = MatrixClientPeg.get();
|
||||
|
||||
console.log("Sending bug report.");
|
||||
@@ -83,6 +89,7 @@ export default async function sendBugReport(bugReportEndpoint, opts) {
|
||||
body.append('version', version);
|
||||
body.append('user_agent', userAgent);
|
||||
body.append('installed_pwa', installedPWA);
|
||||
body.append('touch_input', touchInput);
|
||||
|
||||
if (client) {
|
||||
body.append('user_id', client.credentials.userId);
|
||||
|
||||
Reference in New Issue
Block a user