Some metrics (#7294)

* Add trending metrics

* Progress guide events

* Fix naming, improve existing events
This commit is contained in:
Eric Bailey
2024-12-27 16:21:17 -06:00
committed by GitHub
parent 8b7a331815
commit c6d26a0a9c
9 changed files with 57 additions and 15 deletions
@@ -1,6 +1,7 @@
import {View} from 'react-native'
import {Trans} from '@lingui/macro'
import {logEvent} from '#/lib/statsig/statsig'
import {isWeb} from '#/platform/detection'
import {
DEFAULT_LIMIT as RECOMMENDATIONS_COUNT,
@@ -71,7 +72,12 @@ function Inner() {
) : !trending?.suggested ? null : (
<>
{trending.suggested.map(topic => (
<TrendingTopicLink key={topic.link} topic={topic}>
<TrendingTopicLink
key={topic.link}
topic={topic}
onPress={() => {
logEvent('recommendedTopic:click', {context: 'explore'})
}}>
{({hovered}) => (
<TrendingTopic
topic={topic}
@@ -106,7 +106,12 @@ function Inner() {
) : !trending?.topics ? null : (
<>
{trending.topics.map(topic => (
<TrendingTopicLink key={topic.link} topic={topic}>
<TrendingTopicLink
key={topic.link}
topic={topic}
onPress={() => {
logEvent('trendingTopic:click', {context: 'explore'})
}}>
{({hovered}) => (
<TrendingTopic
topic={topic}