In-app purchases

A mobile app can earn revenue from ad impressions (Ad Revenue) and in-app purchases (In-App Revenue). With AppMetrica, you can collect information about in-app purchases and track their statistics.

After you set up sending In-App Revenue data, you'll be able to:

  • Evaluate your app's overall profitability — from in-app purchases to ad monetization.
  • Identify the most popular products that bring you the most revenue.
  • Build funnels to assess conversion to purchases and to analyze the steps of placing an order.
  • Measure the user acquisition metric to identify partners who bring you paying users, and evaluate the effectiveness of their traffic.
  • Identify the most profitable user segments and use cohort analysis to track your user revenue over time.
  • Evaluate the success of new app features using the ARPU metric.
  • Analyze the user reaction to price changes using the ARPPU metric.
  • Optimize pricing and user scenarios to increase in-app monetization.
  • Analyze the geography of purchases and identify the most promising markets.

In-App Revenue events aren't included in paid limits. Sending these events doesn't affect your plan cost.

How In-App Revenue is calculated

Data is transmitted from the SDK for each in-app purchase along with the transaction details.

All purchase events in AppMetrica are linked to users, and the In-App Revenue metrics are calculated based on this data:

Metric Description
In-App Revenue events The number of events with purchases (In-App Revenue events).
In-App Revenue Total revenue from in-app purchases.
In-App ARPU The ratio of app revenue from in-app purchases to the number of app users. Learn more about converting currencies.
In-App ARPPU The ratio of app revenue from in-app purchases to the number of paying users. Learn more about converting currencies.
Paying Users The number of users with purchase events (In-App Revenue events).
In-App Revenue events per user The ratio of the number of In-App Revenue events to the number of users.
Average order The ratio of the total revenue from in-app purchases to the number of purchases.
Sessions with In-App Revenue events The number of sessions with purchases (In-App Revenue events).
In-App Revenue events per session The ratio of the number of In-App Revenue events to the total number of sessions.
% of paying users The ratio of the number of users with purchases (In-App Revenue events) to all users.
Purchase conversion The ratio of the number of users who made a purchase to the number of users who visited the purchase screen.

Based on the In-App Revenue data, the total revenue metrics are calculated:

Metric Description
Total Revenue Total revenue from ad monetization, in-app purchases, and in-app subscriptions. Learn more about converting currencies.
Total ARPU The ratio of the total app revenue from ad monetization, in-app purchases, and subscriptions to the number of app users. Learn more about converting currencies.

With purchase validation enabled, the following additional metrics are available:

Metric Description
Invalid revenue Total revenue from purchases that haven't passed validation.
Users with invalid revenue The number of users with purchases that haven't passed validation.
% of invalid revenue The ratio of invalid revenue to the total revenue from purchases.

Set up sending In-App events via AppMetrica

AppMetrica supports automatic and manual tracking of In-App Revenue events:

  • If automatic tracking is enabled, AppMetrica collects purchase data via StoreKit (iOS) and Google Play Billing (Android).

    AppMetrica supports two ways to set up automatic sending of In-App Revenue events: via the SDK (the main method for iOS and Android starting with SDK version 4.0) and using the Post API.

    Auto tracking via the SDK is enabled using the following SDK methods: withRevenueAutoTrackingEnabled (Android) or revenueAutoTrackingEnabled (iOS).

    In the AppMetrica SDK, you can track new paid subscriptions in the App Store. They are processed as regular purchases. To track subscription renewals, configure revenue sending for each renewal.

  • Manual tracking lets you fully control purchase data sending and enable purchase validation to prevent fraud. When sending data manually, you can group purchases by OrderID. Learn more.

If your app has manual collection of purchases set up and automatic collection enabled, then you can choose which data on purchases to show in reports in the AppMetrica settings in the Revenue section: collected manually, automatically collected, or both.

Changing these settings doesn't affect data collection itself. If you change these settings, the data in the reports for previous periods will also change.

Set up sending events automatically via the SDK

Step 1. Activate the SDK

Make sure that the AppMetrica SDK is activated in your app:

Step 2. Set up sending In-App Revenue data via the SDK

Select a platform and set up the appropriate SDK methods.

Debugging

In AppMetrica, it's not possible to segment events into test and non-test ones. If you use the main API key for debugging the collection of data on in-app purchases, the test events are included in general statistics. For this reason, to debug, use a reporter to send data to an additional API key.

Learn more about reporters

