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:
Miguel Angel Simon Sierra
2026-07-27 16:46:51 +02:00
parent 3a0590925c
commit 597c14a887
6 changed files with 25 additions and 21 deletions
+2 -2
View File
@@ -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 }),
);
});
});
+5 -4
View File
@@ -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",
});