Search Unity

  1. We would like to hear your feedback about Unity and our products. Click here for more information.
    Dismiss Notice

Capturing Subscription Renewals in Lifetime Value

Discussion in 'Unity IAP' started by fablelabs, Dec 27, 2018.

  1. fablelabs

    fablelabs

    Joined:
    Apr 10, 2013
    Posts:
    6
    I am trying to calculate the proper LTV ("Lifetime Value") of a player in our system and our app makes heavy use of free subscriptions that are auto-renewing into paid subscriptions. The problem is that our current implementation counts the initial purchase with a price of 0 and we never count renewals. What's the best way to leverage the new SubscriptionInfo methods to capture the renewals that happen when the player is not logged in (which is 90% of the time)?

    From what I gather, when the player makes a subscription we should:

    1. Track Expiration date using: getExpireDate()
    2. We verify isAutoRenewing() is true


    Then upon seeing a repeat session from the same user:

    3. Check isSubscribed() to see if this player is still subscribed
    4. Compare today's date to see if it is after the getExpireDate that we had previously stored
    5. Track the renewal price: product.metadata.localizedPriceString()


    If both conditions 3 and 4 are true above, then we assume a renewal happened before the user logged in and can throw an event to our analytics provider for the retroactive date and the price of the renewal.

    Then to setup the next renewal period we update the getExpireDate and isAutoRenewing flags again.

    Does this sound about right? If so, a couple questions:

    a. What happens if a player has auto-renewal on and forgets about the app for several subscription cycles before logging back in? Any easy way to validate and calculate several auto-renewals?

    b. What happens if a player accidentally auto-renews, goes to her subscriptions in Apple settings and cancels the auto-renew so the app will no longer auto-renew, then comes back to our app in several months. Under the methodology I listed above, this user will fail the isSubscribed() check and we will not capture the one-time accidental auto-renewal.

    c. Is it possible to capture renewals on the day they happen rather than the day the user logs-in? Without the messiness of parsing Apple receipts.

    Thanks in advance folks!
     
  2. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    4,454
    You should never need to use any date math for subscriptions. If the subscription is available when the app starts, give it to them. We only track renewal activity when the app is running (or the next time the app is launched). Any approach you take, make sure to thoroughly test, including app reinstall. Subscriptions expire very fast in test for easy testing.
     
  3. fablelabs

    fablelabs

    Joined:
    Apr 10, 2013
    Posts:
    6
    Jeff, my question isn't about whether or not to give them access to subscription features. My question is how do we track total user spending on subscriptions? Renewals will rarely happen while the player is in the app so we need a method of determining how much they paid between last session and their current session.
     
  4. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    4,454
    We don't track any activity done outside the running game. If a subscription renewed since the last time the user played, then they should receive a ProcessPurchase callback at next app launch. Knowing the subscription type and price, you should have sufficient information for current spend. This should be reported as IAP Revenue in the Dashboard reports. Perhaps also at that point, you could consider sending an Analytics Custom Event with this information, for subsequent analysis https://docs.unity3d.com/Manual/UnityAnalyticsCustomEvents.html