Add metrics for when OPs click "hide reply for me" or "hide reply for everyone" (#9206)

This commit is contained in:
Alex Benzer
2025-10-15 00:33:30 -07:00
committed by GitHub
parent 6a1c0ff346
commit 6c7fd96528
2 changed files with 9 additions and 0 deletions
@@ -258,6 +258,7 @@ let PostMenuItems = ({
const onHidePost = () => { const onHidePost = () => {
hidePost({uri: postUri}) hidePost({uri: postUri})
logEvent('thread:click:hideReplyForMe', {})
} }
const hideInPWI = !!postAuthor.labels?.find( const hideInPWI = !!postAuthor.labels?.find(
@@ -338,6 +339,12 @@ let PostMenuItems = ({
replyUri: postUri, replyUri: postUri,
action, action,
}) })
// Log metric only when hiding (not when showing)
if (isHide) {
logEvent('thread:click:hideReplyForEveryone', {})
}
Toast.show( Toast.show(
isHide isHide
? _(msg`Reply was successfully hidden`) ? _(msg`Reply was successfully hidden`)
+2
View File
@@ -481,6 +481,8 @@ export type MetricEvents = {
'share:press:embed': {} 'share:press:embed': {}
'thread:click:showOtherReplies': {} 'thread:click:showOtherReplies': {}
'thread:click:hideReplyForMe': {}
'thread:click:hideReplyForEveryone': {}
'thread:preferences:load': { 'thread:preferences:load': {
[key: string]: any [key: string]: any
} }