mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-04 07:19:52 +00:00
fix(telemetry): send feedback as plain events, not PostHog surveys
CLI and Studio feedback were emitted as `survey sent` with `$survey_*` properties, so every rating was ingested as a PostHog survey response even though no survey definition, targeting, or popover backs them. Emit `cli_render_feedback` and `studio_feedback` with plain `rating` / `comment` properties instead. Same fields, same call sites, same opt-out.
This commit is contained in:
@@ -84,8 +84,8 @@ describe("studio telemetry events", () => {
|
||||
trackStudioFeedback({ rating });
|
||||
|
||||
expect(trackEvent).toHaveBeenCalledWith(
|
||||
"survey sent",
|
||||
expect.objectContaining({ $survey_response: rating, rating_scale: 10 }),
|
||||
"studio_feedback",
|
||||
expect.objectContaining({ rating, rating_scale: 10 }),
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -69,11 +69,12 @@ export function trackStudioSegmentEaseEdit(props: { ease: string }): void {
|
||||
}
|
||||
|
||||
export function trackStudioFeedback(props: { rating: number; comment?: string }): void {
|
||||
trackEvent("survey sent", {
|
||||
$survey_id: "studio_experience",
|
||||
$survey_response: props.rating,
|
||||
// Plain product event, not a PostHog survey response: nothing here is served
|
||||
// by the surveys product (no survey definition, no targeting, no popover).
|
||||
trackEvent("studio_feedback", {
|
||||
rating: props.rating,
|
||||
rating_scale: 10,
|
||||
...(props.comment ? { $survey_response_2: props.comment } : {}),
|
||||
...(props.comment ? { comment: props.comment } : {}),
|
||||
doctor_summary: getBrowserDoctorSummary(),
|
||||
source: "studio",
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user