Add some events to landing screen (#4664)
parent
5641a4393c
commit
0ab6d54093
|
@ -188,6 +188,12 @@ export type LogEvents = {
|
||||||
profilesCount: number
|
profilesCount: number
|
||||||
feedsCount: number
|
feedsCount: number
|
||||||
}
|
}
|
||||||
|
'starterPack:ctaPress': {
|
||||||
|
starterPack: string
|
||||||
|
}
|
||||||
|
'starterPack:opened': {
|
||||||
|
starterPack: string
|
||||||
|
}
|
||||||
|
|
||||||
'test:all:always': {}
|
'test:all:always': {}
|
||||||
'test:all:sometimes': {}
|
'test:all:sometimes': {}
|
||||||
|
|
|
@ -14,6 +14,7 @@ import {useLingui} from '@lingui/react'
|
||||||
import {JOINED_THIS_WEEK} from '#/lib/constants'
|
import {JOINED_THIS_WEEK} from '#/lib/constants'
|
||||||
import {isAndroidWeb} from 'lib/browser'
|
import {isAndroidWeb} from 'lib/browser'
|
||||||
import {useWebMediaQueries} from 'lib/hooks/useWebMediaQueries'
|
import {useWebMediaQueries} from 'lib/hooks/useWebMediaQueries'
|
||||||
|
import {logEvent} from 'lib/statsig/statsig'
|
||||||
import {createStarterPackGooglePlayUri} from 'lib/strings/starter-pack'
|
import {createStarterPackGooglePlayUri} from 'lib/strings/starter-pack'
|
||||||
import {isWeb} from 'platform/detection'
|
import {isWeb} from 'platform/detection'
|
||||||
import {useModerationOpts} from 'state/preferences/moderation-opts'
|
import {useModerationOpts} from 'state/preferences/moderation-opts'
|
||||||
|
@ -128,6 +129,9 @@ function LandingScreenLoaded({
|
||||||
} else {
|
} else {
|
||||||
onContinue()
|
onContinue()
|
||||||
}
|
}
|
||||||
|
logEvent('starterPack:ctaPress', {
|
||||||
|
starterPack: starterPack.uri,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const onJoinWithoutPress = () => {
|
const onJoinWithoutPress = () => {
|
||||||
|
|
|
@ -152,6 +152,12 @@ function StarterPackScreenInner({
|
||||||
const [link, setLink] = React.useState<string>()
|
const [link, setLink] = React.useState<string>()
|
||||||
const [imageLoaded, setImageLoaded] = React.useState(false)
|
const [imageLoaded, setImageLoaded] = React.useState(false)
|
||||||
|
|
||||||
|
React.useEffect(() => {
|
||||||
|
logEvent('starterPack:opened', {
|
||||||
|
starterPack: starterPack.uri,
|
||||||
|
})
|
||||||
|
}, [starterPack.uri])
|
||||||
|
|
||||||
const onOpenShareDialog = React.useCallback(() => {
|
const onOpenShareDialog = React.useCallback(() => {
|
||||||
const rkey = new AtUri(starterPack.uri).rkey
|
const rkey = new AtUri(starterPack.uri).rkey
|
||||||
shortenLink(makeStarterPackLink(starterPack.creator.did, rkey)).then(
|
shortenLink(makeStarterPackLink(starterPack.creator.did, rkey)).then(
|
||||||
|
|
Loading…
Reference in New Issue