Add quality survey at the end of the call (#1084)
Signed-off-by: Timo K <toger5@hotmail.de> Co-authored-by: Robin <robin@robin.town>
This commit is contained in:
@@ -29,6 +29,7 @@ import {
|
||||
MuteCameraTracker,
|
||||
MuteMicrophoneTracker,
|
||||
UndecryptableToDeviceEventTracker,
|
||||
QualitySurveyEventTracker,
|
||||
} from "./PosthogEvents";
|
||||
import { Config } from "../config/Config";
|
||||
import { getUrlParams } from "../UrlParams";
|
||||
@@ -431,4 +432,5 @@ export class PosthogAnalytics {
|
||||
public eventMuteMicrophone = new MuteMicrophoneTracker();
|
||||
public eventMuteCamera = new MuteCameraTracker();
|
||||
public eventUndecryptableToDevice = new UndecryptableToDeviceEventTracker();
|
||||
public eventQualitySurvey = new QualitySurveyEventTracker();
|
||||
}
|
||||
|
||||
@@ -163,3 +163,21 @@ export class UndecryptableToDeviceEventTracker {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
interface QualitySurveyEvent {
|
||||
eventName: "QualitySurvey";
|
||||
callId: string;
|
||||
feedbackText: string;
|
||||
stars: number;
|
||||
}
|
||||
|
||||
export class QualitySurveyEventTracker {
|
||||
track(callId: string, feedbackText: string, stars: number) {
|
||||
PosthogAnalytics.instance.trackEvent<QualitySurveyEvent>({
|
||||
eventName: "QualitySurvey",
|
||||
callId,
|
||||
feedbackText,
|
||||
stars,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user