What’s new in Apphud: Renewals Performance Report, Real-time User Properties for Paywalls, and iOS SDK Update.Let’s see
Apphud
Why Apphud?PricingContact
Alex
Alex
November 07, 2019
14 min read

How to Properly Track Subscription Revenue in iOS Apps

Find out what difficulties you face with while calculating revenue of your subscriptions based iOS app. How to properly calculate revenue?

How to Properly Track Subscription Revenue in iOS Apps

Today, developers from all over the world generate billions of dollars in subscription revenue. In 2021, for example, iOS app revenue exceeded $85 billion. However, revenue tracking and collecting the app’s revenue data may be complicated for smaller developers.  If you have or are working on an iOS app with auto-renewable subscriptions, this article is for you. Here, we describe what difficulties you will face while calculating the revenue of your subscription-based app.

Why Do I Need to Track Subscription Revenue?

You will need to track revenue to be able to send this data to your mobile product analytics or marketing platforms, such as Amplitude, Mixpanel, AppsFlyer, Branch, or Adjust. They don’t all support subscription revenue tracking. So you will need your own server to track subscription events, such as trial conversions, renewals, cancellations, etc. Then, you will need to send data to your analytics using a server-to-server API. Unfortunately, not all analytics platforms have such a feature. For example, Firebase and Flurry don’t have an API for receiving server events, and they don’t support subscriptions. 

In this article, I will explain all the difficulties that you will meet if you decide to make your own solution. And I will try to convince you in favor of our ready-to-use solution, Apphud, to check your app revenue.

What About App Store Connect Analytics?

Well, I wouldn’t call it analytics at all. App Store Connect has just overview data: conversions, events, and retention charts. But it is not the best app revenue checker for several reasons:

  • You can not tie this data with your users and traffic sources
  • You can not create your own charts and cohorts
  • Data is refreshed only once per day
Subscription overview in App Store Connect TrendsSubscription overview in App Store Connect Trends

Why It’s a Bad Idea to Send Subscription Revenue From an iOS Device

The main problem is that you can’t send subscription events when the app is not running. You could probably send events when a user has launched the app, but this may happen in a week, in a month, or, perhaps, never. And your data won’t be up to date, and some events will be lost.

Subscription events

You may think that two events – trial conversion and renewal – are enough. But that’s not true. There are plenty of subscription events, and all of them occur frequently. It’s up to you how many events you identify. It could be 5 events or 20.

Here is a list of a possible set of events.

Renewal: regular renewal, trial activation, paid introductory offer renewal, trial promotional offer renewal, paid promotional offer renewal

Conversion: trial conversion, paid introductory offer conversion, trial promotional offer conversion, paid promotional offer conversion

Expiration: regular subscription expiration, trial expiration, paid introductory offer expiration, trial promotional offer expiration, paid promotional offer expiration

Refund: regular subscription refund, paid introductory offer refund, paid promotional offer refund

Other events: autorenew enabled, autorenew disabled, billing grace period started, subscription upgraded.

Custom events: paywall shown, paywall payment cancelled, etc.

Quite a lot of events, right? In Apphud, we have our own set of more than 30 events. You can set custom event names, so you can send all paid renewals under one event if needed.

Difficulties With Getting the Charge Amount

The main difficulty is that you can’t know how much Apple charged the user in each transaction. Maybe someday, Apple will add a “charge amount” field in the receipt, but until that day, we have to solve the problems listed below by ourselves.

1. Subscription price change

When a developer increases the price, they can choose whether to apply the new price to existing subscribers or not. If they choose to apply the new price, everything is simple. If the user agrees to the new price, then you set a higher price for new transactions; otherwise, their subscription will expire. If the developer decides to keep the current prices, it requires a bit more work. Unfortunately, StoreKit doesn’t allow us to get the original price of the subscription that the user purchased. So, you should save the original prices for all subscribers.

2. Change the subscription plan

Users can manage their subscriptions in the App Store app to choose a different duration and price.

