feat(telemetry): product interaction events
- h2h_viewed from match card, dock, profile, stats, predictions - reaction_sent with emoji and surface; score_report_opened from all three report entry points - stats_filtered and stats_sorted on stats route and profile - rules/teams/players/bracket/tournament view events with sources - match_history_viewed, badge_viewed, player_searched (count only)
This commit is contained in:
+5
-1
@@ -9,6 +9,7 @@ import { Text } from "@mantine/core";
|
||||
import PlayerList from "@/features/players/components/player-list";
|
||||
import { Player } from "@/features/players/types";
|
||||
import { NavTile } from "../started-tournament/sections/nav-grid";
|
||||
import { track } from "@/lib/telemetry/client";
|
||||
|
||||
interface EnrolledPlayersListButtonProps {
|
||||
tournamentId: string;
|
||||
@@ -33,7 +34,10 @@ const EnrolledPlayersListButton: React.FC<EnrolledPlayersListButtonProps> = ({ t
|
||||
values: { count },
|
||||
})}
|
||||
Icon={UserListIcon}
|
||||
onClick={open}
|
||||
onClick={() => {
|
||||
track("players_viewed", { source: "upcoming" });
|
||||
open();
|
||||
}}
|
||||
/>
|
||||
|
||||
<Sheet title={t`Enrolled Players`} opened={isOpen} onChange={toggle}>
|
||||
|
||||
@@ -6,6 +6,7 @@ import { useTournament } from "../../queries"
|
||||
import { Button, Flex, Loader, Stack } from "@mantine/core"
|
||||
import { lazy, Suspense } from "react"
|
||||
import { NavTile } from "../started-tournament/sections/nav-grid"
|
||||
import { track } from "@/lib/telemetry/client"
|
||||
|
||||
const RulesContent = lazy(() => import("./rules-content"));
|
||||
|
||||
@@ -20,7 +21,14 @@ const RulesListButton: React.FC<RulesListButtonProps> = ({ tournamentId }) => {
|
||||
|
||||
return (
|
||||
<>
|
||||
<NavTile label={t`Rules`} Icon={ListIcon} onClick={open} />
|
||||
<NavTile
|
||||
label={t`Rules`}
|
||||
Icon={ListIcon}
|
||||
onClick={() => {
|
||||
track("rules_viewed", { source: "upcoming" });
|
||||
open();
|
||||
}}
|
||||
/>
|
||||
|
||||
<Sheet title={t`Tournament Rules`} opened={isOpen} onChange={toggle}>
|
||||
<Stack gap="xs">
|
||||
|
||||
@@ -7,6 +7,7 @@ import { useMemo } from "react"
|
||||
import { useLingui } from "@lingui/react/macro"
|
||||
import { msg } from "@lingui/core/macro"
|
||||
import { NavTile } from "../started-tournament/sections/nav-grid"
|
||||
import { track } from "@/lib/telemetry/client"
|
||||
|
||||
interface TeamListButtonProps {
|
||||
teams: TeamInfo[]
|
||||
@@ -25,7 +26,10 @@ const TeamListButton: React.FC<TeamListButtonProps> = ({ teams, isRegional }) =>
|
||||
values: { count },
|
||||
})}
|
||||
Icon={UsersIcon}
|
||||
onClick={open}
|
||||
onClick={() => {
|
||||
track("teams_viewed", { source: "upcoming" });
|
||||
open();
|
||||
}}
|
||||
/>
|
||||
|
||||
<Sheet title={t`Enrolled Teams`} opened={isOpen} onChange={toggle}>
|
||||
|
||||
Reference in New Issue
Block a user