diff --git a/static/app-strings.json b/static/app-strings.json index f77187cb4..66367abd9 100644 --- a/static/app-strings.json +++ b/static/app-strings.json @@ -984,5 +984,6 @@ "A copy of your wallet is synced to lbry.tv": "A copy of your wallet is synced to lbry.tv", "Internal sharing is required while signed in.": "Internal sharing is required while signed in.", "Your wallet is not currently synced with lbry.tv. You are in control of backing up your wallet.": "Your wallet is not currently synced with lbry.tv. You are in control of backing up your wallet.", - "FINAL WARNING: This action is permanent and cannot be undone.": "FINAL WARNING: This action is permanent and cannot be undone." -} + "FINAL WARNING: This action is permanent and cannot be undone.": "FINAL WARNING: This action is permanent and cannot be undone.", + "Allow the app to access third party analytics platforms": "Allow the app to access third party analytics platforms" +} \ No newline at end of file diff --git a/ui/analytics.js b/ui/analytics.js index faeffd21a..01c704e23 100644 --- a/ui/analytics.js +++ b/ui/analytics.js @@ -16,7 +16,7 @@ const LBRY_TV_UA_ID = 'UA-60403362-12'; const DESKTOP_UA_ID = 'UA-60403362-13'; const SECOND_TRACKER_NAME = 'tracker2'; -const SHARE_INTERNAL = 'shareInternal'; +export const SHARE_INTERNAL = 'shareInternal'; const SHARE_THIRD_PARTY = 'shareThirdParty'; // @if TARGET='app' diff --git a/ui/redux/actions/app.js b/ui/redux/actions/app.js index 5b01bccfc..9c091cf7b 100644 --- a/ui/redux/actions/app.js +++ b/ui/redux/actions/app.js @@ -38,7 +38,7 @@ import { import { selectDaemonSettings } from 'redux/selectors/settings'; import { doAuthenticate, doGetSync } from 'lbryinc'; import { lbrySettings as config, version as appVersion } from 'package.json'; -import analytics from 'analytics'; +import analytics, { SHARE_INTERNAL } from 'analytics'; import { doSignOutCleanup, deleteSavedPassword, getSavedPassword } from 'util/saved-passwords'; // @if TARGET='app' @@ -320,8 +320,9 @@ export function doAlertError(errorList) { export function doDaemonReady() { return (dispatch, getState) => { const state = getState(); - const daemonSettings = selectDaemonSettings(state); - const { share_usage_data: shareUsageData } = daemonSettings; + + // TODO: call doFetchDaemonSettings, then get usage data, and call doAuthenticate once they are loaded into the store + const shareUsageData = window.localStorage.getItem(SHARE_INTERNAL) === 'true'; dispatch(doAuthenticate(appVersion, undefined, undefined, shareUsageData)); dispatch({ type: ACTIONS.DAEMON_READY });