When fetching new transactions, you should also check for product identifiers in the receipts and get the corresponding price. Subscription changes can be of three types: upgrade, downgrade, and cross-grade. We will write a separate article about this; for now, you can get more info about subscription levels here:

3. Refund the unused portion of subscription period

When a user upgrades to a higher level of subscription, they upgrade immediately and get a refund of the prorated amount of the previous subscription.

Example of the user in Apphud with subscription upgrade and refund of a prorated amountExample of the user in Apphud with subscription upgrade and refund of a prorated amount

4. Different prices for different territories

As you know, App Store Connect has 155 territories, and you can create different prices for them. So, you have to keep prices for each territory and use the corresponding price.

5. Different currencies

Not all product analytics support automatic currency conversion. You have to manually convert prices into a basic currency — for example, USD. In Apphud, we regularly refresh currency rates using Open Exchange Rates.

6. Apple commission

Apple’s commission is 30%. However, after a year of paid uninterrupted service, it decreases to 15%. If a subscription was interrupted for more than 60 days in total, then the paid service date resets.

7. Introductory isn’t always “introductory”

It means that an introductory offer can be applied not only at the beginning of the original subscription but also after reactivating a subscription if the introductory offer hasn’t yet been used.

8. Introductory offer prices

You have to keep all introductory types and prices for each country. An introductory offer can be of the following types: trial, pay up front, or pay as you go. You can read more about introductory offers here:

9. Subscription offers

Subscription offers, AKA promotional offers, can be applied as many times as the developer wants and can change each other. So, you have to keep prices for all subscription offers as well. You can read more about promotional offers here:

Example of user in Apphud who purchased subscription with introductory offer and then purchased promotional offerExample of user in Apphud who purchased subscription with introductory offer and then purchased promotional offer

10. Refunds

You have to track refunds as well and send the negative amount to your analytics.

11. Detect user ID when launching from another device

A user can launch your app from another device. And you don’t want them to appear as two paid users in your analytics; you want all renewals to be sent only from the first user. That’s not an easy job. In some cases, you will need to merge users in your server.

12. Keep receipts and schedule validations

That’s a fundamental task. You have to store receipt data, shared secrets, and validated receipts at their expiration dates.

Integrations in Apphud

Apphud offers integrations that let you send subscription events, such as trial conversions, renewals, and cancellations, to your mobile analytics from our server.

Product Analytics Integrations

To enable integration with Amplitude or Mixpanel, you just need to add the API key to the corresponding integration page in Apphud.

After you add the integration, you will begin to receive subscription events in real-time. You will know subscription key metrics, such as ARPU, MRR, trial conversion, churn rate, etc. And you can tie these metrics to your custom events in your app. Besides that, you will see the total amount spent, a transaction count, and other important properties for each user.

Example of user in Mixpanel after adding integration in ApphudExample of user in Mixpanel after adding integration in Apphud

Marketing platforms integrations

If you have ad campaigns or are planning to start advertising your app, you should add integration with AppsFlyer or Branch. You will be able to track campaign effectiveness and compare your traffic sources by real revenue, trial conversions, or other metrics.

Subscriptions revenue compared by traffic sources in BranchSubscriptions revenue compared by traffic sources in Branch

Messengers integrations

You can also receive real-time information about new trials or renewals in Slack or Telegram. The integration process will take you less than a minute.

Conclusion

Tracking and sending subscription revenue by yourself is not easy. Besides having your own server, you will need to calculate the correct charge amounts. It will take plenty of time and resources for implementation, which is better spent on improving your product. So, a good app revenue tracker may make your life much easier. Apphud will help you correctly track subscription revenue and send it to your analytics.

Besides integrations, we are working on other features, such as winning back lapsed subscribers. More features are coming, so join Apphud using this link.

Alex
Alex
CTO at Apphud
Software architect and engineer with 12+ years experience. More than 50 projects are in the background with 5 successful exits.