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:
@@ -35,15 +35,18 @@ export function trackBreakfastSelection({
|
|||||||
breakfastPackage,
|
breakfastPackage,
|
||||||
hotelId,
|
hotelId,
|
||||||
units,
|
units,
|
||||||
|
breakfastOption,
|
||||||
}: {
|
}: {
|
||||||
breakfastPackage: BreakfastPackages[number]
|
breakfastPackage: BreakfastPackages[number]
|
||||||
hotelId: string
|
hotelId: string
|
||||||
units: number
|
units: number
|
||||||
|
breakfastOption: string
|
||||||
}) {
|
}) {
|
||||||
trackEvent({
|
trackEvent({
|
||||||
event: "breakfastSelection",
|
event: "breakfastSelection",
|
||||||
selection: {
|
selection: {
|
||||||
name: "breakfast options selection click",
|
name: "breakfast options selection click",
|
||||||
|
breakfastOption,
|
||||||
},
|
},
|
||||||
...(units > 0 && {
|
...(units > 0 && {
|
||||||
ancillaries: [
|
ancillaries: [
|
||||||
|
|||||||
@@ -60,6 +60,7 @@ export default function Breakfast() {
|
|||||||
breakfastPackage: pkg ?? packages[0],
|
breakfastPackage: pkg ?? packages[0],
|
||||||
hotelId,
|
hotelId,
|
||||||
units: pkg ? room.adults : 0,
|
units: pkg ? room.adults : 0,
|
||||||
|
breakfastOption: pkg ? "breakfast buffet" : "no breakfast",
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ export type TrackingFunctions = {
|
|||||||
breakfastPackage: BreakfastPackages[number]
|
breakfastPackage: BreakfastPackages[number]
|
||||||
hotelId: string
|
hotelId: string
|
||||||
units: number
|
units: number
|
||||||
|
breakfastOption: string
|
||||||
}): void
|
}): void
|
||||||
trackBedSelection(bedType: string): void
|
trackBedSelection(bedType: string): void
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user