Last Updated: Sep 09, 2016 11:17AM PDT
IMPORTANT: This article is out of date. Please use one of the following articles for more accurate information: If you have any outstanding questions not covered by the above articles, please contact Apsalar's Product Support Team for more information.


At A Glance

The lifetime value of a mobile user correlates to how much revenue a user spends within your application and the amount of time they stay active after downloading the app.

This article summarizes how to set up and analyze revenue results. 
With the Apsalar SDK developers can leverage Automated Revenue Reporting. Your apps will have the ability to automatically detect in-app purchases, manage currency conversions, provide detailed product data, monetize analysis by cohorts, and provide trending and detailed revenue reports — all from your dashboard. 

Account Currency

Setting Account Currency

Before tracking revenue, you must first set your account’s currency. Your account’s currency is selected only once, after the first login. 

Warning: Currency selection is performed only once per account and cannot be modified.

Currency Location

Your account’s currency appears in Account Settings and Revenue Reports.

Account Settings
Account Settings stores information like your password and usage information. 

Revenue Reports

All revenue reports display the currency stored in Account Settings. If your application has Apsalar’s iOS SDK version 5.0+, international revenues for in-app purchases are automatically converted in Dashboard, Trending reports, Real-Time Cohorts, and Funnel reports.

Currency conversions are calculated from the day’s currency exchange rate. Other revenue events must already be converted to match your account currency before being sent to Apsalar. 

Back to Top

Calculating Lifetime Value

The Lifetime Value (LTV) of a mobile user correlates to how much revenue a user spends within your application and the amount of time they stay active after downloading the app. 
From a high level, pay attention to your monthly revenue reports. Apsalar divides monthly revenue by the number of active users for that month, displaying the result as the average revenue per user (ARPU).
Apsalar advises creating a cohort analysis to calculate the value of different groups of users. If you support more than one platform or version, you may also create cohort analyses to compare different applications.
If you have other variable costs per unit sale, deduct these costs from the average revenue per user to get the average marginal profit per user. Multiplying the average marginal profit per user by the average amount of time that a user stays active in your app -- determined by the amount of time from first app launch to the last session started -- will grant you a better understanding of the lifetime value of the average user. 

In-app purchases (iOS only)

In-app purchases allow developers to sell and deliver virtual items, subscriptions, or digital content for both free and paid apps. 
 If you only want to track revenue for in-app purchases from the Apple App Store, integrate the latest SDK and Apsalar will take care of the rest. 

  • Track revenue and product information for in-app purchases
  • Display revenue earned after Apple’s commission
  • Attribute in-app purchase revenue to users’ lifetime value (LTV)
  • Convert revenue from international app stores to a single account currency (see Account Currency)
  • Verify all in-app purchase receipts with Apple to ensure validity of the transaction 

How it works

  • The Apsalar SDK implements methods to pass in-app purchase name, price and currency information after a successful transaction. 
  • The transaction receipt is verified with Apple to ensure it is a valid transaction. If the transaction is invalid, it will be stored as an “Invalid IAP” event for your application, with the error code store as an attribute “Validation Status”. This will allow you to track invalid transactions for users initiating these transactions (error information below)
  • If the transaction is valid, daily currency exchange rate feed converts the price of the in-app purchase to your account currency. 
  • A 70% multiplier is applied to the converted price to account for Apple App Store commission
  • On iOS, developer proceeds are sometimes lower than 70% since Apple accounts for different tax rates by country. Apsalar automatically adjusts for the different revenue shares Apple has for every country.
  • The resulting revenue value is stored, attributed to the user, and displayed in your reports 


Receipt Validation

In-app purchases on the Apple App Store are prone to piracy. Apsalar has utilized Apple's API for validating in-app purchase receipts to in order to identify pirated in-app purchases. To report accurate revenues for iOS applications, Apsalar now validates all transactions with Apple before attributing the revenue to an account. Depending on the transaction you may see one of the following Status codes: 
Status code  Description 
 0  Receipt is valid
 21000  The App Store could not read the JSON object you provided.
 21002  The data in the receipt-data property was malformed. 
 21003  The receipt could not be authenticated. 
 21005   The receipt server is not currently available.
 Any other value   Receipt is not valid   

