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.
- Swift
- SwiftUI
- Kotlin
- JetpackCompose
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
}
})
RoktLayout(sdkTriggered: .constant(true),
viewName: viewName,
locationName: location,
attributes: attributes) { roktEvent in
if let instancePurchase = event as CartItemInstantPurchase {
cartItemEvent = instancePurchase
// With the cart item details you now need to process the order and take the additional payment amount
}
}
Rokt.executeWithEvents(
viewName = viewName,
attributes = attributes,
placeholders = placeholders
).collect { event ->
if (event is CartItemInstantPurchase) {
// With the cart item details you now need to process the order and take the additional payment amount
}
}
RoktLayout(
sdkTriggered = sdkTriggered,
viewName = viewName,
attributes = attributes,
location = location,
) { event ->
if (event is 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.
| Parameter | Type | Description |
|---|---|---|
| placementId | String | The unique identifier of the placement associated with the event. |
| cartItemId | String | A unique identifier for the cart item. |
| catalogItemId | String | A unique identifier for the catalog item. |
| currency | String | The currency code for the item price. |
| description | String | A brief description of the selected catalog item. |
| providerData | String | Additional data provided by the item provider. |
| name | String? | The name of the catalog item selected by the user. |
| linkedProductId | String? | An ID linking the item to a related product, if applicable. |
| quantity | Decimal? | The quantity of the item selected by the user. |
| totalPrice | Decimal? | The total price of the item, calculated as unit price multiplied by quantity. |
| unitPrice | Decimal? | 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.
- Swift
- Kotlin
// 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)
// 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)