Check Analytics (#2106)
* fix sign in event tracking * add missing analytics events * add more missing analytics * fix like and unrepost event tracking * reset onEndReachedThreshold
This commit is contained in:
@@ -120,8 +120,6 @@ export const LoginForm = ({
|
||||
} else {
|
||||
setError(cleanError(errMsg))
|
||||
}
|
||||
} finally {
|
||||
track('Sign In', {resumedSession: false})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ import {
|
||||
useRemoveFeedMutation,
|
||||
} from '#/state/queries/preferences'
|
||||
import {logger} from '#/logger'
|
||||
import {useAnalytics} from '#/lib/analytics/analytics'
|
||||
|
||||
export function RecommendedFeedsItem({
|
||||
item,
|
||||
@@ -36,6 +37,7 @@ export function RecommendedFeedsItem({
|
||||
variables: removedFeed,
|
||||
reset: resetRemoveFeed,
|
||||
} = useRemoveFeedMutation()
|
||||
const {track} = useAnalytics()
|
||||
|
||||
if (!item || !preferences) return null
|
||||
|
||||
@@ -56,6 +58,7 @@ export function RecommendedFeedsItem({
|
||||
try {
|
||||
await pinFeed({uri: item.uri})
|
||||
resetPinFeed()
|
||||
track('Onboarding:CustomFeedAdded')
|
||||
} catch (e) {
|
||||
Toast.show('There was an issue contacting your server')
|
||||
logger.error('Failed to pin feed', {error: e})
|
||||
|
||||
@@ -294,7 +294,7 @@ let Feed = ({
|
||||
scrollEventThrottle={scrollEventThrottle}
|
||||
indicatorStyle={theme.colorScheme === 'dark' ? 'white' : 'black'}
|
||||
onEndReached={onEndReached}
|
||||
onEndReachedThreshold={2}
|
||||
onEndReachedThreshold={2} // number of posts left to trigger load more
|
||||
removeClippedSubviews={true}
|
||||
contentOffset={{x: 0, y: headerOffset * -1}}
|
||||
extraData={extraData}
|
||||
|
||||
@@ -25,7 +25,6 @@ import {PostSandboxWarning} from '../util/PostSandboxWarning'
|
||||
import {PreviewableUserAvatar} from '../util/UserAvatar'
|
||||
import {s} from 'lib/styles'
|
||||
import {usePalette} from 'lib/hooks/usePalette'
|
||||
import {useAnalytics} from 'lib/analytics/analytics'
|
||||
import {sanitizeDisplayName} from 'lib/strings/display-names'
|
||||
import {sanitizeHandle} from 'lib/strings/handles'
|
||||
import {makeProfileLink} from 'lib/routes/links'
|
||||
@@ -102,7 +101,6 @@ let FeedItemInner = ({
|
||||
}): React.ReactNode => {
|
||||
const {openComposer} = useComposerControls()
|
||||
const pal = usePalette('default')
|
||||
const {track} = useAnalytics()
|
||||
const [limitLines, setLimitLines] = useState(
|
||||
() => countLines(richText.text) >= MAX_POST_LINES,
|
||||
)
|
||||
@@ -121,7 +119,6 @@ let FeedItemInner = ({
|
||||
}, [record?.reply])
|
||||
|
||||
const onPressReply = React.useCallback(() => {
|
||||
track('FeedItem:PostReply')
|
||||
openComposer({
|
||||
replyTo: {
|
||||
uri: post.uri,
|
||||
@@ -134,7 +131,7 @@ let FeedItemInner = ({
|
||||
},
|
||||
},
|
||||
})
|
||||
}, [post, record, track, openComposer])
|
||||
}, [post, record, openComposer])
|
||||
|
||||
const onPressShowMore = React.useCallback(() => {
|
||||
setLimitLines(false)
|
||||
|
||||
Reference in New Issue
Block a user