From 97cc0a0d73dcacfefcdff785c802762e2a0a60d6 Mon Sep 17 00:00:00 2001 From: George Goldberg Date: Fri, 24 Feb 2017 17:34:21 +0000 Subject: PLT-5071: Client side component of Telemetry. (#5516) --- webapp/components/webrtc/webrtc_controller.jsx | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'webapp/components/webrtc') diff --git a/webapp/components/webrtc/webrtc_controller.jsx b/webapp/components/webrtc/webrtc_controller.jsx index b8d3d4db6..0fab0d2e7 100644 --- a/webapp/components/webrtc/webrtc_controller.jsx +++ b/webapp/components/webrtc/webrtc_controller.jsx @@ -13,6 +13,7 @@ import SearchBox from '../search_bar.jsx'; import WebrtcHeader from './components/webrtc_header.jsx'; import ConnectingScreen from 'components/loading_screen.jsx'; +import {trackEvent} from 'actions/diagnostics_actions.jsx'; import * as WebrtcActions from 'actions/webrtc_actions.jsx'; import * as Utils from 'utils/utils.jsx'; @@ -600,6 +601,8 @@ export default class WebrtcController extends React.Component { } onFailed() { + trackEvent('api', 'api_users_webrtc_failed'); + this.setState({ isCalling: false, isAnswering: false, @@ -733,6 +736,7 @@ export default class WebrtcController extends React.Component { } doAnswer(jsep) { + trackEvent('api', 'api_users_webrtc_start'); this.videocall.createAnswer({ jsep, stream: this.localMedia, @@ -747,6 +751,7 @@ export default class WebrtcController extends React.Component { } doHangup(error, manual) { + trackEvent('api', 'api_users_webrtc_end'); if (this.videocall && this.state.callInProgress) { this.videocall.send({message: {request: 'hangup'}}); this.videocall.hangup(); -- cgit v1.2.3-1-g7c22