Bläddra i källkod

feat: Passes the environment type and subproduct to the analytics handler constructor.

master
Boris Grozev 7 år sedan
förälder
incheckning
c7714959e6
1 ändrade filer med 3 tillägg och 3 borttagningar
  1. 3
    3
      react/features/analytics/functions.js

+ 3
- 3
react/features/analytics/functions.js Visa fil

@@ -39,10 +39,12 @@ export function initAnalytics({ getState }: { getState: Function }) {
39 39
 
40 40
     const state = getState();
41 41
     const config = state['features/base/config'];
42
-    const { analyticsScriptUrls } = config;
42
+    const { analyticsScriptUrls, deploymentInfo } = config;
43 43
     const { group, server, user } = state['features/base/jwt'];
44 44
     const handlerConstructorOptions = {
45
+        envType: (deploymentInfo && deploymentInfo.envType) || 'dev',
45 46
         group,
47
+        subproduct: deploymentInfo && deploymentInfo.environment,
46 48
         user,
47 49
         version: JitsiMeetJS.version
48 50
     };
@@ -61,8 +63,6 @@ export function initAnalytics({ getState }: { getState: Function }) {
61 63
 
62 64
             // Optionally, include local deployment information based on the
63 65
             // contents of window.config.deploymentInfo.
64
-            const { deploymentInfo } = config;
65
-
66 66
             if (deploymentInfo) {
67 67
                 for (const key in deploymentInfo) {
68 68
                     if (deploymentInfo.hasOwnProperty(key)) {

Laddar…
Avbryt
Spara