Merged in fix/BOOK-131-noroomsavailability-tracking (pull request #2971)
fix(BOOK-131): add action and domain * fix(BOOK-131): add action and domain Approved-by: Anton Gunnarsson
This commit is contained in:
@@ -6,6 +6,7 @@ import { useIntl } from "react-intl"
|
||||
|
||||
import { AlertTypeEnum } from "@scandic-hotels/common/constants/alert"
|
||||
import { selectRate } from "@scandic-hotels/common/constants/routes/hotelReservation"
|
||||
import { useSessionId } from "@scandic-hotels/common/hooks/useSessionId"
|
||||
import useStickyPosition from "@scandic-hotels/common/hooks/useStickyPosition"
|
||||
import { Alert } from "@scandic-hotels/design-system/Alert"
|
||||
import { trackNoAvailability } from "@scandic-hotels/tracking/NoAvailabilityTracking"
|
||||
@@ -165,6 +166,7 @@ function useNoAvailabilityTracking() {
|
||||
const { fromDate, toDate, hotelId, bookingCode, searchType, rooms } =
|
||||
useEnterDetailsStore((state) => state.booking)
|
||||
const lang = useLang()
|
||||
const sessionId = useSessionId()
|
||||
|
||||
const specialRoomType = rooms
|
||||
?.map((room) => {
|
||||
@@ -191,6 +193,8 @@ function useNoAvailabilityTracking() {
|
||||
pageName: "hotelreservation|details",
|
||||
pageType: "bookingenterdetailspage",
|
||||
siteSections: "hotelreservation|details",
|
||||
sessionId,
|
||||
domain: typeof window !== "undefined" ? window.location.host : "",
|
||||
}),
|
||||
[
|
||||
specialRoomType,
|
||||
@@ -201,6 +205,7 @@ function useNoAvailabilityTracking() {
|
||||
rooms.length,
|
||||
searchType,
|
||||
bookingCode,
|
||||
sessionId,
|
||||
]
|
||||
)
|
||||
return track
|
||||
|
||||
Reference in New Issue
Block a user