Skip to main content

Thank You Page Mobile Integration

The Thank You Page (TYP) helps Ecommerce partners boost average order value by allowing shoppers to add relevant products to their current order without needing to re-enter payment information. Positioned between the payment and confirmation pages, this underutilized moment offers a prime opportunity to encourage additional purchases, as shoppers are highly likely to consider extras right after completing their core transaction.

The Thank You layout is an overlay that appears just before the confirmation page, immediately following the purchase action. It serves as an effective "last chance" upsell opportunity, encouraging customers to make additional purchases before finalizing their transaction.

Integrating and initializing the SDKDirect link to Integrating and initializing the SDK

To integrate Rokt SDKs into your application, please follow the instruction for iOS and Android

Displaying the TYPDirect link to Displaying the TYP

To display the TYP in your application, you can utilize the Rokt.execute function which demonstrated in iOS and Android documentation.

Given you need to be aware of user interactions with a cartItem you must integrate using the equivalent of Rokt.executeWithEvents for your chosen platform.

Rokt.executeWithEvents(viewName: viewName,
attributes: attributes,
placements: placements,
onEvent: { event in
if let instancePurchase = event as CartItemInstantPurchase {
// With the cart item details you now need to process the order and take the additional payment amount
}
})

CartItemInstantPurchase eventDirect link to CartItemInstantPurchase event

When a user pressed a catalogItem to purchase it instantly in the Thank you page, a CartItemInstantPurchase event will be triggered with the following data.

ParameterTypeDescription
placementIdStringThe unique identifier of the placement associated with the event.
cartItemIdStringA unique identifier for the cart item.
catalogItemIdStringA unique identifier for the catalog item.
currencyStringThe currency code for the item price.
descriptionStringA brief description of the selected catalog item.
providerDataStringAdditional data provided by the item provider.
nameString?The name of the catalog item selected by the user.
linkedProductIdString?An ID linking the item to a related product, if applicable.
quantityDecimal?The quantity of the item selected by the user.
totalPriceDecimal?The total price of the item, calculated as unit price multiplied by quantity.
unitPriceDecimal?The unit price of the selected item.

Closing the loopDirect link to Closing the loop

When you complete the purchase flow and have updated the existing order or created a new order for the instant purchase, you need to call Rokt.purchaseFinalized to close the loop.

// For placementId, pass the placementId returned in CartItemInstantPurchase event
// For catalogItemId, pass the catalogItemId returned in the CartItemInstantPurchase event
// For success, pass the result of the user's purchase, whether it was successful or not
Rokt.purchaseFinalized(placementId: placementId, catalogItemId: catalogItemId, success: success)

Was this article helpful?