feat(deep_linking): add analytics

In order to be able to add analytics to the deep-linking pages the
lib-jitsi-meet initialization has been moved so it happens earlier.

The introduced `initPromise` will eventually disappear, once conference is
migrated into React and / or support for Temasys is dropped. At that stage, it
can be turned into a sync function which all platforms share.
This commit is contained in:
hristoterezov
2018-04-16 13:44:08 +01:00
committed by Saúl Ibarra Corretgé
parent 6947926494
commit f14095ecfc
12 changed files with 215 additions and 88 deletions

View File

@@ -5,6 +5,7 @@ import { AtlasKitThemeProvider } from '@atlaskit/theme';
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { createDeepLinkingPageEvent, sendAnalytics } from '../../analytics';
import { translate } from '../../base/i18n';
import {
@@ -60,6 +61,9 @@ class DeepLinkingDesktopPage<P : Props> extends Component<P> {
*/
componentDidMount() {
this._openDesktopApp();
sendAnalytics(
createDeepLinkingPageEvent(
'displayed', 'DeepLinkingDesktop', { isMobileBrowser: false }));
}
/**
@@ -147,6 +151,9 @@ class DeepLinkingDesktopPage<P : Props> extends Component<P> {
* @returns {void}
*/
_onTryAgain() {
sendAnalytics(
createDeepLinkingPageEvent(
'clicked', 'tryAgainButton', { isMobileBrowser: false }));
this._openDesktopApp();
}
@@ -158,6 +165,9 @@ class DeepLinkingDesktopPage<P : Props> extends Component<P> {
* @returns {void}
*/
_onLaunchWeb() {
sendAnalytics(
createDeepLinkingPageEvent(
'clicked', 'launchWebButton', { isMobileBrowser: false }));
this.props.dispatch(openWebApp());
}
}