feat(SW-2873): Move HotelReservationSidePeek to booking-flow * Move sidepeek store to booking-flow * Begin move of HotelReservationSidePeek to booking-flow * Copy Link * Update AccessibilityAccordionItem * Split AccessibilityAccordionItem into two components * Fix tracking for Accordion * Duplicate ButtonLink to booking-flow TEMP * AdditionalAmeneties * wip * Move sidepeek accordion items * Remove temp ButtonLink * Merge branch 'master' into feat/sw-3218-move-hotelreservationsidepeek-to-booking-flow * Fix accordion tracking * Merge branch 'master' into feat/sw-3218-move-hotelreservationsidepeek-to-booking-flow * Update exports * Fix self-referencing import * Merge branch 'master' into feat/sw-3218-move-hotelreservationsidepeek-to-booking-flow * Add 'use client' to tracking function * Merge branch 'master' into feat/sw-3218-move-hotelreservationsidepeek-to-booking-flow * Fix TEMP folder * Refactor sidepeek tracking * Merge branch 'master' into feat/sw-3218-move-hotelreservationsidepeek-to-booking-flow Approved-by: Joakim Jäderberg
37 lines
686 B
TypeScript
37 lines
686 B
TypeScript
"use client"
|
|
import { trackEvent } from "./base"
|
|
|
|
export function trackAccordionClick(option: string) {
|
|
trackEvent({
|
|
event: "accordionClick",
|
|
accordion: {
|
|
action: "accordion open click",
|
|
option,
|
|
},
|
|
})
|
|
}
|
|
|
|
export function trackOpenSidePeekEvent({
|
|
name,
|
|
hotelId,
|
|
includePathname,
|
|
roomTypeCode,
|
|
}: {
|
|
name: string | null
|
|
hotelId: string
|
|
includePathname?: boolean
|
|
roomTypeCode?: string | null
|
|
}) {
|
|
trackEvent({
|
|
event: "openSidePeek",
|
|
hotelInfo: {
|
|
hotelId: hotelId,
|
|
},
|
|
cta: {
|
|
name,
|
|
...(roomTypeCode ? { roomTypeCode } : {}),
|
|
...(includePathname ? { pathName: window.location.pathname } : {}),
|
|
},
|
|
})
|
|
}
|