📈(frontend) add explicit data attributes for key event tracking
PostHog's autocapture is useful, but explicit tracking ensures cleaner, more focused data. This initial pass targets high-impact actions; we'll iterate as needed.
This commit is contained in:
committed by
aleb_the_flash
parent
bcd285e368
commit
b9bcc45cce
@@ -44,6 +44,7 @@ export const LaterMeetingDialog = ({
|
|||||||
setIsCopied(true)
|
setIsCopied(true)
|
||||||
}}
|
}}
|
||||||
onHoverChange={setIsHovered}
|
onHoverChange={setIsHovered}
|
||||||
|
data-attr="later-dialog-copy"
|
||||||
>
|
>
|
||||||
{isCopied ? (
|
{isCopied ? (
|
||||||
<>
|
<>
|
||||||
|
|||||||
@@ -45,7 +45,9 @@ export const Home = () => {
|
|||||||
<HStack gap="gutter">
|
<HStack gap="gutter">
|
||||||
{isLoggedIn ? (
|
{isLoggedIn ? (
|
||||||
<Menu>
|
<Menu>
|
||||||
<Button variant="primary">{t('createMeeting')}</Button>
|
<Button variant="primary" data-attr="create-meeting">
|
||||||
|
{t('createMeeting')}
|
||||||
|
</Button>
|
||||||
<RACMenu>
|
<RACMenu>
|
||||||
<MenuItem
|
<MenuItem
|
||||||
className={menuItemRecipe({ icon: true })}
|
className={menuItemRecipe({ icon: true })}
|
||||||
@@ -57,6 +59,7 @@ export const Home = () => {
|
|||||||
})
|
})
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
|
data-attr="create-option-instant"
|
||||||
>
|
>
|
||||||
<RiAddLine size={18} />
|
<RiAddLine size={18} />
|
||||||
{t('createMenu.instantOption')}
|
{t('createMenu.instantOption')}
|
||||||
@@ -69,6 +72,7 @@ export const Home = () => {
|
|||||||
setLaterRoomId(data.slug)
|
setLaterRoomId(data.slug)
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
|
data-attr="create-option-later"
|
||||||
>
|
>
|
||||||
<RiLink size={18} />
|
<RiLink size={18} />
|
||||||
{t('createMenu.laterOption')}
|
{t('createMenu.laterOption')}
|
||||||
@@ -76,7 +80,7 @@ export const Home = () => {
|
|||||||
</RACMenu>
|
</RACMenu>
|
||||||
</Menu>
|
</Menu>
|
||||||
) : (
|
) : (
|
||||||
<Button variant="primary" href={authUrl()}>
|
<Button variant="primary" href={authUrl()} data-attr="login">
|
||||||
{t('login', { ns: 'global' })}
|
{t('login', { ns: 'global' })}
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -90,6 +90,7 @@ export const InviteDialog = ({
|
|||||||
setIsCopied(true)
|
setIsCopied(true)
|
||||||
}}
|
}}
|
||||||
onHoverChange={setIsHovered}
|
onHoverChange={setIsHovered}
|
||||||
|
data-attr="share-dialog-copy"
|
||||||
>
|
>
|
||||||
{isCopied ? (
|
{isCopied ? (
|
||||||
<>
|
<>
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ export const ChatToggle = () => {
|
|||||||
tooltip={t(tooltipLabel)}
|
tooltip={t(tooltipLabel)}
|
||||||
isSelected={isChatOpen}
|
isSelected={isChatOpen}
|
||||||
onPress={() => toggleChat()}
|
onPress={() => toggleChat()}
|
||||||
|
data-attr={`controls-chat-${tooltipLabel}`}
|
||||||
>
|
>
|
||||||
<RiChat1Line />
|
<RiChat1Line />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ export const HandToggle = () => {
|
|||||||
notifyOtherParticipants(isHandRaised)
|
notifyOtherParticipants(isHandRaised)
|
||||||
toggleRaisedHand()
|
toggleRaisedHand()
|
||||||
}}
|
}}
|
||||||
|
data-attr={`controls-hand-${tooltipLabel}`}
|
||||||
>
|
>
|
||||||
<RiHand />
|
<RiHand />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ export const LeaveButton = () => {
|
|||||||
navigateTo('feedback')
|
navigateTo('feedback')
|
||||||
})
|
})
|
||||||
}}
|
}}
|
||||||
|
data-attr="controls-leave"
|
||||||
>
|
>
|
||||||
<RiPhoneFill
|
<RiPhoneFill
|
||||||
style={{
|
style={{
|
||||||
|
|||||||
@@ -73,6 +73,7 @@ export const HandRaisedListItem = ({
|
|||||||
size="sm"
|
size="sm"
|
||||||
onPress={() => lowerHandParticipant(participant)}
|
onPress={() => lowerHandParticipant(participant)}
|
||||||
tooltip={t('participants.lowerParticipantHand', { name })}
|
tooltip={t('participants.lowerParticipantHand', { name })}
|
||||||
|
data-attr="participants-lower-hand"
|
||||||
>
|
>
|
||||||
<RiHand />
|
<RiHand />
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ export const LowerAllHandsButton = ({
|
|||||||
fullWidth
|
fullWidth
|
||||||
variant="text"
|
variant="text"
|
||||||
onPress={() => lowerHandParticipants(participants)}
|
onPress={() => lowerHandParticipants(participants)}
|
||||||
|
data-attr="participants-lower-hands"
|
||||||
>
|
>
|
||||||
{t('participants.lowerParticipantsHand')}
|
{t('participants.lowerParticipantsHand')}
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -78,6 +78,7 @@ const MicIndicator = ({ participant }: MicIndicatorProps) => {
|
|||||||
? muteParticipant(participant)
|
? muteParticipant(participant)
|
||||||
: setIsAlertOpen(true)
|
: setIsAlertOpen(true)
|
||||||
}
|
}
|
||||||
|
data-attr="participants-mute"
|
||||||
>
|
>
|
||||||
{isMuted ? (
|
{isMuted ? (
|
||||||
<RiMicOffFill color={'gray'} />
|
<RiMicOffFill color={'gray'} />
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ export const ParticipantsList = () => {
|
|||||||
onPress={() => (participantsStore.showParticipants = false)}
|
onPress={() => (participantsStore.showParticipants = false)}
|
||||||
aria-label={t('closeButton')}
|
aria-label={t('closeButton')}
|
||||||
tooltip={t('closeButton')}
|
tooltip={t('closeButton')}
|
||||||
|
data-attr="participants-close"
|
||||||
>
|
>
|
||||||
<RiCloseLine />
|
<RiCloseLine />
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ export const ParticipantsToggle = () => {
|
|||||||
tooltip={t(tooltipLabel)}
|
tooltip={t(tooltipLabel)}
|
||||||
isSelected={isParticipantsOpen}
|
isSelected={isParticipantsOpen}
|
||||||
onPress={() => toggleParticipants()}
|
onPress={() => toggleParticipants()}
|
||||||
|
data-attr={`controls-participants-${tooltipLabel}`}
|
||||||
>
|
>
|
||||||
<RiGroupLine />
|
<RiGroupLine />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ export const ScreenShareToggle = (
|
|||||||
maxWidth: '46px',
|
maxWidth: '46px',
|
||||||
maxHeight: '46px',
|
maxHeight: '46px',
|
||||||
}}
|
}}
|
||||||
|
data-attr={`controls-screenshare-${tooltipLabel}`}
|
||||||
>
|
>
|
||||||
<Div position="relative">
|
<Div position="relative">
|
||||||
<RiRectangleLine size={28} />
|
<RiRectangleLine size={28} />
|
||||||
|
|||||||
Reference in New Issue
Block a user