From 6c7fd96528440e3e150e663252c21d46a79d8853 Mon Sep 17 00:00:00 2001 From: Alex Benzer Date: Wed, 15 Oct 2025 00:33:30 -0700 Subject: [PATCH] Add metrics for when OPs click "hide reply for me" or "hide reply for everyone" (#9206) --- src/components/PostControls/PostMenu/PostMenuItems.tsx | 7 +++++++ src/logger/metrics.ts | 2 ++ 2 files changed, 9 insertions(+) diff --git a/src/components/PostControls/PostMenu/PostMenuItems.tsx b/src/components/PostControls/PostMenu/PostMenuItems.tsx index 63501c5952..f8b410be97 100644 --- a/src/components/PostControls/PostMenu/PostMenuItems.tsx +++ b/src/components/PostControls/PostMenu/PostMenuItems.tsx @@ -258,6 +258,7 @@ let PostMenuItems = ({ const onHidePost = () => { hidePost({uri: postUri}) + logEvent('thread:click:hideReplyForMe', {}) } const hideInPWI = !!postAuthor.labels?.find( @@ -338,6 +339,12 @@ let PostMenuItems = ({ replyUri: postUri, action, }) + + // Log metric only when hiding (not when showing) + if (isHide) { + logEvent('thread:click:hideReplyForEveryone', {}) + } + Toast.show( isHide ? _(msg`Reply was successfully hidden`) diff --git a/src/logger/metrics.ts b/src/logger/metrics.ts index 2ac4202718..3477504b75 100644 --- a/src/logger/metrics.ts +++ b/src/logger/metrics.ts @@ -481,6 +481,8 @@ export type MetricEvents = { 'share:press:embed': {} 'thread:click:showOtherReplies': {} + 'thread:click:hideReplyForMe': {} + 'thread:click:hideReplyForEveryone': {} 'thread:preferences:load': { [key: string]: any }