Merge pull request #3856 from dpalou/MOBILE-4459
MOBILE-4459 analytics: Don't log analytic events for demo sitesmain
commit
5bd1954b1b
|
@ -63,7 +63,7 @@ export class CoreAnalyticsService extends CoreDelegate<CoreAnalyticsHandler> {
|
||||||
* @returns True if available, false otherwise.
|
* @returns True if available, false otherwise.
|
||||||
*/
|
*/
|
||||||
async isAnalyticsAvailable(): Promise<boolean> {
|
async isAnalyticsAvailable(): Promise<boolean> {
|
||||||
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.
|
// There is an enabled handler, analytics is available.
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -87,7 +87,7 @@ export class CoreAnalyticsService extends CoreDelegate<CoreAnalyticsHandler> {
|
||||||
*/
|
*/
|
||||||
async logEvent(event: CoreAnalyticsAnyEvent): Promise<void> {
|
async logEvent(event: CoreAnalyticsAnyEvent): Promise<void> {
|
||||||
const site = CoreSites.getCurrentSite();
|
const site = CoreSites.getCurrentSite();
|
||||||
if (!site) {
|
if (!site || site.isDemoModeSite()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue