Update events
This commit is contained in:
@@ -47,7 +47,7 @@ export function VideoPostCard({
|
|||||||
/**
|
/**
|
||||||
* Callback for metrics etc
|
* Callback for metrics etc
|
||||||
*/
|
*/
|
||||||
onInteract: () => void
|
onInteract?: () => void
|
||||||
}) {
|
}) {
|
||||||
const t = useTheme()
|
const t = useTheme()
|
||||||
const {_, i18n} = useLingui()
|
const {_, i18n} = useLingui()
|
||||||
@@ -81,7 +81,7 @@ export function VideoPostCard({
|
|||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
onInteract()
|
onInteract?.()
|
||||||
}}
|
}}
|
||||||
onPressIn={onPressIn}
|
onPressIn={onPressIn}
|
||||||
onPressOut={onPressOut}
|
onPressOut={onPressOut}
|
||||||
@@ -334,7 +334,7 @@ export function CompactVideoPostCard({
|
|||||||
/**
|
/**
|
||||||
* Callback for metrics etc
|
* Callback for metrics etc
|
||||||
*/
|
*/
|
||||||
onInteract: () => void
|
onInteract?: () => void
|
||||||
}) {
|
}) {
|
||||||
const t = useTheme()
|
const t = useTheme()
|
||||||
const {_, i18n} = useLingui()
|
const {_, i18n} = useLingui()
|
||||||
@@ -366,7 +366,7 @@ export function CompactVideoPostCard({
|
|||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
onInteract()
|
onInteract?.()
|
||||||
}}
|
}}
|
||||||
onPressIn={onPressIn}
|
onPressIn={onPressIn}
|
||||||
onPressOut={onPressOut}
|
onPressOut={onPressOut}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import {View} from 'react-native'
|
import {View} from 'react-native'
|
||||||
import {AppBskyEmbedVideo} from '@atproto/api'
|
import {AppBskyEmbedVideo} from '@atproto/api'
|
||||||
|
|
||||||
|
import {logEvent} from '#/lib/statsig/statsig'
|
||||||
import {FeedPostSliceItem} from '#/state/queries/post-feed'
|
import {FeedPostSliceItem} from '#/state/queries/post-feed'
|
||||||
import {VideoFeedSourceContext} from '#/screens/VideoFeed/types'
|
import {VideoFeedSourceContext} from '#/screens/VideoFeed/types'
|
||||||
import {atoms as a, useGutters} from '#/alf'
|
import {atoms as a, useGutters} from '#/alf'
|
||||||
@@ -41,6 +42,9 @@ export function PostFeedVideoGridRow({
|
|||||||
post={post.post}
|
post={post.post}
|
||||||
sourceContext={sourceContext}
|
sourceContext={sourceContext}
|
||||||
moderation={post.moderation}
|
moderation={post.moderation}
|
||||||
|
onInteract={() => {
|
||||||
|
logEvent('videoCard:click', {context: 'feed'})
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
</Grid.Col>
|
</Grid.Col>
|
||||||
))}
|
))}
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ export function TrendingVideos() {
|
|||||||
|
|
||||||
const onConfirmHide = React.useCallback(() => {
|
const onConfirmHide = React.useCallback(() => {
|
||||||
setTrendingVideoDisabled(true)
|
setTrendingVideoDisabled(true)
|
||||||
logEvent('trendingVideos:hide', {context: 'interstitial'})
|
logEvent('trendingVideos:hide', {context: 'interstitial:discover'})
|
||||||
}, [setTrendingVideoDisabled])
|
}, [setTrendingVideoDisabled])
|
||||||
|
|
||||||
if (error) {
|
if (error) {
|
||||||
@@ -113,7 +113,9 @@ export function TrendingVideos() {
|
|||||||
uri: VIDEO_FEED_URI,
|
uri: VIDEO_FEED_URI,
|
||||||
}}
|
}}
|
||||||
onInteract={() => {
|
onInteract={() => {
|
||||||
logEvent('trendingVideo:click', {context: 'interstitial'})
|
logEvent('videoCard:click', {
|
||||||
|
context: 'interstitial:discover',
|
||||||
|
})
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
@@ -253,10 +253,10 @@ export type LogEvents = {
|
|||||||
context: 'settings'
|
context: 'settings'
|
||||||
}
|
}
|
||||||
'trendingVideos:hide': {
|
'trendingVideos:hide': {
|
||||||
context: 'settings' | 'interstitial' | 'explore'
|
context: 'settings' | 'interstitial:discover' | 'interstitial:explore'
|
||||||
}
|
}
|
||||||
'trendingVideo:click': {
|
'videoCard:click': {
|
||||||
context: 'interstitial' | 'explore'
|
context: 'interstitial:discover' | 'interstitial:explore' | 'feed'
|
||||||
}
|
}
|
||||||
|
|
||||||
'progressGuide:hide': {}
|
'progressGuide:hide': {}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import {isWeb} from '#/platform/detection'
|
|||||||
import {useSavedFeeds} from '#/state/queries/feed'
|
import {useSavedFeeds} from '#/state/queries/feed'
|
||||||
import {usePostFeedQuery} from '#/state/queries/post-feed'
|
import {usePostFeedQuery} from '#/state/queries/post-feed'
|
||||||
import {useAddSavedFeedsMutation} from '#/state/queries/preferences'
|
import {useAddSavedFeedsMutation} from '#/state/queries/preferences'
|
||||||
import {atoms as a, tokens,useGutters, useTheme} from '#/alf'
|
import {atoms as a, tokens, useGutters, useTheme} from '#/alf'
|
||||||
import {Button, ButtonIcon, ButtonText} from '#/components/Button'
|
import {Button, ButtonIcon, ButtonText} from '#/components/Button'
|
||||||
import {GradientFill} from '#/components/GradientFill'
|
import {GradientFill} from '#/components/GradientFill'
|
||||||
import {Pin_Stroke2_Corner0_Rounded as Pin} from '#/components/icons/Pin'
|
import {Pin_Stroke2_Corner0_Rounded as Pin} from '#/components/icons/Pin'
|
||||||
@@ -134,7 +134,9 @@ export function ExploreTrendingVideos() {
|
|||||||
uri: VIDEO_FEED_URI,
|
uri: VIDEO_FEED_URI,
|
||||||
}}
|
}}
|
||||||
onInteract={() => {
|
onInteract={() => {
|
||||||
logEvent('trendingVideo:click', {context: 'interstitial'})
|
logEvent('videoCard:click', {
|
||||||
|
context: 'interstitial:explore',
|
||||||
|
})
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
Reference in New Issue
Block a user