Add new analytics events for group chats (#10830)

This commit is contained in:
DS Boyce
2026-06-10 13:56:39 -07:00
committed by GitHub
parent 974d2b15d5
commit 871e9506df
11 changed files with 184 additions and 29 deletions
@@ -135,7 +135,7 @@ export function MessagesList({
const ax = useAnalytics()
const convoState = useConvoActive()
const agent = useAgent()
const {hasSession} = useSession()
const {hasSession, currentAccount} = useSession()
const getPost = useGetPost()
const getJoinLinkPreview = useGetJoinLinkPreview()
const {embed: messageEmbed, setEmbed} = useMessageEmbed()
@@ -471,6 +471,13 @@ export function MessagesList({
},
embedView,
)
if (convoState.convo.kind === 'group') {
ax.metric('groupchat:message:send', {
convoId: convoState.convo.view.id,
isOwner: convoState.convo.primaryMember?.did === currentAccount?.did,
})
}
},
[
agent,
@@ -481,6 +488,8 @@ export function MessagesList({
hasSession,
hasScrolled,
setHasScrolled,
ax,
currentAccount?.did,
],
)