瀏覽代碼

Merge pull request #2357 from bgrozev/analytics-update

Analytics update
master
virtuacoplenny 7 年之前
父節點
當前提交
9eff669b0b
沒有連結到貢獻者的電子郵件帳戶。
共有 1 個檔案被更改,包括 7 行新增7 行删除
  1. 7
    7
      react/features/analytics/functions.js

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

@@ -39,17 +39,19 @@ 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;
43
-    const { user } = state['features/base/jwt'];
42
+    const { analyticsScriptUrls, deploymentInfo } = config;
43
+    const { group, server, user } = state['features/base/jwt'];
44 44
     const handlerConstructorOptions = {
45
-        version: JitsiMeetJS.version,
46
-        user
45
+        envType: (deploymentInfo && deploymentInfo.envType) || 'dev',
46
+        group,
47
+        subproduct: deploymentInfo && deploymentInfo.environment,
48
+        user,
49
+        version: JitsiMeetJS.version
47 50
     };
48 51
 
49 52
     _loadHandlers(analyticsScriptUrls, handlerConstructorOptions)
50 53
         .then(handlers => {
51 54
             const roomName = state['features/base/conference'].room;
52
-            const { group, server } = state['features/base/jwt'];
53 55
             const permanentProperties = {};
54 56
 
55 57
             if (server) {
@@ -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)) {

Loading…
取消
儲存