Merged in fix/BOOK-132-tracking-breakfast (pull request #2803)

fix(BOOK-132): add breakfastOption tracking

* fix(BOOK-132): add breakfastOption tracking


Approved-by: Joakim Jäderberg
This commit is contained in:
Bianca Widstam
2025-09-15 13:45:32 +00:00
parent 0737f4fb78
commit 03cc146eac
3 changed files with 5 additions and 0 deletions

View File

@@ -35,15 +35,18 @@ export function trackBreakfastSelection({
breakfastPackage,
hotelId,
units,
breakfastOption,
}: {
breakfastPackage: BreakfastPackages[number]
hotelId: string
units: number
breakfastOption: string
}) {
trackEvent({
event: "breakfastSelection",
selection: {
name: "breakfast options selection click",
breakfastOption,
},
...(units > 0 && {
ancillaries: [

View File

@@ -60,6 +60,7 @@ export default function Breakfast() {
breakfastPackage: pkg ?? packages[0],
hotelId,
units: pkg ? room.adults : 0,
breakfastOption: pkg ? "breakfast buffet" : "no breakfast",
})
},
// eslint-disable-next-line react-hooks/exhaustive-deps

View File

@@ -34,6 +34,7 @@ export type TrackingFunctions = {
breakfastPackage: BreakfastPackages[number]
hotelId: string
units: number
breakfastOption: string
}): void
trackBedSelection(bedType: string): void
}