From e16c50d4be7fbec69a22a0857592e18dc9a194e4 Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Thu, 26 Apr 2018 10:59:43 +0100 Subject: [PATCH] Explain that full URL is sent to Piwik Also, redesign analytics modal to be one big table, instead of table + paragraph. --- res/css/structures/_UserSettings.scss | 4 +++ src/Analytics.js | 35 +++++++++++++++++---------- 2 files changed, 26 insertions(+), 13 deletions(-) diff --git a/res/css/structures/_UserSettings.scss b/res/css/structures/_UserSettings.scss index 4830814e4f..6fae8d6c1a 100644 --- a/res/css/structures/_UserSettings.scss +++ b/res/css/structures/_UserSettings.scss @@ -251,3 +251,7 @@ input.mx_UserSettings_phoneNumberField { color: $accent-color; word-break: break-all; } + +.mx_UserSettings_analyticsModal table { + margin: 10px 0px; +} diff --git a/src/Analytics.js b/src/Analytics.js index 04afd7c3d8..d33358111a 100644 --- a/src/Analytics.js +++ b/src/Analytics.js @@ -210,11 +210,25 @@ class Analytics { const rows = Object.values(customVariables).map((v) => Tracker.getCustomVariable(v.id)).filter(Boolean); const resolution = `${window.screen.width}x${window.screen.height}`; + const otherVariables = [ + { + expl: _td('Every page you use in the app'), + value: _t( + 'e.g. ', + {}, + { + CurrentPageURL: getRedactedUrl(), + }, + ), + }, + { expl: _td('Your User Agent'), value: navigator.userAgent }, + { expl: _td('Your device resolution'), value: resolution }, + ]; const ErrorDialog = sdk.getComponent('dialogs.ErrorDialog'); Modal.createTrackedDialog('Analytics Details', '', ErrorDialog, { title: _t('Analytics'), - description:
+ description:
{ _t('The information being sent to us to help make Riot.im better includes:') }
@@ -223,19 +237,14 @@ class Analytics { { _t(customVariables[row[0]].expl) } { row[1] } ) } - -
-
- { _t('We also record each page you use in the app (currently ), your User Agent' - + ' () and your device resolution ().', - {}, - { - CurrentPageHash: { getRedactedHash() }, - CurrentUserAgent: { navigator.userAgent }, - CurrentDeviceResolution: { resolution }, - }, + { otherVariables.map((item, index) => + + { _t(item.expl) } + { item.value } + , ) } - + +
{ _t('Where this page includes identifiable information, such as a room, ' + 'user or group ID, that data is removed before being sent to the server.') }