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,
|
noOfAdults,
|
||||||
noOfChildren,
|
noOfChildren,
|
||||||
noOfRooms,
|
noOfRooms,
|
||||||
|
isMemberPriceActivated: rooms
|
||||||
|
.map((r) => (r.rateDefinition.isMemberRate ? "yes" : "no"))
|
||||||
|
.join(","),
|
||||||
rateCode: rooms.map((r) => r.rateDefinition.rateCode).join(","),
|
rateCode: rooms.map((r) => r.rateDefinition.rateCode).join(","),
|
||||||
rateCodeCancellationRule: rooms
|
rateCodeCancellationRule: rooms
|
||||||
.map((r) => r.rateDefinition.cancellationRule)
|
.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 { LoginButton } from "@scandic-hotels/design-system/LoginButton"
|
||||||
import Link from "@scandic-hotels/design-system/OldDSLink"
|
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||||
|
import { trackEvent } from "@scandic-hotels/tracking/base"
|
||||||
import { trackLoginClick } from "@scandic-hotels/tracking/navigation"
|
import { trackLoginClick } from "@scandic-hotels/tracking/navigation"
|
||||||
|
|
||||||
import { useBookingFlowConfig } from "../../../../../bookingFlowConfig/bookingFlowConfigContext"
|
import { useBookingFlowConfig } from "../../../../../bookingFlowConfig/bookingFlowConfigContext"
|
||||||
@@ -31,6 +32,15 @@ export function JoinScandicFriendsCard({ name = "join" }: Props) {
|
|||||||
} = useRoomContext()
|
} = useRoomContext()
|
||||||
|
|
||||||
function onChange(event: { target: { value: boolean } }) {
|
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)
|
updateJoin(event.target.value)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { useIntl } from "react-intl"
|
import { useIntl } from "react-intl"
|
||||||
|
|
||||||
|
import { FormTextArea } from "@scandic-hotels/design-system/Form/FormTextArea"
|
||||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||||
|
|
||||||
import { FormTextArea } from "@scandic-hotels/design-system/Form/FormTextArea"
|
|
||||||
import styles from "./specialRequests.module.css"
|
import styles from "./specialRequests.module.css"
|
||||||
|
|
||||||
import type { RegisterOptions } from "react-hook-form"
|
import type { RegisterOptions } from "react-hook-form"
|
||||||
|
|||||||
@@ -106,6 +106,7 @@ export type TrackingSDKHotelInfo = {
|
|||||||
totalPrice?: number | string
|
totalPrice?: number | string
|
||||||
lateArrivalGuarantee?: string
|
lateArrivalGuarantee?: string
|
||||||
guaranteedProduct?: string
|
guaranteedProduct?: string
|
||||||
|
isMemberPriceActivated?: string // "yes" | "no"
|
||||||
emailId?: string // Encrypted hash value on booking confirmation page
|
emailId?: string // Encrypted hash value on booking confirmation page
|
||||||
mobileNumber?: string // Encrypted hash value on booking confirmation page
|
mobileNumber?: string // Encrypted hash value on booking confirmation page
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user