Superwall
3rd Party Analytics

Custom Paywall Analytics

Learn how to log events from paywalls, such as a button tap or product change, to forward to your analytics service.

You can create customized analytics tracking for any paywall event by using custom placements. With them, you can get callbacks for actions such as interacting with an element on a paywall sent to your Superwall delegate. This can be useful for tracking how users interact with your paywall and how that affects their behavior in other areas of your app.

For example, in the paywall below, perhaps you're interested in tracking when people switch the plan from "Standard" and "Pro":

You could create a custom placement tap behavior which fires when a segment is tapped:

Then, you can listen for this placement and forward it to your analytics service:

extension SuperwallService: SuperwallDelegate {
  func handleSuperwallEvent(withInfo eventInfo: SuperwallEventInfo) {
    switch eventInfo.event {
      case let .customPlacement(name, params, paywallInfo):
        // Prints out didTapPro or didTapStandard
        print("\(name) - \(params) - \(paywallInfo)")
        MyAnalyticsService.shared.send(event: name, params: params)
      default:
        print("Default event: \(eventInfo.event.description)")
    }
  }
}

For a walkthrough example, check out this video on YouTube.

How is this guide?