Merged in feat/SW-1355-reward-night-booking-tracking (pull request #1758)

feat: SW-1355 Tracking implementation reward night booking

* feat: SW-1355 Tracking implementation reward night booking

* feat: SW-1355 Updated checks and optional params

* feat: SW-1355 Typings updated

* feat: SW-1355 Removed undefined check

* feat: SW-1355 optimized code


Approved-by: Christian Andolf
This commit is contained in:
Hrishikesh Vaipurkar
2025-04-14 11:10:03 +00:00
parent 51a0855fc1
commit 1c5b116ed8
10 changed files with 54 additions and 13 deletions

View File

@@ -146,6 +146,9 @@ export function getTracking(
//rateCodeType: , //TODO: Add when available in API. "regular, promotion, corporate etx",
region: hotel?.address.city,
revenueCurrencyCode: rooms.map((r) => r.currencyCode).join(","),
rewardNight: booking.roomPoints > 0 ? "yes" : "no",
rewardNightAvailability: booking.roomPoints > 0 ? "true" : "false",
points: booking.roomPoints > 0 ? booking.roomPoints : undefined,
roomPrice: rooms.map((r) => r.roomPrice).join(","),
roomTypeCode: rooms.map((r) => r.roomTypeCode ?? "-").join(","),
searchType: "hotel",