Skip to content

Commit

Permalink
📈 - Analytics events for header icons (#331)
Browse files Browse the repository at this point in the history
Added analytics events on settings & announcements icons presses
  • Loading branch information
guytepper authored Oct 6, 2023
1 parent 428b417 commit 433c2de
Show file tree
Hide file tree
Showing 2 changed files with 336 additions and 436 deletions.
18 changes: 12 additions & 6 deletions app/screens/planner/planner-screen-header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,16 @@ export const PlannerScreenHeader = observer(function PlannerScreenHeader() {
}
}, [])

const openAnnouncements = () => {
navigation.navigate("announcementsStack")
analytics().logEvent("announcements_icon_pressed")
}

const openSettings = () => {
navigation.navigate("settingsStack")
analytics().logEvent("settings_icon_pressed")
}

return (
<>
<View style={HEADER_WRAPPER}>
Expand Down Expand Up @@ -94,14 +104,10 @@ export const PlannerScreenHeader = observer(function PlannerScreenHeader() {
</Chip>
)}
</View>
<TouchableOpacity
onPress={() => navigation.navigate("announcementsStack")}
activeOpacity={0.8}
accessibilityLabel={translate("routes.updates")}
>
<TouchableOpacity onPress={openAnnouncements} activeOpacity={0.8} accessibilityLabel={translate("routes.updates")}>
<Image source={UPDATES_ICON} style={HEADER_ICON_IMAGE} />
</TouchableOpacity>
<TouchableOpacity onPress={() => navigation.navigate("settingsStack")} activeOpacity={0.8} accessibilityLabel="הגדרות">
<TouchableOpacity onPress={openSettings} activeOpacity={0.8} accessibilityLabel={translate("settings.title")}>
<Image source={SETTINGS_ICON} style={HEADER_ICON_IMAGE} />
</TouchableOpacity>
</View>
Expand Down
Loading

0 comments on commit 433c2de

Please sign in to comment.