Set up sending events via the Post API

The Post API works well for collecting In-App Revenue data in the following cases:

  • Off-store purchases — if purchases are made outside Google Play or the App Store.
  • Custom subscription system — if you track subscriptions yourself.
  • Third-party payment systems — in case you use integration with other payment providers.
  • Server validation — additional verification of purchases on your server.
  • Import of historical data — uploading events for a period when the SDK wasn't yet installed (over the past 14 days maximum).
  • Data aggregation — grouping data from multiple sources.

Take into account the specific features and limitations of the Post API.

Step 1. Get a Post API key

Go to SettingsMain and get the Post API key for request authorization.

Debugging

To make sure that test events aren't included in general statistics while debugging data collection, use different Post API keys for the testing and production environments.

Step 2. Prepare the data to send

Review the documentation on uploading In-App Revenue events via the Post API: Uploading In-App Revenue events.

Collect the necessary parameters for an In-App Revenue event.

Step 3. Send an HTTP request

The Post API supports two data transfer methods:

  • Sending data in the request body (CSV format). Works well for bulk data uploading.

    Use the following endpoint: /logs/v1/import/revenue.csv.

    Pass the data in the request body in CSV format.

  • Sending data in request parameters. Works well for standalone events.

    Use the following endpoint: /logs/v1/import/revenue.

    Pass the data as URL parameters.

Step 4. Handle the response

The API returns the following response codes:

  • 200: Data uploaded successfully.
  • 403: Authorization error.
  • 400: Missing required parameters.

Set up sending In-App Revenue events manually

To send In-App Revenue events manually, create an object named Revenue in the app code and use the AppMetrica.reportRevenue(revenue) method (or a reporter for testing).

In this case, the purchase data will be sent directly from the app to the AppMetrica servers.

Check data in reports

After you set up sending In-App Revenue events via the SDK, using the Post API, or manually, make sure that the event data flows into the system and the number of events matches the number of ad views.

The In-App Revenue metrics are available in the following reports:

In-app and Ad Revenue
Use the In-app and Ad Revenue report to estimate the app's total revenue, revenue from different types of monetization (ad and in-app monetization), and revenue from different ad networks and different types of ads.
User Acquisition and Remarketing
Use these reports to evaluate the effectiveness of sources for user acquisition and remarketing in terms of ARPU and other advertising and in-app monetization metrics. Please note that the metrics in the report are summed up over the user's entire lifetime.
Cohort analysis
Using the cohort analysis report, you can estimate how much revenue you receive from users over time and what your ARPU is on a certain day.
Funnels
With the Funnels report, you can estimate the percentage of users who end up making a purchase.
Segmentation
When building each report, you can choose, for example, only users from a specific region or users who made purchases for certain amounts.

Currency conversion

In-app purchases can be made in different currencies. For a list of all supported currencies, see Supported currencies.

AppMetrica converts the purchase price to all report currencies: USD, EUR, RUB. AppMetrica uses an exchange rate that is provided from more than 15 sources, including the European Central Bank.

AppMetrica converts the currency using the previous day rate. For example, if the purchase was made on day N, the purchase price is converted at the exchange rate of day N − 1. Conversion takes place into EUR and RUB against USD.

The AppMetrica conversion rate may not coincide with the Google Play Console and iTunes Connect rates.

Validating purchases

The service supports [validation of purchases](*validation of purchases) made through the App Store or Google Play. Purchases on iOS are validated using the iTunes API and on Android through local validation using a public key.

You can set up sending additional information with your revenue data by adding the required keys in your AppMetrica settings. For more information, see Set up sending In-App events via AppMetrica.

With validation enabled:

  • The report shows purchases that were validated or sent without any information for validation.
  • All In-App Revenue metrics are counted based on validated purchases and purchases passed without parameters for validation.
  • For invalid purchases, Invalid revenue and Users with invalid revenue metrics are counted.

If you didn't find the answer you were looking for, you can use the feedback form to submit your question. Please describe the problem in as much detail as possible. Attach a screenshot if possible.

Contact support Suggest an improvement for documentation

Revenue from purchases made by the user in the app. For example, game improvements, goods in stores, subscriptions.

Average revenue per user. Calculated as the ratio of the total revenue from in-app purchases and subscriptions to the total number of app users for the selected period. Learn more about converting currencies.

The ratio of total revenue from in-app purchases to the number of paying users for the selected period. Learn more about converting currencies.