diff --git a/react/features/analytics/functions.js b/react/features/analytics/functions.js index 2769e77ad..e8b131b8e 100644 --- a/react/features/analytics/functions.js +++ b/react/features/analytics/functions.js @@ -187,7 +187,7 @@ export function initAnalytics({ getState }: { getState: Function }, handlers: Ar permanentProperties.externalApi = typeof API_ID === 'number'; // Report if we are loaded in iframe - permanentProperties.inIframe = _inIframe(); + permanentProperties.inIframe = inIframe(); // Report the tenant from the URL. permanentProperties.tenant = tenant || '/'; @@ -227,7 +227,7 @@ export function initAnalytics({ getState }: { getState: Function }, handlers: Ar * @returns {boolean} Returns {@code true} if loaded in iframe. * @private */ -function _inIframe() { +export function inIframe() { if (navigator.product === 'ReactNative') { return false; } diff --git a/react/features/app/middleware.js b/react/features/app/middleware.js index 82615fe1c..422310832 100644 --- a/react/features/app/middleware.js +++ b/react/features/app/middleware.js @@ -2,6 +2,7 @@ import { createConnectionEvent, + inIframe, sendAnalytics } from '../analytics'; import { SET_ROOM } from '../base/conference'; @@ -53,6 +54,10 @@ function _connectionEstablished(store, next, action) { // determined by when no one needs them anymore. const { history, location } = window; + if (inIframe()) { + return; + } + if (history && location && history.length