From 8de7f7d71ad8fccd1fb1308c5014ec4eefccde2f Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 25 Feb 2026 03:54:30 +0000 Subject: [PATCH] Add PostHog event for opening train info sheet Track "train_info_sheet_opened" event when users tap the info button to view train wagon details. https://claude.ai/code/session_01KQi8o5KDVcdHQqZo5sAkLS --- app/screens/route-details/route-details-screen.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/screens/route-details/route-details-screen.tsx b/app/screens/route-details/route-details-screen.tsx index 5f3cd334..1bf64c29 100644 --- a/app/screens/route-details/route-details-screen.tsx +++ b/app/screens/route-details/route-details-screen.tsx @@ -27,6 +27,7 @@ import { calculateDelayedTime } from "../../utils/helpers/date-helpers" import { useSafeAreaInsets } from "react-native-safe-area-context" import { isLiquidGlassSupported, LiquidGlassView } from "@callstack/liquid-glass" import { translate } from "../../i18n" +import { trackEvent } from "../../services/analytics" const ROOT: ViewStyle = { flex: 1, @@ -312,7 +313,10 @@ export function RouteDetailsScreen({ route, navigation }: RouteDetailsScreenProp > {hasWagonData && ( navigation.navigate("routeDetailsTrainInfo", { train: routeItem.trains[0] })} + onPress={() => { + trackEvent("train_info_sheet_opened") + navigation.navigate("routeDetailsTrainInfo", { train: routeItem.trains[0] }) + }} accessibilityLabel={translate("routeDetails.trainInformation")} >