diff --git a/src/core/services/analytics.ts b/src/core/services/analytics.ts index 71146ad89..660e3958a 100644 --- a/src/core/services/analytics.ts +++ b/src/core/services/analytics.ts @@ -63,7 +63,7 @@ export class CoreAnalyticsService extends CoreDelegate { * @returns True if available, false otherwise. */ async isAnalyticsAvailable(): Promise { - if (Object.keys(this.enabledHandlers).length > 0) { + if (Object.keys(this.enabledHandlers).length > 0 && !CoreSites.getCurrentSite()?.isDemoModeSite()) { // There is an enabled handler, analytics is available. return true; } @@ -87,7 +87,7 @@ export class CoreAnalyticsService extends CoreDelegate { */ async logEvent(event: CoreAnalyticsAnyEvent): Promise { const site = CoreSites.getCurrentSite(); - if (!site) { + if (!site || site.isDemoModeSite()) { return; }