[Statsig] Track posting, end reached (#3206)

* Track post create

* Track feed endReached
This commit is contained in:
dan 2024-03-14 00:21:42 +00:00 committed by GitHub
parent 7eaa573b57
commit 1c25c76645
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 38 additions and 1 deletions

View file

@ -65,6 +65,7 @@ import {logger} from '#/logger'
import {ComposerReplyTo} from 'view/com/composer/ComposerReplyTo'
import * as Prompt from '#/components/Prompt'
import {useDialogStateControlContext} from 'state/dialogs'
import {logEvent} from '#/lib/statsig/statsig'
type Props = ComposerOpts
export const ComposePost = observer(function ComposePost({
@ -255,6 +256,16 @@ export const ComposePost = observer(function ComposePost({
setIsProcessing(false)
return
} finally {
if (postUri) {
logEvent('post:create', {
imageCount: gallery.size,
isReply: replyTo != null,
hasLink: extLink != null,
hasQuote: quote != null,
langs: langPrefs.postLanguage,
logContext: 'Composer',
})
}
track('Create Post', {
imageCount: gallery.size,
})