From 03cc146eacbe6d52ee78b3a0087f3c1030294739 Mon Sep 17 00:00:00 2001 From: Bianca Widstam Date: Mon, 15 Sep 2025 13:45:32 +0000 Subject: [PATCH] Merged in fix/BOOK-132-tracking-breakfast (pull request #2803) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix(BOOK-132): add breakfastOption tracking * fix(BOOK-132): add breakfastOption tracking Approved-by: Joakim Jäderberg --- apps/scandic-web/utils/tracking/booking.ts | 3 +++ .../lib/components/EnterDetails/Breakfast/index.tsx | 1 + packages/booking-flow/lib/trackingContext.tsx | 1 + 3 files changed, 5 insertions(+) diff --git a/apps/scandic-web/utils/tracking/booking.ts b/apps/scandic-web/utils/tracking/booking.ts index e9e275d76..1c93977d8 100644 --- a/apps/scandic-web/utils/tracking/booking.ts +++ b/apps/scandic-web/utils/tracking/booking.ts @@ -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: [ diff --git a/packages/booking-flow/lib/components/EnterDetails/Breakfast/index.tsx b/packages/booking-flow/lib/components/EnterDetails/Breakfast/index.tsx index 88c7b70ff..b25813d10 100644 --- a/packages/booking-flow/lib/components/EnterDetails/Breakfast/index.tsx +++ b/packages/booking-flow/lib/components/EnterDetails/Breakfast/index.tsx @@ -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 diff --git a/packages/booking-flow/lib/trackingContext.tsx b/packages/booking-flow/lib/trackingContext.tsx index 9711c4768..c28cbddd0 100644 --- a/packages/booking-flow/lib/trackingContext.tsx +++ b/packages/booking-flow/lib/trackingContext.tsx @@ -34,6 +34,7 @@ export type TrackingFunctions = { breakfastPackage: BreakfastPackages[number] hotelId: string units: number + breakfastOption: string }): void trackBedSelection(bedType: string): void }