Back to Top

Other Transaction Sources

Revenue generated from sources besides iOS In-App Purchases includes, but is not limited to:

In-App Billing for Android. Android utilizes In-App Billing to sell digital goods, including one-time items and subscriptions. In-App Billing for Android is supported for any app published on Google Play. You only need a Google Play publisher account and a Google Checkout Merchant account.

In-App Purchases through the Amazon App Store for Android API. Amazon allows you to purchase items within a free or paid app. These items can be used to unlock additional functionality, purchase subscriptions, and more.

Transactions that do not use Store Kit. The iOS platform utilizes Store Kit to communicate with the App Store on behalf of your iOS application, however you can still track revenue in other ways besides Store Kit. Details below.


Revenue Events

You should record transactions with revenue events in your application's code. Revenue events should be implemented to account for price differences and can be categorized into two main transaction types: Static and Dynamic.

Warning: To avoid double-counting revenue, do not use these methods for tracking in-app purchases in iOS applications.

E-commerce Revenue
A reserved Apsalar event, __iap__, allows e-commerce platforms to track product-level revenue with Apsalar and utilize the automated currency conversion process.

To start passing revenue using this event, please refer to the respective iOS and Android integration documents for tracking events with arguments. The __iap__ event requires a number of arguments, outlined below:

Event name: __iap__

  • ps: Required - Your account name
  • pk: Required - The SKU for the product that was purchased
  • pn: Required - The name of the product that was purchased
  • pc: Optional - The category of the product
  • pcc: Required - The 3-letter ISO4217 currency code for the purchase transaction (
  • pq: Required - The quantity of the product purchased in the transaction
  • pp: Required - The price of the product in the currency of the purchase transaction (we will later convert this to your account currency)
  • r: Required - The revenue from the transaction in the currency of the purchase transaction (we will later convert this to your account currency). This is different than product price if you are accounting for shipping cost, taxes, etc.

An example of a fully formed call in iOS is:

[Apsalar eventWithArgs:@"__iap__",
   @"ps", @"MyAccountName",
   @"pk", @"MyProductSKU",
   @"pn", @"MyProductName",
   @"pc", @"MyProductCategory",
   @"pcc", @"EUR",
   @"pq", [NSNumber numberWithInt:2],
   @"pp", [NSNumber numberWithDouble:123.45],
   @"r", [NSNumber numberWithDouble:100], nil];

Using this method will allow you to convert all of your transactions into a single currency for easier analysis, and will also allow you to use our real-time Revenue Analysis report to view revenue for different product SKUs.

Static Revenue Events
If your transactions have a constant value or if there are few variations in price for the same event, use static revenue events. Static revenue events let developers attach a single numeric amount to an event directly within the Apsalar web interface. The value entered gets applied to revenue metrics every time the event is triggered by a user. Changes to pricing can be made any time and do not require an app update.

Example 1: Revenue for the average CPM of an ad impression. While advertising inventory yields vary, an average CPC can usually be set and counted every time an ad is clicked in your app. For instance:

  • Event: advertisement_clicked
  • Revenue value: $0.05

Example 2: In-app upgrade. Many apps have upgrade options for additional functionality, levels, or features.  Applying a constant value would allow accurate revenue tracking. For instance:

  • Event: upgrade_option_selected
  • Revenue value: $0.25

Setting Up Static Events

  1. Log In to Apsalar.
  2. Go to Events.
  3. Find the Event to assign revenue value to – e.g., “advertisement_clicked”.
  4. Select “Assign Revenue”.
  5. Enter a constant numeric value - e.g., “$0.05” or "$0.25"
  6. Save.

To change the value, select “Change Revenue”. Apsalar will begin tracking the entered value each time the event is triggered. Your Dashboard will reflect the amount in the total revenue report and ARPU. 

Dynamic Revenue Events
If your transactions have varying revenue value or there are many variations in price for the same event, use dynamic revenue events.

Example: different prices game items. 

In a game, users may make an in-app purchase (IAP) of a digital weapon or a digital currency pack that will allow them to purchase the weapon. By using attributes with the IAP event, the variable revenue values of the different weapons or currency packs can be counted toward the total revenue and the Average Revenue Per User (ARPU) for the app. Apsalar can calculate the variable pricing of different in-app purchases to measure the revenue generated by a unique events. 

Consider the event IAP_complete_weapon has the following attributes:

Type = Sword
Price = $0.99


Type = Super Sword
Price = $1.99

  1. After implementing this event in your application code, go to Events within your Apsalar account. 
  2. Find the “revenue” event you want to assign a value to – e.g., “IAP_complete_weapon”.
  3. Select “Assign Revenue”
  4. Select a revenue attribute – e.g., “Price”. Pass at least one event attribute for a revenue event. Attributes must match your account currency and be numeric (non-numeric values will be set to zero).


To change value select “Change Revenue”. From this point forward, Apsalar will use the values passed in the selected event attribute to record the revenue for each occurrence of the event.

Apsalar will then begin tracking the entered value each time the event is triggered and populate your dashboard and reports with revenue and ARPU results. In this type of revenue tracking, the attribute value (“Price”) is passed when the event IAP_complete_weapon is triggered.


  • Any values greater than 20,000 or less than -20,000 will be recorded as 20,000 or -20,000 respectively.
  • If you modify an event's revenue selection, no retroactive update of data will be performed and the new revenue data will only be effective from the date it was modified.
  • You may change an event’s revenue selection, however, all data that has been recorded for previous revenue events will not be modified. All of this data will be used when aggregating the revenue data over a time period. Apsalar allows you to view specific periods of data by selecting an appropriate time period so you may filter based on when you changed the revenue selection.

Back to Top

Optional iOS Integration

Before you start exploring optional iOS integration options, be sure to read Account CurrencyIf you only want to track revenue for in-app purchases from the Apple App Store, integrate the latest SDK and Apsalar will take care of the rest. 


To Turn Off Automated Revenue Tracking

[Apsalar setAllowAutoIAPComplete:(BOOL)boolean];

If you have turned off automated revenue tracking, but want access to currency conversions and in-app purchase reports, use the following methods after a transaction has been completed in your application:

[Apsalar iapComplete:(id)transaction];

[Apsalar iapComplete:(id)transaction withAttributes:(id)value, (id)key, ...];

In this code, transaction is the SKPaymentTransaction object for the completed in-app purchase, and key/value pairs are event attributes. 

Back to Top

Revenue Reports

ApScience provides you with the capability to better understand the revenue generated from your application users by letting you select event attributes that represent revenue OR set a constant non-negative numeric value for a revenue event. These values are tracked for unique users when they hit any event that has a revenue value associated with it. The values are then used to provide information in multiple reports and analyses so that you can better understand the Revenue and Average Revenue per User (ARPU) associated with users, events, applications, cohorts, and other key data points.

Revenue is used in your:

  • Dashboard — There is a dashboard snapshot that displays Revenue and Engagement data.  The Revenue and ARPU for a selected application or all applications will be shown in this snapshot.
  • Event Analysis — The full event reports will show a column for the event’s Revenue. The event detail report will allow you to select the Revenue or the ARPU as a metric for an event.
  • Trending Analysis — Metrics for Revenue and ARPU have been added to the trending reports.  Select them as you would any other metric.
  • Cohort Analysis — The cohort-based engagement analyses now provide views by Revenue and ARPU.  In addition, you can view data for the roll-up of all your revenue events, treated for reporting purposes as a single event.
  • Funnel Analysis — Funnel reports now show the Revenue for events at each step of the funnel and the Funnel Revenue for all of the steps for all of the unique users in the funnel.

Back to Top
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
Invalid characters found