Merged in feat/SW-1472-destination-tracking (pull request #1474)
Feat/SW-1472 destination tracking * feat(SW-1472): Added default tracking for destination overview page * feat(SW-1472): Added default tracking for destination country/city page * feat(SW-1472): moved tracking functions to different files for better overview * feat(SW-1472): added destination page tracking Approved-by: Fredrik Thorsson Approved-by: Matilda Landström
This commit is contained in:
18
apps/scandic-web/utils/tracking/booking.ts
Normal file
18
apps/scandic-web/utils/tracking/booking.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { trackEvent } from "./base"
|
||||
|
||||
import type { LowestRoomPriceEvent } from "@/types/components/tracking"
|
||||
|
||||
export function trackLowestRoomPrice(event: LowestRoomPriceEvent) {
|
||||
trackEvent({
|
||||
event: "lowestRoomPrice",
|
||||
hotelInfo: {
|
||||
hotelId: event.hotelId,
|
||||
arrivalDate: event.arrivalDate,
|
||||
departureDate: event.departureDate,
|
||||
},
|
||||
viewItemInfo: {
|
||||
lowestPrice: event.lowestPrice,
|
||||
currency: event.currency,
|
||||
},
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user