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:
@@ -169,6 +169,10 @@ export function getTracking(
|
|||||||
booking.searchType === REDEMPTION ? "true" : "false",
|
booking.searchType === REDEMPTION ? "true" : "false",
|
||||||
roomPrice: calcTotalRoomPrice(rooms, isMember),
|
roomPrice: calcTotalRoomPrice(rooms, isMember),
|
||||||
totalPrice: calcTotalPrice(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,
|
searchTerm: city,
|
||||||
searchType: "hotel",
|
searchType: "hotel",
|
||||||
specialRoomType: rooms
|
specialRoomType: rooms
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ export type TrackingSDKHotelInfo = {
|
|||||||
revenueCurrencyCode?: string // SEK, DKK, NOK, EUR
|
revenueCurrencyCode?: string // SEK, DKK, NOK, EUR
|
||||||
rewardNight?: string
|
rewardNight?: string
|
||||||
rewardNightAvailability?: 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
|
roomPrice?: number | string
|
||||||
roomTypeCode?: string
|
roomTypeCode?: string
|
||||||
roomTypeName?: string
|
roomTypeName?: string
|
||||||
|
|||||||
Reference in New Issue
Block a user