{{ 'core.settings.enableanalytics' | translate }}
{{ 'core.settings.enableanalyticsdescription' | translate }}
diff --git a/src/core/features/settings/pages/general/general.ts b/src/core/features/settings/pages/general/general.ts index de859cb2d..638b088ef 100644 --- a/src/core/features/settings/pages/general/general.ts +++ b/src/core/features/settings/pages/general/general.ts @@ -44,7 +44,7 @@ export class CoreSettingsGeneralPage { selectedZoomLevel = CoreZoomLevel.NONE; richTextEditor = true; debugDisplay = false; - analyticsSupported = false; + analyticsAvailable = false; analyticsEnabled = false; colorSchemes: CoreColorScheme[] = []; selectedScheme: CoreColorScheme = CoreColorScheme.LIGHT; @@ -101,8 +101,8 @@ export class CoreSettingsGeneralPage { this.debugDisplay = await CoreConfig.get(CoreConstants.SETTINGS_DEBUG_DISPLAY, false); - this.analyticsSupported = CoreAnalytics.hasHandlers(); - if (this.analyticsSupported) { + this.analyticsAvailable = await CoreAnalytics.isAnalyticsAvailable(); + if (this.analyticsAvailable) { this.analyticsEnabled = await CoreConfig.get(CoreConstants.SETTINGS_ANALYTICS_ENABLED, true); } diff --git a/src/core/services/analytics.ts b/src/core/services/analytics.ts index e442a6a89..71146ad89 100644 --- a/src/core/services/analytics.ts +++ b/src/core/services/analytics.ts @@ -57,6 +57,29 @@ export class CoreAnalyticsService extends CoreDelegate