Hooking up Superwall placements to 3rd party tools
SuperwallKit automatically registers some internal placements. You can view the list of placements here. We encourage you to also track them in your own analytics by implementing the Superwall delegate. Using the handleSuperwallPlacement(withInfo:) function, you can forward events to your analytics service:
If your goal is simply to view which product was purchased from a paywall, you don’t need a purchase controller for that (though it can be done in one). Using a SuperwallDelegate, you can leverage the transactionComplete placement, which provides direct access to the purchased product via product:
In that example, as soon as a user converts on a paywall, the product identifier will be printed to the console:
Converted from paywall: ex.someProduct.identifier
In addition, you can use a PaywallPresentationHandler to view any purchased product:
let handler =PaywallPresentationHandler()handler.onDismiss { info, result inswitch result {// Purchased product reported here...case.purchased(let product):print("Bought \(product)")default:print("Handle other results...")}}Superwall.shared.register(placement:"myPlacement", handler: handler){print("Feature unlocked.")}