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