Add posthog Telemetry (Anonymity Logic + call duration telemetry) (#658)

Co-authored-by: Timo K <timok@element.io>
Co-authored-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
Timo 2022-11-04 13:07:14 +01:00 committed by GitHub
commit 72503d0335
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 574 additions and 7 deletions

View file

@ -57,6 +57,7 @@ import { useAudioContext } from "../video-grid/useMediaStream";
import { useFullscreen } from "../video-grid/useFullscreen";
import { AudioContainer } from "../video-grid/AudioContainer";
import { useAudioOutputDevice } from "../video-grid/useAudioOutputDevice";
import { PosthogAnalytics } from "../PosthogAnalytics";
import { widget, ElementWidgetActions } from "../widget";
import { useJoinRule } from "./useJoinRule";
import { useUrlParams } from "../UrlParams";
@ -210,6 +211,9 @@ export function InCallView({
});
}
PosthogAnalytics.instance.eventCallEnded.cacheParticipantCountChanged(
participants.length
);
// add the screenshares too
for (const screenshareFeed of screenshareFeeds) {
const userMediaItem = tileDescriptors.find(