fix(analytics): Init analytics for the web welcome page.
This commit is contained in:
parent
2334eb9967
commit
fda2548a38
|
@ -1,4 +1,4 @@
|
||||||
/* global interfaceConfig */
|
/* global APP, config, interfaceConfig, JitsiMeetJS */
|
||||||
|
|
||||||
import Button from '@atlaskit/button';
|
import Button from '@atlaskit/button';
|
||||||
import { FieldTextStateless } from '@atlaskit/field-text';
|
import { FieldTextStateless } from '@atlaskit/field-text';
|
||||||
|
@ -6,7 +6,9 @@ import { AtlasKitThemeProvider } from '@atlaskit/theme';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
|
|
||||||
|
import { initAnalytics } from '../../analytics';
|
||||||
import { translate } from '../../base/i18n';
|
import { translate } from '../../base/i18n';
|
||||||
|
import { isAnalyticsEnabled } from '../../base/lib-jitsi-meet';
|
||||||
import { Watermarks } from '../../base/react';
|
import { Watermarks } from '../../base/react';
|
||||||
|
|
||||||
import { AbstractWelcomePage, _mapStateToProps } from './AbstractWelcomePage';
|
import { AbstractWelcomePage, _mapStateToProps } from './AbstractWelcomePage';
|
||||||
|
@ -66,6 +68,17 @@ class WelcomePage extends AbstractWelcomePage {
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
|
// FIXME: This is not the best place for this logic. Ideally we should
|
||||||
|
// use features/base/lib-jitsi-meet#initLib() action for this use case.
|
||||||
|
// But currently lib-jitsi-meet#initLib()'s logic works for mobile only
|
||||||
|
// (on web it ends up with infinite loop over initLib).
|
||||||
|
JitsiMeetJS.init({
|
||||||
|
enableAnalyticsLogging: isAnalyticsEnabled(APP.store),
|
||||||
|
...config
|
||||||
|
}).then(() => {
|
||||||
|
initAnalytics(APP.store);
|
||||||
|
});
|
||||||
|
|
||||||
if (this.state.generateRoomnames) {
|
if (this.state.generateRoomnames) {
|
||||||
this._updateRoomname();
|
this._updateRoomname();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue