superwall / Superwall-iOS

Remotely configure every aspect of your paywall and double your revenue.
https://superwall.com
MIT License
89 stars 24 forks source link

[FEATURE REQUEST] Differentiate paywall close reasons between paid or deep link (or any others) when onDismiss handler is invoked #232

Open irwinb opened 2 months ago

irwinb commented 2 months ago

Is your feature request related to a problem? Please describe. We would like to track when a purchase is made and which product was purchased. Today, the onDismiss handler is called with close reason .systemLogic under at least three circumstances: purchase completed, deep link presented, or some kind of failure.

For that last reason, we did not expect to be called. We only observed this for users where in a particular region, the paywall for some reason doesn't load, and the user attempts to load it many times (sometimes > 10), till eventually onDismiss gets called with .systemLogic. We know no purchase was made because, using StoreKit, we try to retrieve the last transaction, which returns nothing.

(I have opened a ticket with Superwall support to look into why the paywall is failing to load at all but that's a separate issue.)

Describe the solution you'd like A breakdown of why the paywall was dismissed so we can track what was done in our own systems accurately.

Describe alternatives you've considered Today, we can do it by looking at various signals and querying the user's latest transaction, but it would be nice if the onDismiss callback contained that information.

Additional context

yusuftor commented 2 months ago

Hi, would you mind sharing the user ID of the user who experienced this so I can take a look at their logs on Superwall? Thanks!

irwinb commented 2 months ago

Sure, here is one of the users who experienced this: 882bd500-80ee-4a89-9cd7-6a2ee21402f6