From e898527294ce171bb94a0141e8f3793aa57e4d30 Mon Sep 17 00:00:00 2001 From: Boris Grozev Date: Thu, 4 Jan 2018 09:11:35 -0600 Subject: [PATCH 1/2] feat: Passes the "group" from JWT to the analytics handler constructor. --- react/features/analytics/functions.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/react/features/analytics/functions.js b/react/features/analytics/functions.js index 5b5b47832..ca334d3cf 100644 --- a/react/features/analytics/functions.js +++ b/react/features/analytics/functions.js @@ -40,16 +40,16 @@ 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 { group, server, user } = state['features/base/jwt']; const handlerConstructorOptions = { - version: JitsiMeetJS.version, - user + group, + 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) { From c7714959e639d545ab204443e53e6f3d2930075c Mon Sep 17 00:00:00 2001 From: Boris Grozev Date: Thu, 4 Jan 2018 09:34:12 -0600 Subject: [PATCH 2/2] feat: Passes the environment type and subproduct to the analytics handler constructor. --- react/features/analytics/functions.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/react/features/analytics/functions.js b/react/features/analytics/functions.js index ca334d3cf..440f9d60b 100644 --- a/react/features/analytics/functions.js +++ b/react/features/analytics/functions.js @@ -39,10 +39,12 @@ export function initAnalytics({ getState }: { getState: Function }) { const state = getState(); const config = state['features/base/config']; - const { analyticsScriptUrls } = config; + const { analyticsScriptUrls, deploymentInfo } = config; const { group, server, user } = state['features/base/jwt']; const handlerConstructorOptions = { + envType: (deploymentInfo && deploymentInfo.envType) || 'dev', group, + subproduct: deploymentInfo && deploymentInfo.environment, user, version: JitsiMeetJS.version }; @@ -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)) {