diff --git a/react/features/analytics/functions.js b/react/features/analytics/functions.js index 5b5b47832..440f9d60b 100644 --- a/react/features/analytics/functions.js +++ b/react/features/analytics/functions.js @@ -39,17 +39,19 @@ export function initAnalytics({ getState }: { getState: Function }) { const state = getState(); const config = state['features/base/config']; - const { analyticsScriptUrls } = config; - const { user } = state['features/base/jwt']; + const { analyticsScriptUrls, deploymentInfo } = config; + const { group, server, user } = state['features/base/jwt']; const handlerConstructorOptions = { - version: JitsiMeetJS.version, - user + envType: (deploymentInfo && deploymentInfo.envType) || 'dev', + group, + subproduct: deploymentInfo && deploymentInfo.environment, + user, + version: JitsiMeetJS.version }; _loadHandlers(analyticsScriptUrls, handlerConstructorOptions) .then(handlers => { const roomName = state['features/base/conference'].room; - const { group, server } = state['features/base/jwt']; const permanentProperties = {}; if (server) { @@ -61,8 +63,6 @@ export function initAnalytics({ getState }: { getState: Function }) { // Optionally, include local deployment information based on the // contents of window.config.deploymentInfo. - const { deploymentInfo } = config; - if (deploymentInfo) { for (const key in deploymentInfo) { if (deploymentInfo.hasOwnProperty(key)) {