[Statsig] Track threads (#6057)
* [Statsig] Send thread length * Split events
This commit is contained in:
@@ -122,11 +122,16 @@ export type LogEvents = {
|
||||
'post:create': {
|
||||
imageCount: number
|
||||
isReply: boolean
|
||||
isPartOfThread: boolean
|
||||
hasLink: boolean
|
||||
hasQuote: boolean
|
||||
langs: string
|
||||
logContext: 'Composer'
|
||||
}
|
||||
'thread:create': {
|
||||
postCount: number
|
||||
isReply: boolean
|
||||
}
|
||||
'post:like:sampled': {
|
||||
doesLikerFollowPoster: boolean | undefined
|
||||
doesPosterFollowLiker: boolean | undefined
|
||||
|
||||
@@ -405,6 +405,7 @@ export const ComposePost = ({
|
||||
? post.embed.media.images.length
|
||||
: 0,
|
||||
isReply: index > 0 || !!replyTo,
|
||||
isPartOfThread: thread.posts.length > 1,
|
||||
hasLink: !!post.embed.link,
|
||||
hasQuote: !!post.embed.quote,
|
||||
langs: langPrefs.postLanguage,
|
||||
@@ -413,6 +414,12 @@ export const ComposePost = ({
|
||||
index++
|
||||
}
|
||||
}
|
||||
if (thread.posts.length > 1) {
|
||||
logEvent('thread:create', {
|
||||
postCount: thread.posts.length,
|
||||
isReply: !!replyTo,
|
||||
})
|
||||
}
|
||||
}
|
||||
if (postUri && !replyTo) {
|
||||
emitPostCreated()
|
||||
|
||||
Reference in New Issue
Block a user