diff --git a/helpers/fb/analytics.ts b/helpers/fb/analytics.ts index 0c964c41d..be859c33b 100644 --- a/helpers/fb/analytics.ts +++ b/helpers/fb/analytics.ts @@ -13,6 +13,7 @@ type SettingsCustomDimensions = { syncHistory: boolean usesBg: HoppBgColor usesAccent: HoppAccentColor + usesTelemetry: boolean } type HoppRequestEvent = @@ -54,6 +55,7 @@ function initSettingsListeners() { syncHistory: settings.syncHistory, usesAccent: settings.THEME_COLOR, usesBg: settings.BG_COLOR, + usesTelemetry: settings.TELEMETRY_ENABLED, } analytics.setUserProperties(conf) diff --git a/lang/en-US.json b/lang/en-US.json index 4130f88df..8ddcc7491 100644 --- a/lang/en-US.json +++ b/lang/en-US.json @@ -339,5 +339,6 @@ "hide_sidebar": "Hide sidebar", "show_sidebar": "Show sidebar", "protocols": "Protocols", - "protocol_count": "protocol {count}" + "protocol_count": "protocol {count}", + "telemetry": "Telemetry" } diff --git a/newstore/settings.ts b/newstore/settings.ts index 1d506ecd4..7fa279aba 100644 --- a/newstore/settings.ts +++ b/newstore/settings.ts @@ -41,6 +41,7 @@ export type SettingsType = { } THEME_COLOR: HoppAccentColor BG_COLOR: HoppBgColor + TELEMETRY_ENABLED: boolean } export const defaultSettings: SettingsType = { @@ -62,6 +63,7 @@ export const defaultSettings: SettingsType = { }, THEME_COLOR: "green", BG_COLOR: "system", + TELEMETRY_ENABLED: true, } const validKeys = Object.keys(defaultSettings) diff --git a/pages/settings.vue b/pages/settings.vue index 436e8f46d..247276280 100644 --- a/pages/settings.vue +++ b/pages/settings.vue @@ -199,6 +199,15 @@ {{ $t("use_experimental_url_bar") }} + + + {{ $t("telemetry") }} + {{ TELEMETRY_ENABLED ? $t("enabled") : $t("disabled") }} + + @@ -263,6 +272,8 @@ export default Vue.extend({ SYNC_ENVIRONMENTS: getSettingSubject("syncEnvironments"), SYNC_HISTORY: getSettingSubject("syncHistory"), + TELEMETRY_ENABLED: getSettingSubject("TELEMETRY_ENABLED"), + // Teams feature flag currentBackendUser: currentUserInfo$, currentUser: currentUser$, diff --git a/store/postwoman.js b/store/postwoman.js index 792c22056..14fd4f497 100644 --- a/store/postwoman.js +++ b/store/postwoman.js @@ -34,6 +34,11 @@ export const SETTINGS_KEYS = [ */ "EXTENSIONS_ENABLED", + /** + * A boolean value indicating whether Telemetry is enabled. + */ + "TELEMETRY_ENABLED", + /** * A boolean value indicating whether to use the URL bar experiments */