浏览代码

analytics: add app name to permanent properties

master
Saúl Ibarra Corretgé 5 年前
父节点
当前提交
1c3cf325cb
共有 1 个文件被更改,包括 6 次插入2 次删除
  1. 6
    2
      react/features/analytics/functions.js

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

1
 // @flow
1
 // @flow
2
 
2
 
3
 import { API_ID } from '../../../modules/API/constants';
3
 import { API_ID } from '../../../modules/API/constants';
4
+import { getName as getAppName } from '../app/functions';
4
 import {
5
 import {
5
     checkChromeExtensionsInstalled,
6
     checkChromeExtensionsInstalled,
6
     isMobileBrowser
7
     isMobileBrowser
167
         permanentProperties.group = group;
168
         permanentProperties.group = group;
168
     }
169
     }
169
 
170
 
170
-    //  Report if user is using websocket
171
+    // Report the application name
172
+    permanentProperties.appName = getAppName();
173
+
174
+    // Report if user is using websocket
171
     permanentProperties.websocket = navigator.product !== 'ReactNative' && typeof config.websocket === 'string';
175
     permanentProperties.websocket = navigator.product !== 'ReactNative' && typeof config.websocket === 'string';
172
 
176
 
173
-    // permanentProperties is external api
177
+    // Report if user is using the external API
174
     permanentProperties.externalApi = typeof API_ID === 'number';
178
     permanentProperties.externalApi = typeof API_ID === 'number';
175
 
179
 
176
     // Report if we are loaded in iframe
180
     // Report if we are loaded in iframe

正在加载...
取消
保存