瀏覽代碼

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

factor2
Boris Grozev 8 年之前
父節點
當前提交
c7714959e6
共有 1 個檔案被更改,包括 3 行新增3 行删除
  1. 3
    3
      react/features/analytics/functions.js

+ 3
- 3
react/features/analytics/functions.js 查看文件

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…
取消
儲存