Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 8d4e830

Browse files
authored
Remove Countly analytics integration (#7808)
1 parent bb5f62e commit 8d4e830

29 files changed

+6
-1199
lines changed

src/@types/global.d.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ import RightPanelStore from "../stores/right-panel/RightPanelStore";
3636
import WidgetStore from "../stores/WidgetStore";
3737
import CallHandler from "../CallHandler";
3838
import { Analytics } from "../Analytics";
39-
import CountlyAnalytics from "../CountlyAnalytics";
4039
import UserActivity from "../UserActivity";
4140
import { ModalWidgetStore } from "../stores/ModalWidgetStore";
4241
import { WidgetLayoutStore } from "../stores/widgets/WidgetLayoutStore";
@@ -93,7 +92,6 @@ declare global {
9392
mxWidgetLayoutStore: WidgetLayoutStore;
9493
mxCallHandler: CallHandler;
9594
mxAnalytics: Analytics;
96-
mxCountlyAnalytics: typeof CountlyAnalytics;
9795
mxUserActivity: UserActivity;
9896
mxModalWidgetStore: ModalWidgetStore;
9997
mxVoipUserMapper: VoipUserMapper;

src/CallHandler.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ import WidgetStore from "./stores/WidgetStore";
4444
import { WidgetMessagingStore } from "./stores/widgets/WidgetMessagingStore";
4545
import { ElementWidgetActions } from "./stores/widgets/ElementWidgetActions";
4646
import Analytics from './Analytics';
47-
import CountlyAnalytics from "./CountlyAnalytics";
4847
import { UIFeature } from "./settings/UIFeature";
4948
import { Action } from './dispatcher/actions';
5049
import VoipUserMapper from './VoipUserMapper';
@@ -745,7 +744,6 @@ export default class CallHandler extends EventEmitter {
745744

746745
private async placeMatrixCall(roomId: string, type: CallType, transferee?: MatrixCall): Promise<void> {
747746
Analytics.trackEvent('voip', 'placeCall', 'type', type);
748-
CountlyAnalytics.instance.trackStartCall(roomId, type === CallType.Video, false);
749747

750748
const mappedRoomId = (await VoipUserMapper.sharedInstance().getOrCreateVirtualRoomForRoom(roomId)) || roomId;
751749
logger.debug("Mapped real room " + roomId + " to room ID " + mappedRoomId);
@@ -890,7 +888,6 @@ export default class CallHandler extends EventEmitter {
890888

891889
call.answer();
892890
this.setActiveCallRoomId(roomId);
893-
CountlyAnalytics.instance.trackJoinCall(roomId, call.type === CallType.Video, false);
894891
dis.dispatch<ViewRoomPayload>({
895892
action: Action.ViewRoom,
896893
room_id: roomId,
@@ -1010,7 +1007,6 @@ export default class CallHandler extends EventEmitter {
10101007
private async placeJitsiCall(roomId: string, type: string): Promise<void> {
10111008
logger.info("Place conference call in " + roomId);
10121009
Analytics.trackEvent('voip', 'placeConferenceCall');
1013-
CountlyAnalytics.instance.trackStartCall(roomId, type === CallType.Video, true);
10141010

10151011
dis.dispatch({
10161012
action: 'appsDrawer',

src/ContentMessages.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ import Modal from './Modal';
3434
import RoomViewStore from './stores/RoomViewStore';
3535
import Spinner from "./components/views/elements/Spinner";
3636
import { Action } from "./dispatcher/actions";
37-
import CountlyAnalytics from "./CountlyAnalytics";
3837
import {
3938
UploadCanceledPayload,
4039
UploadErrorPayload,
@@ -430,12 +429,10 @@ export default class ContentMessages {
430429
text: string,
431430
matrixClient: MatrixClient,
432431
): Promise<ISendEventResponse> {
433-
const startTime = CountlyAnalytics.getTimestamp();
434432
const prom = matrixClient.sendStickerMessage(roomId, threadId, url, info, text).catch((e) => {
435433
logger.warn(`Failed to send content with URL ${url} to room ${roomId}`, e);
436434
throw e;
437435
});
438-
CountlyAnalytics.instance.trackSendMessage(startTime, prom, roomId, false, false, { msgtype: "m.sticker" });
439436
return prom;
440437
}
441438

@@ -573,7 +570,6 @@ export default class ContentMessages {
573570
matrixClient: MatrixClient,
574571
promBefore: Promise<any>,
575572
) {
576-
const startTime = CountlyAnalytics.getTimestamp();
577573
const content: IContent = {
578574
body: file.name || 'Attachment',
579575
info: {
@@ -671,7 +667,6 @@ export default class ContentMessages {
671667
sendRoundTripMetric(matrixClient, roomId, resp.event_id);
672668
});
673669
}
674-
CountlyAnalytics.instance.trackSendMessage(startTime, prom, roomId, false, false, content);
675670
return prom;
676671
}, function(err) {
677672
error = err;

0 commit comments

Comments
 (0)