- 20 Jun 2023
- 1 Minute to read
- DarkLight
Analytics
- Updated on 20 Jun 2023
- 1 Minute to read
- DarkLight
The SDK provides three analytic methods that allow for Uplift to track user interaction with Uplift's checkout flow.
This tracking is necessary for customer service and debugging purposes and is strongly advised to be included into the integration.
sendPMSelectedEvent
sendPMSelectedEvent
should be called when the customer selects Uplift's pay monthly option on the checkout page.
@IBAction func selectPMPaymentButtonPushed() {
// Send analytics event
ULAnalytics.sendPMSelectedEvent()
// Other business logic stuffs
}
sendPMDeselectedEvent
sendPMDeselectedEvent
should be called when the customer deselects Uplift's pay monthly option on the checkout page. In this case, an extra String
parameter which describes what the customer selected instead of this option.
@IBAction func deselectPMPaymentButtonPushed() {
// Send analytics event
ULAnalytics.sendPMDeselectedEvent(with: "The Other Payment Option")
// Other business logic stuffs
}
sendSubmitEventWithVirtualCard
sendSubmitEvent(with virtualCard: ULPMVirtualCard, tripInfo: ULPMTripInfo)
should be called when the virtual payment card has been received and the booking is being processed.
func submitVirtualCard(with virtualCard: ULPMVirtualCard, tripInfo: ULPMTripInfo) {
// Submit data to your server
// Send analytics event
ULAnalytics.sendSubmitEvent(with: virtualCard, tripInfo: tripInfo)
}