From 6a9b7395419e2cf978dc6e02fef4e8265a225c7f Mon Sep 17 00:00:00 2001 From: Lorenzo Alberto Maria Ambrosi Date: Wed, 20 Mar 2019 11:11:19 +0100 Subject: [PATCH] New parameter in webview for opt-out analytics Change-type: patch Changelog-entry: New parameter in webview for opt-out analytics Signed-off-by: Lorenzo Alberto Maria Ambrosi --- lib/gui/app/components/safe-webview/safe-webview.jsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/gui/app/components/safe-webview/safe-webview.jsx b/lib/gui/app/components/safe-webview/safe-webview.jsx index 137c661a..55341328 100644 --- a/lib/gui/app/components/safe-webview/safe-webview.jsx +++ b/lib/gui/app/components/safe-webview/safe-webview.jsx @@ -51,6 +51,14 @@ const ETCHER_VERSION_PARAM = 'etcher-version' */ const API_VERSION_PARAM = 'api-version' +/** + * @summary Opt-out analytics search-parameter key + * @constant + * @private + * @type {String} + */ +const OPT_OUT_ANALYTICS_PARAM = 'optOutAnalytics' + /** * @summary Webview API version * @constant @@ -91,6 +99,7 @@ class SafeWebview extends react.PureComponent { // We set the version GET parameters here. url.searchParams.set(ETCHER_VERSION_PARAM, packageJSON.version) url.searchParams.set(API_VERSION_PARAM, API_VERSION) + url.searchParams.set(OPT_OUT_ANALYTICS_PARAM, !settings.get('errorReporting')) this.entryHref = url.href