Merged in feat/sw-3473-remove-tracking-context (pull request #2843)

feat(SW-3473): Rework booking-flow tracking provider

* Remove tracking context and import instead

* Remove unused file


Approved-by: Joakim Jäderberg
This commit is contained in:
Anton Gunnarsson
2025-09-22 13:08:10 +00:00
parent a7b19e8b14
commit 630e89c845
30 changed files with 77 additions and 382 deletions
+36
View File
@@ -0,0 +1,36 @@
"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 } : {}),
},
})
}