You can send parameters along with any placement you create. For example, if you had a caffeine logging app — perhaps you’d have a placement for logging caffeine:

// In iOS...
Superwall.shared.register(placement: "caffeineLogged") {
    store.log(amountToLog)
}

Now, imagine you could log caffeine from several different touch points in your app. You may wish to know where the user tried to log caffeine from, and you could tie a parameter to the caffeineLogged placement to do this:

Superwall.shared.register(placement: "caffeineLogged", params: ["via":"logging_page"]) {
  store.log(amountToLog)
}

The via parameter could now be used all throughout Superwall. You could create a new audience which has filters for each place users logged caffeine from, and unique paywalls for each of them.

Parameter placements can be used in four primary ways:

  1. Audience Filtering: As mentioned above, you can filter against parameters when creating audiences. Following our example, you’d create a placement parameter named via and then choose how to filter off of the parameter’s value:

  2. Templating in Text: Parameters are available in our paywall editor, so you can easily use them in text components too:

Hey {{user.firstName}}! FitnessAI offers tons of {{user.fitnessGoal}} workouts to help you reach your goals :)
  1. Interfacing with Analytics: Another common scenario is cohorting with your own analytics. See this doc for more.

  2. Reference them on Paywalls: Display dynamic images by constructing URLs based on placement parameters, change copy on a paywall to emphasize a feature, and more. For more, check out the docs over creating custom variables.

To see an example of using placement parameters in a paywall, see this video: