analytics: add app name to permanent properties

This commit is contained in:
Saúl Ibarra Corretgé 2020-07-23 12:07:30 +02:00 committed by Saúl Ibarra Corretgé
parent fdbd681c8f
commit 1c3cf325cb
1 changed files with 6 additions and 2 deletions

View File

@ -1,6 +1,7 @@
// @flow
import { API_ID } from '../../../modules/API/constants';
import { getName as getAppName } from '../app/functions';
import {
checkChromeExtensionsInstalled,
isMobileBrowser
@ -167,10 +168,13 @@ export function initAnalytics({ getState }: { getState: Function }, handlers: Ar
permanentProperties.group = group;
}
// Report the application name
permanentProperties.appName = getAppName();
// Report if user is using websocket
permanentProperties.websocket = navigator.product !== 'ReactNative' && typeof config.websocket === 'string';
// permanentProperties is external api
// Report if user is using the external API
permanentProperties.externalApi = typeof API_ID === 'number';
// Report if we are loaded in iframe