import { trackEvent } from "@scandic-hotels/tracking/base" import type { TrackingSDKPageData } from "@scandic-hotels/tracking/types" interface trackLinkClickProps { position: "modal" | "banner" | "signup" | "profile" name: string } export function trackLinkClick({ position, name }: trackLinkClickProps) { trackEvent({ event: "profileConsent", profile: { position: position, }, link: { name: name, }, }) } interface trackConsentChangeProps { to: boolean from?: boolean } export function trackConsentChange({ to, from }: trackConsentChangeProps) { trackEvent({ event: "profileConsentUpdate", profile: { fromConsent: from, toConsent: to, }, cta: { name: "save & update the preferences", }, }) } interface trackConsentActionProps { position: "modal" | "banner" | "profile" name: string } export function trackConsentAction({ position, name, }: trackConsentActionProps) { trackEvent({ event: "profileConsent", profile: { position: position, }, cta: { name: name, }, }) } export const ModalTracking: Omit = { pageType: "profileconsentmodalpage", channel: "scandic-friends", siteVersion: "new-web", pageName: "profile consent modal", siteSections: "profile consent modal", }