|
|
@@ -35,20 +35,21 @@ export function initAnalytics({ getState }: { getState: Function }) {
|
|
35
|
35
|
return;
|
|
36
|
36
|
}
|
|
37
|
37
|
|
|
38
|
|
- const config = getState()['features/base/config'];
|
|
|
38
|
+ const state = getState();
|
|
|
39
|
+ const config = state['features/base/config'];
|
|
39
|
40
|
const { analyticsScriptUrls } = config;
|
|
40
|
41
|
const machineId = JitsiMeetJS.getMachineId();
|
|
|
42
|
+ const { user } = state['features/base/jwt'];
|
|
41
|
43
|
const handlerConstructorOptions = {
|
|
42
|
44
|
product: 'lib-jitsi-meet',
|
|
43
|
45
|
version: JitsiMeetJS.version,
|
|
44
|
46
|
session: machineId,
|
|
45
|
|
- user: `uid-${machineId}`,
|
|
46
|
|
- server: getState()['features/base/connection'].locationURL.host
|
|
|
47
|
+ user: user ? user.id : `uid-${machineId}`,
|
|
|
48
|
+ server: state['features/base/connection'].locationURL.host
|
|
47
|
49
|
};
|
|
48
|
50
|
|
|
49
|
51
|
_loadHandlers(analyticsScriptUrls, handlerConstructorOptions)
|
|
50
|
52
|
.then(handlers => {
|
|
51
|
|
- const state = getState();
|
|
52
|
53
|
const permanentProperties: Object = {
|
|
53
|
54
|
roomName: state['features/base/conference'].room,
|
|
54
|
55
|
userAgent: navigator.userAgent
|