浏览代码

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

master
Boris Grozev 7 年前
父节点
当前提交
c7714959e6
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3
    3
      react/features/analytics/functions.js

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

@@ -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)) {

正在加载...
取消
保存