diff options
author | Ansh <anshnanda10@gmail.com> | 2023-12-06 11:45:01 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-06 09:45:01 -0800 |
commit | 8e541d753a0718b85e0a754452c8ffbafb181a81 (patch) | |
tree | f9afd09859646cc71e948f391b688d2215107498 /src/state/queries/profile.ts | |
parent | 7229cda5a52192266d8e0ee202ae3d3fee7c66a3 (diff) | |
download | voidsky-8e541d753a0718b85e0a754452c8ffbafb181a81.tar.zst |
Check Analytics (#2106)
* fix sign in event tracking * add missing analytics events * add more missing analytics * fix like and unrepost event tracking * reset onEndReachedThreshold
Diffstat (limited to 'src/state/queries/profile.ts')
-rw-r--r-- | src/state/queries/profile.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/state/queries/profile.ts b/src/state/queries/profile.ts index 9435d7ad5..267cf2c5b 100644 --- a/src/state/queries/profile.ts +++ b/src/state/queries/profile.ts @@ -21,6 +21,7 @@ import {useToggleMutationQueue} from '#/lib/hooks/useToggleMutationQueue' import {RQKEY as RQKEY_MY_MUTED} from './my-muted-accounts' import {RQKEY as RQKEY_MY_BLOCKED} from './my-blocked-accounts' import {STALE} from '#/state/queries' +import {track} from '#/lib/analytics/analytics' export const RQKEY = (did: string) => ['profile', did] @@ -188,6 +189,7 @@ function useProfileFollowMutation() { updateProfileShadow(variables.did, { followingUri: data.uri, }) + track('Profile:Follow', {username: variables.did}) } }, onError(error, variables) { @@ -208,6 +210,7 @@ function useProfileUnfollowMutation() { {did: string; followUri: string; skipOptimistic?: boolean} >({ mutationFn: async ({followUri}) => { + track('Profile:Unfollow', {username: followUri}) return await getAgent().deleteFollow(followUri) }, onMutate(variables) { |