Merged in fix/SW-1997-gla-tracking (pull request #1852)
fix(SW-1997): add price and currency * fix(SW-1997): add price and currency * fix(SW-1997): wrap lateArrivalGuaranteee and guaranteedProduct in hotelInfo Approved-by: Niclas Edenvin
This commit is contained in:
@@ -48,19 +48,25 @@ export default function TrackGuarantee({
|
|||||||
productUnits: pkg.quantity,
|
productUnits: pkg.quantity,
|
||||||
productPoints: selectedAncillary?.points,
|
productPoints: selectedAncillary?.points,
|
||||||
productDeliveryTime: formData?.deliveryTime,
|
productDeliveryTime: formData?.deliveryTime,
|
||||||
productPrice: selectedAncillary?.price,
|
productPrice: selectedAncillary?.price.total,
|
||||||
|
currency: selectedAncillary?.price.currency,
|
||||||
productName: selectedAncillary?.title,
|
productName: selectedAncillary?.title,
|
||||||
productCategory: selectedAncillary?.categoryName,
|
productCategory: selectedAncillary?.categoryName,
|
||||||
})),
|
})),
|
||||||
lateArrivalGuarantee: "yes",
|
hotelInfo: {
|
||||||
guaranteedProduct: "room + ancillary",
|
hotelId: selectedAncillary?.hotelId,
|
||||||
|
lateArrivalGuarantee: "yes",
|
||||||
|
guaranteedProduct: "room + ancillary",
|
||||||
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const trackGuaranteePaymentEvent = (event: string, status: string) => {
|
const trackGuaranteePaymentEvent = (event: string, status: string) => {
|
||||||
|
const glaHotelInfo = readGlaFromSessionStorage()
|
||||||
trackEvent({
|
trackEvent({
|
||||||
event,
|
event,
|
||||||
hotelInfo: {
|
hotelInfo: {
|
||||||
|
hotelId: glaHotelInfo?.hotelId,
|
||||||
lateArrivalGuarantee: "yes",
|
lateArrivalGuarantee: "yes",
|
||||||
guaranteedProduct: "room",
|
guaranteedProduct: "room",
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -66,12 +66,16 @@ export function trackGlaAncillaryAttempt(
|
|||||||
productUnits: pkg.quantity,
|
productUnits: pkg.quantity,
|
||||||
productPoints: selectedAncillary?.points,
|
productPoints: selectedAncillary?.points,
|
||||||
productDeliveryTime: deliveryTime,
|
productDeliveryTime: deliveryTime,
|
||||||
productPrice: selectedAncillary?.price,
|
productPrice: selectedAncillary?.price.total,
|
||||||
|
currency: selectedAncillary?.price.currency,
|
||||||
productName: selectedAncillary?.title,
|
productName: selectedAncillary?.title,
|
||||||
productCategory: selectedAncillary?.categoryName,
|
productCategory: selectedAncillary?.categoryName,
|
||||||
})),
|
})),
|
||||||
lateArrivalGuarantee: "yes",
|
hotelInfo: {
|
||||||
guaranteedProduct: "room + ancillary",
|
hotelId: selectedAncillary?.hotelId,
|
||||||
|
lateArrivalGuarantee: "yes",
|
||||||
|
guaranteedProduct: "room + ancillary",
|
||||||
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -93,6 +97,8 @@ export function trackAncillarySuccess(
|
|||||||
hotelInfo: {
|
hotelInfo: {
|
||||||
bnr: confirmationNumber,
|
bnr: confirmationNumber,
|
||||||
roomTypeCode: roomTypeCode,
|
roomTypeCode: roomTypeCode,
|
||||||
|
lateArrivalGuarantee: "yes",
|
||||||
|
guaranteedProduct: guaranteedProduct,
|
||||||
},
|
},
|
||||||
paymentInfo: {
|
paymentInfo: {
|
||||||
status: "glacardsaveconfirmed",
|
status: "glacardsaveconfirmed",
|
||||||
@@ -103,12 +109,11 @@ export function trackAncillarySuccess(
|
|||||||
productUnits: pkg.quantity,
|
productUnits: pkg.quantity,
|
||||||
productPoints: selectedAncillary?.points,
|
productPoints: selectedAncillary?.points,
|
||||||
productDeliveryTime: deliveryTime,
|
productDeliveryTime: deliveryTime,
|
||||||
productPrice: selectedAncillary?.price,
|
productPrice: selectedAncillary?.price.total,
|
||||||
|
currency: selectedAncillary?.price.currency,
|
||||||
productName: selectedAncillary?.title,
|
productName: selectedAncillary?.title,
|
||||||
productCategory: selectedAncillary?.categoryName,
|
productCategory: selectedAncillary?.categoryName,
|
||||||
})),
|
})),
|
||||||
lateArrivalGuarantee: "yes",
|
|
||||||
guaranteedProduct: guaranteedProduct,
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -128,12 +133,16 @@ export function trackAncillaryFailed(
|
|||||||
productUnits: pkg.quantity,
|
productUnits: pkg.quantity,
|
||||||
productPoints: selectedAncillary?.points,
|
productPoints: selectedAncillary?.points,
|
||||||
productDeliveryTime: deliveryTime,
|
productDeliveryTime: deliveryTime,
|
||||||
productPrice: selectedAncillary?.price,
|
productPrice: selectedAncillary?.price.total,
|
||||||
|
currency: selectedAncillary?.price.currency,
|
||||||
productName: selectedAncillary?.title,
|
productName: selectedAncillary?.title,
|
||||||
productCategory: selectedAncillary?.categoryName,
|
productCategory: selectedAncillary?.categoryName,
|
||||||
})),
|
})),
|
||||||
lateArrivalGuarantee: "yes",
|
hotelInfo: {
|
||||||
guaranteedProduct: "ancillary",
|
hotelId: selectedAncillary?.hotelId,
|
||||||
|
lateArrivalGuarantee: "yes",
|
||||||
|
guaranteedProduct: "ancillary",
|
||||||
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -184,7 +193,8 @@ export function trackAddAncillary(
|
|||||||
productId: ancillary?.id,
|
productId: ancillary?.id,
|
||||||
productName: ancillary?.title,
|
productName: ancillary?.title,
|
||||||
productUnits: quantityWithCard,
|
productUnits: quantityWithCard,
|
||||||
productPrice: ancillary?.price,
|
productPrice: ancillary?.price.total,
|
||||||
|
currency: ancillary?.price.currency,
|
||||||
productCategory: ancillary?.categoryName,
|
productCategory: ancillary?.categoryName,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user