Merged in feat/SW-1355-reward-night-booking-track-2 (pull request #1877)

feat: SW-1355 Added points value in details page tracking

* feat: SW-1355 Added points value in details page tracking

* feat: SW-1355 Updated .flatMap to .map

* feat: SW-1355 Optimized for readability


Approved-by: Michael Zetterberg
This commit is contained in:
Hrishikesh Vaipurkar
2025-04-29 07:52:29 +00:00
parent 5f836b0c82
commit 6a0f22b166
2 changed files with 5 additions and 1 deletions

View File

@@ -169,6 +169,10 @@ export function getTracking(
booking.searchType === REDEMPTION ? "true" : "false",
roomPrice: calcTotalRoomPrice(rooms, isMember),
totalPrice: calcTotalPrice(rooms, isMember),
points:
// @ts-expect-error - redemption object doesn't exist error
rooms.find((room) => "redemption" in room.roomRate)?.roomRate.redemption
.localPrice.pointsPerStay ?? "n/a",
searchTerm: city,
searchType: "hotel",
specialRoomType: rooms

View File

@@ -88,7 +88,7 @@ export type TrackingSDKHotelInfo = {
revenueCurrencyCode?: string // SEK, DKK, NOK, EUR
rewardNight?: string
rewardNightAvailability?: string
points?: number // Should be sent only on confirmation page
points?: number | string // Should be sent on confirmation page and enter-details page
roomPrice?: number | string
roomTypeCode?: string
roomTypeName?: string