Merge pull request #2628 from jitsi/welcome_page_analytics
fix(analytics): Init analytics for the web welcome page.
This commit is contained in:
commit
26ea667170
|
@ -1,4 +1,4 @@
|
|||
/* global interfaceConfig */
|
||||
/* global APP, config, interfaceConfig, JitsiMeetJS */
|
||||
|
||||
import Button from '@atlaskit/button';
|
||||
import { FieldTextStateless } from '@atlaskit/field-text';
|
||||
|
@ -6,7 +6,9 @@ import { AtlasKitThemeProvider } from '@atlaskit/theme';
|
|||
import React from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import { initAnalytics } from '../../analytics';
|
||||
import { translate } from '../../base/i18n';
|
||||
import { isAnalyticsEnabled } from '../../base/lib-jitsi-meet';
|
||||
import { Watermarks } from '../../base/react';
|
||||
|
||||
import { AbstractWelcomePage, _mapStateToProps } from './AbstractWelcomePage';
|
||||
|
@ -66,6 +68,17 @@ class WelcomePage extends AbstractWelcomePage {
|
|||
* @returns {void}
|
||||
*/
|
||||
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) {
|
||||
this._updateRoomname();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue