Skip to content

Commit

Permalink
feat(replay): adds analytics to replay player (#67519)
Browse files Browse the repository at this point in the history
This PR adds button analytics to the buttons use in the replay player
  • Loading branch information
roggenkemper committed Mar 26, 2024
1 parent d28598c commit 2348ab2
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
7 changes: 6 additions & 1 deletion static/app/components/events/eventReplay/index.tsx
Expand Up @@ -118,7 +118,12 @@ function EventReplayContent({
: '';
const replayUrl = baseUrl ? `${baseUrl}replays/${location.search}/` : '';
const seeAllReplaysButton = replayUrl ? (
<LinkButton size="sm" to={replayUrl}>
<LinkButton
size="sm"
to={replayUrl}
analyticsEventKey="issue_details.replay_player.clicked_see_all_replays"
analyticsEventName="Issue Details: Replay Player Clicked See All Replays"
>
{t('See All Replays')}
</LinkButton>
) : undefined;
Expand Down
Expand Up @@ -119,9 +119,13 @@ function ReplayPreviewPlayer({
onClick={() => handleBackClick?.()}
aria-label={t('Previous Clip')}
disabled={!handleBackClick}
analyticsEventName="Replay Preview Player: Clicked Previous Clip"
analyticsEventKey="replay_preview_player.clicked_previous_clip"
/>
)}
<ReplayPlayPauseButton
analyticsEventName="Replay Preview Player: Clicked Play/Plause Clip"
analyticsEventKey="replay_preview_player.clicked_play_pause_clip"
priority={
playPausePriority ?? (isFinished || isPlaying ? 'primary' : 'default')
}
Expand All @@ -134,6 +138,8 @@ function ReplayPreviewPlayer({
onClick={() => handleForwardClick?.()}
aria-label={t('Next Clip')}
disabled={!handleForwardClick}
analyticsEventName="Replay Preview Player: Clicked Next Clip"
analyticsEventKey="replay_preview_player.clicked_next_clip"
/>
)}
<Container>
Expand Down
2 changes: 2 additions & 0 deletions static/app/views/issueDetails/groupReplays/groupReplays.tsx
Expand Up @@ -211,6 +211,8 @@ function GroupReplaysTable({
setSelectedReplayIndex(selectedReplayIndex + 1);
}}
icon={<IconPlay size="md" />}
analyticsEventKey="issue_details.replay_tab.play_next_replay"
analyticsEventName="Issue Details: Replay Tab Clicked Play Next Replay"
>
{t('Play Now')}
</Button>
Expand Down

0 comments on commit 2348ab2

Please sign in to comment.