From 1a339100abe608047dc9af90ae7242565f9a0531 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Thu, 24 Sep 2020 11:51:54 +0200 Subject: [PATCH] fix(analytics) avoid Amplitude initialization failure on mobile --- react/features/analytics/handlers/AmplitudeHandler.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/react/features/analytics/handlers/AmplitudeHandler.js b/react/features/analytics/handlers/AmplitudeHandler.js index f4ca5d208..0535c10b1 100644 --- a/react/features/analytics/handlers/AmplitudeHandler.js +++ b/react/features/analytics/handlers/AmplitudeHandler.js @@ -72,6 +72,11 @@ export default class AmplitudeHandler extends AbstractHandler { * @returns {Object} */ getIdentityProps() { + // TODO: Remove when web and native Aplitude implementations are unified. + if (navigator.product === 'ReactNative') { + return {}; + } + return { sessionId: amplitude.getInstance(this._amplitudeOptions).getSessionId(), deviceId: amplitude.getInstance(this._amplitudeOptions).options.deviceId,