Merged in feat/BOOK-693-tracking-member-price (pull request #3403)

feat(BOOK-693): add tracking for memberprice and join

* feat(BOOK-693): add tracking for memberprice and join


Approved-by: Erik Tiekstra
This commit is contained in:
Bianca Widstam
2026-01-09 08:40:22 +00:00
parent 411a8a2a2e
commit 6e700cc3d4
4 changed files with 15 additions and 1 deletions

View File

@@ -149,6 +149,9 @@ export function getTracking(
noOfAdults,
noOfChildren,
noOfRooms,
isMemberPriceActivated: rooms
.map((r) => (r.rateDefinition.isMemberRate ? "yes" : "no"))
.join(","),
rateCode: rooms.map((r) => r.rateDefinition.rateCode).join(","),
rateCodeCancellationRule: rooms
.map((r) => r.rateDefinition.cancellationRule)

View File

@@ -9,6 +9,7 @@ import Checkbox from "@scandic-hotels/design-system/Form/Checkbox"
import { LoginButton } from "@scandic-hotels/design-system/LoginButton"
import Link from "@scandic-hotels/design-system/OldDSLink"
import { Typography } from "@scandic-hotels/design-system/Typography"
import { trackEvent } from "@scandic-hotels/tracking/base"
import { trackLoginClick } from "@scandic-hotels/tracking/navigation"
import { useBookingFlowConfig } from "../../../../../bookingFlowConfig/bookingFlowConfigContext"
@@ -31,6 +32,15 @@ export function JoinScandicFriendsCard({ name = "join" }: Props) {
} = useRoomContext()
function onChange(event: { target: { value: boolean } }) {
if (event.target.value) {
trackEvent({
event: "memberPriceActivated",
cta: {
name: "join scandic friends now",
position: "banner enter details page",
},
})
}
updateJoin(event.target.value)
}

View File

@@ -1,8 +1,8 @@
import { useIntl } from "react-intl"
import { FormTextArea } from "@scandic-hotels/design-system/Form/FormTextArea"
import { Typography } from "@scandic-hotels/design-system/Typography"
import { FormTextArea } from "@scandic-hotels/design-system/Form/FormTextArea"
import styles from "./specialRequests.module.css"
import type { RegisterOptions } from "react-hook-form"