Merged in feat/SW-1517-booking-codes-tracking (pull request #1745)
Feat/SW-1517 booking codes tracking * feat: SW-1517 Updated tracking to inlcude booking code info * feat: SW-1517 Tracking booking codes * feat: SW-1517 booking code multiroom tracking * feat: SW-1517 booking code tracking select-hotel map view * feat: SW-1517 Updated to optional param * feat: SW-1517 Optimized with map * feat: SW-1517 Typings update * feat: SW-1517 Replaced reduce with map and join * feat: SW-1517 Updated typings Approved-by: Christian Andolf
This commit is contained in:
@@ -28,8 +28,14 @@ export default async function SelectRatePage({
|
||||
if (!searchDetails?.hotel) {
|
||||
return notFound()
|
||||
}
|
||||
const { adultsInRoom, childrenInRoom, hotel, noOfRooms, selectHotelParams } =
|
||||
searchDetails
|
||||
const {
|
||||
adultsInRoom,
|
||||
childrenInRoom,
|
||||
hotel,
|
||||
noOfRooms,
|
||||
selectHotelParams,
|
||||
bookingCode,
|
||||
} = searchDetails
|
||||
|
||||
const hotelData = await getHotel({
|
||||
hotelId: hotel.id,
|
||||
@@ -63,7 +69,8 @@ export default async function SelectRatePage({
|
||||
noOfRooms,
|
||||
hotelData.hotel.address.country,
|
||||
hotelData.hotel.address.city,
|
||||
selectHotelParams.city
|
||||
selectHotelParams.city,
|
||||
bookingCode
|
||||
)
|
||||
|
||||
const booking = convertSearchParamsToObj<SelectRateSearchParams>(searchParams)
|
||||
|
||||
@@ -20,7 +20,8 @@ export function getTracking(
|
||||
noOfRooms: number,
|
||||
country: string | undefined,
|
||||
hotelCity: string | undefined,
|
||||
paramCity: string | undefined
|
||||
paramCity: string | undefined,
|
||||
bookingCode?: string
|
||||
) {
|
||||
const pageTrackingData: TrackingSDKPageData = {
|
||||
channel: TrackingChannelEnum.hotelreservation,
|
||||
@@ -52,6 +53,7 @@ export function getTracking(
|
||||
region: hotelCity,
|
||||
searchTerm: paramCity ?? hotelName,
|
||||
searchType: "hotel",
|
||||
bookingCode: bookingCode ?? "n/a",
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user