Merged in fix/tracking-requests (pull request #1208)
Added siteversion to all events and fixed payment status * Added siteversion to all events and fixed payment status * Fixed bug Approved-by: Erik Tiekstra
This commit is contained in:
@@ -38,6 +38,7 @@ export default function PaymentCallback({
|
||||
trackPaymentEvent({
|
||||
event: "paymentCancel",
|
||||
hotelId: detailsStorage.booking.hotelId,
|
||||
status: "cancelled",
|
||||
})
|
||||
}
|
||||
if (status === "error") {
|
||||
@@ -45,6 +46,7 @@ export default function PaymentCallback({
|
||||
event: "paymentFail",
|
||||
hotelId: detailsStorage.booking.hotelId,
|
||||
errorMessage,
|
||||
status: "failed",
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -176,6 +176,7 @@ export default function PaymentClient({
|
||||
isSavedCreditCard,
|
||||
smsEnable,
|
||||
errorMessage,
|
||||
status: "failed",
|
||||
})
|
||||
},
|
||||
[intl, methods, savedCreditCards, hotelId]
|
||||
@@ -230,6 +231,7 @@ export default function PaymentClient({
|
||||
method: paymentMethod,
|
||||
isSavedCreditCard: !!savedCreditCard,
|
||||
smsEnable: data.smsConfirmation,
|
||||
status: "attempt",
|
||||
})
|
||||
|
||||
initiateBooking.mutate({
|
||||
|
||||
@@ -13,7 +13,7 @@ import useRouterTransitionStore from "@/stores/router-transition"
|
||||
import useTrackingStore from "@/stores/tracking"
|
||||
|
||||
import { useSessionId } from "@/hooks/useSessionId"
|
||||
import { createSDKPageObject, pushToDataLayer } from "@/utils/tracking"
|
||||
import { createSDKPageObject, trackPageView } from "@/utils/tracking"
|
||||
|
||||
import type { TrackingSDKProps } from "@/types/components/tracking"
|
||||
|
||||
@@ -59,7 +59,7 @@ export default function RouterTransition({
|
||||
pageLoadTime: entry.duration / 1000,
|
||||
}
|
||||
const pageObject = createSDKPageObject(trackingData)
|
||||
pushToDataLayer({
|
||||
trackPageView({
|
||||
event: "pageView",
|
||||
pageInfo: pageObject,
|
||||
userInfo: userData,
|
||||
@@ -115,7 +115,7 @@ export default function RouterTransition({
|
||||
}
|
||||
const pageObject = createSDKPageObject(trackingData)
|
||||
if (previousPathname.current !== pathName) {
|
||||
pushToDataLayer({
|
||||
trackPageView({
|
||||
event: "pageView",
|
||||
pageInfo: pageObject,
|
||||
userInfo: userData,
|
||||
|
||||
Reference in New Issue
Block a user