Browse Source

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

j8
Boris Grozev 8 years ago
parent
commit
c7714959e6
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      react/features/analytics/functions.js

+ 3
- 3
react/features/analytics/functions.js View File

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

Loading…
Cancel
Save