mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-11 14:50:02 +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:
@@ -630,17 +630,18 @@ export function trackRenderFeedback(props: {
|
||||
/**
|
||||
* Join key shared with the forwarded feedback report (Slack/backend): the
|
||||
* same uuid rides in the report's env string as `fid=…`, so a wild report
|
||||
* resolves to exactly one PostHog "survey sent" event and vice versa.
|
||||
* resolves to exactly one PostHog `cli_render_feedback` event and vice versa.
|
||||
*/
|
||||
feedbackId?: string;
|
||||
/** render_job_id values of this install's recent renders (newest last). */
|
||||
recentRenderIds?: string[];
|
||||
}): void {
|
||||
trackEvent("survey sent", {
|
||||
$survey_id: "render_satisfaction",
|
||||
$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("cli_render_feedback", {
|
||||
rating: props.rating,
|
||||
rating_scale: FEEDBACK_RATING_SCALE,
|
||||
...(props.comment ? { $survey_response_2: props.comment } : {}),
|
||||
...(props.comment ? { comment: props.comment } : {}),
|
||||
...(props.renderDurationMs !== undefined ? { render_duration_ms: props.renderDurationMs } : {}),
|
||||
...(props.doctorSummary ? { doctor_summary: props.doctorSummary } : {}),
|
||||
...(props.feedbackId ? { feedback_id: props.feedbackId } : {}),
|
||||
|
||||
Reference in New Issue
Block a user