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:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user