Once you’ve set this up, you can easily ask for all users who have an attribute sw_experiment_1234 and breakdown by both variants to see how users in a Superwall experiment behave in other areas of your app.

Creating custom analytics tracking using custom placements

By using custom placements, you can create analytic events for actions such as interacting with an element on a paywall. 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 event and forward it to your analytics service:

Swift
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)")
    }
  }
}