Files
web/apps/scandic-web/utils/tracking/hotelPage.ts
Hrishikesh Vaipurkar 1a03b44ea8 Merged in feat/SW-3042-tracking-hotel-page-btn-prices- (pull request #2590)
feat(SW-3042): Added tracking for prices and availability button

* feat(SW-3042): Added tracking for prices and availability button


Approved-by: Anton Gunnarsson
2025-08-06 09:38:29 +00:00

39 lines
700 B
TypeScript

import { trackEvent } from "./base"
export function trackHotelMapClick() {
trackEvent({
event: "map click",
map: {
action: "map click - open/explore mearby",
},
})
}
export function trackHotelTabClick(name: string) {
trackEvent({
event: "linkClick",
link: {
action: "hotel menu click",
option: `hotel menu:${name}`,
},
})
}
export function trackPricesAndAvailabilityClick(
name: string,
hotelId: string,
roomTypeCode: string
) {
trackEvent({
event: "priceAndAvailability",
cta: {
name: "Price and Availability",
},
hotelInfo: {
hotelId,
roomTypeName: name,
roomTypeCode: roomTypeCode,
},
})
}