diff --git a/apps/scandic-web/utils/tracking/booking.ts b/apps/scandic-web/utils/tracking/booking.ts index 57510a690..f649bc0f6 100644 --- a/apps/scandic-web/utils/tracking/booking.ts +++ b/apps/scandic-web/utils/tracking/booking.ts @@ -47,18 +47,20 @@ export function trackBreakfastSelection({ selection: { name: "breakfast options selection click", }, - ancillaries: [ - { - hotelId: hotelId, - productCategory: "", - productId: breakfastPackage.code, - productUnits: units, - productPrice: units > 0 ? breakfastPackage.localPrice.price * units : 0, - productPoints: 0, - productType: "food", - productName: breakfastPackage.packageType, - }, - ], + ...(units > 0 && { + ancillaries: [ + { + hotelId, + productCategory: "", + productId: breakfastPackage.code, + productUnits: units, + productPrice: breakfastPackage.localPrice.price * units, + productPoints: 0, + productType: "food", + productName: breakfastPackage.packageType, + }, + ], + }), pageInfo: { pageName: "hotelreservation|breakfast", pageType: "bookingbreakfastpage",