Superwall
3rd Party Analytics

Cohorting in 3rd Party Tools

To easily view Superwall cohorts in 3rd party tools, we recommend you set user attributes based on the experiments that users are included in. You can also use custom placements for creating analytics events for actions such as interacting with an element on a paywall.

extension SuperwallService: SuperwallDelegate {
  func handleSuperwallEvent(withInfo eventInfo: SuperwallEventInfo) {
    if eventInfo.event.description == "trigger_fire" {
      MyAnalyticsService.shared.setUserAttributes([
        "sw_experiment_\(eventInfo.event.params["experiment_id"])": true,
        "sw_variant_\(eventInfo.event.params["variant_id"])": true
      ])
    }
  }
}

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.

How is this guide?