Documentation Index

Fetch the complete documentation index at: https://docs.uplift.com/llms.txt

Use this file to discover all available pages before exploring further.

Analytics

Prev Next

The SDK provides three analytic methods that allow for Flex Pay to track user interaction with Flex Pay'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 Flex Pay'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 Flex Pay'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)
}