ソースを参照

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,6 +1,7 @@
1 1
 // @flow
2 2
 
3 3
 import { API_ID } from '../../../modules/API/constants';
4
+import { getName as getAppName } from '../app/functions';
4 5
 import {
5 6
     checkChromeExtensionsInstalled,
6 7
     isMobileBrowser
@@ -167,10 +168,13 @@ export function initAnalytics({ getState }: { getState: Function }, handlers: Ar
167 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 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 178
     permanentProperties.externalApi = typeof API_ID === 'number';
175 179
 
176 180
     // Report if we are loaded in iframe

読み込み中…
キャンセル
保存