mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-10 22:20:14 +00:00
feat(feedback): adopt 0–10 recommendation scale (#2438)
* feat(feedback): adopt 10-point recommendation scale * docs(feedback): keep OSS scale contract self-contained
This commit is contained in:
@@ -12,6 +12,7 @@ const {
|
||||
trackStudioRenderStart,
|
||||
trackStudioRazorSplit,
|
||||
trackStudioExpandedClipEdit,
|
||||
trackStudioFeedback,
|
||||
} = await import("./events");
|
||||
|
||||
describe("studio telemetry events", () => {
|
||||
@@ -69,4 +70,13 @@ describe("studio telemetry events", () => {
|
||||
trackStudioExpandedClipEdit({ action: "resize" });
|
||||
expect(trackEvent).toHaveBeenCalledWith("studio_expanded_clip_edit", { action: "resize" });
|
||||
});
|
||||
|
||||
it.each([0, 10])("trackStudioFeedback preserves NPS boundary %i and its scale", (rating) => {
|
||||
trackStudioFeedback({ rating });
|
||||
|
||||
expect(trackEvent).toHaveBeenCalledWith(
|
||||
"survey sent",
|
||||
expect.objectContaining({ $survey_response: rating, rating_scale: 10 }),
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -67,6 +67,7 @@ export function trackStudioFeedback(props: { rating: number; comment?: string })
|
||||
trackEvent("survey sent", {
|
||||
$survey_id: "studio_experience",
|
||||
$survey_response: props.rating,
|
||||
rating_scale: 10,
|
||||
...(props.comment ? { $survey_response_2: props.comment } : {}),
|
||||
doctor_summary: getBrowserDoctorSummary(),
|
||||
source: "studio",
|
||||
|
||||
Reference in New Issue
Block a user