add metrics to follow all

This commit is contained in:
Samuel Newman
2025-08-21 16:00:06 +03:00
parent 72d505030e
commit 66c64dbbb5
2 changed files with 10 additions and 0 deletions
+4
View File
@@ -93,6 +93,10 @@ export type MetricEvents = {
'onboarding:suggestedAccounts:tabPressed': {
tab: string
}
'onboarding:suggestedAccounts:followAllPressed': {
tab: string
numAccounts: number
}
'onboarding:suggestedAccounts:nextPressed': {
selectedAccountsLength: number
skipped: boolean
@@ -109,6 +109,12 @@ export function StepSuggestedAccounts() {
.map(user => user.did) ?? []
const {mutate: followAll, isPending: isFollowingAll} = useMutation({
onMutate: () => {
logger.metric('onboarding:suggestedAccounts:followAllPressed', {
tab: selectedInterest ?? 'all',
numAccounts: followableDids.length,
})
},
mutationFn: async () => {
for (const did of followableDids) {
updateProfileShadow(queryClient, did, {