BTShopperInsightsClient
@available(*, deprecated, message: "Use BTShopperInsightsClientV2 instead.")
public class BTShopperInsightsClient
Use BTShopperInsightsClient to optimize your checkout experience by prioritizing the customer’s preferred payment methods in your UI.
By customizing each customer’s checkout experience, you can improve conversion, increase sales/repeat buys and boost user retention/loyalty.
Warning
This feature is in beta. It’s public API may change or be removed in future releases.-
Creates a
BTShopperInsightsClientWarning
This init is beta. It’s public API may change or be removed in future releases. This feature only works with a client token.Declaration
Swift
public init(authorization: String, shopperSessionID: String? = nil)Parameters
authorizationA valid client token or tokenization key used to authorize API calls
shopperSessionIDOptional: This value should be the shopper session ID returned from your server SDK request
-
getRecommendedPaymentMethods(request:Asynchronousexperiment: ) This method confirms if the customer is a user of PayPal services using their email and phone number.
Warning
This feature is in beta. Its public API may change or be removed in future releases. PayPal recommendation is only available for US, AU, FR, DE, ITA, NED, ESP, Switzerland and UK merchants. Venmo recommendation is only available for US merchants.Declaration
Swift
public func getRecommendedPaymentMethods( request: BTShopperInsightsRequest, experiment: String? = nil ) async throws -> BTShopperInsightsResultParameters
requestRequired: A
BTShopperInsightsRequestcontaining the buyer’s user information.experimentOptional: A
JSONObjectpassed in as a string containing details of the merchant experiment.Return Value
A
BTShopperInsightsResultinstance -
Call this method when the PayPal or Venmo button has been successfully displayed to the buyer. This method sends analytics to help improve the Shopper Insights feature experience.
Declaration
Swift
public func sendPresentedEvent(for buttonType: BTButtonType, presentmentDetails: BTPresentmentDetails)Parameters
buttonTypeType of button presented - PayPal, Venmo, or Other
presentmentDetailsDetailed information, including button order, experiment type, and page type about the payment button that is sent to analytics to help improve the Shopper Insights feature experience.
-
Call this method when a button has been selected/tapped by the buyer. This method sends analytics to help improve the Shopper Insights feature experience.
Warning
This function is in beta. It’s public API may change or be removed in future releases.Declaration
Swift
public func sendSelectedEvent(for buttonType: BTButtonType)Parameters
buttonTypeType of button presented - PayPal, Venmo, or Other
-
Indicates whether the PayPal App is installed.
Warning
This method is currently in beta and may change or be removed in future releases.Declaration
Swift
public func isPayPalAppInstalled() -> Bool -
Indicates whether the Venmo App is installed.
Warning
This method is currently in beta and may change or be removed in future releases.Declaration
Swift
public func isVenmoAppInstalled() -> Bool
View on GitHub