- Automatically detect in-app purchases
- Manage currency conversions automatically
- Provide detailed product data
- Monetize analysis by cohorts
- Provide trending and detailed revenue reports
For iOS Applications
iOS Applications have a few options for tracking revenue events. Below each revenue tracking option is covered in detail, but here's an easy way to figure out which is right for you:
Revenue Tracking Options:
Apple App Store In-App-Purchase Tracking
Simply integrating Apsalar's iOS SDK into your application enables automatic IAP tracking. For more details about automated In-App-Purchase Tracking, please see our support article.
E-Commerce and Other Transaction Sources
For revenue that is not handled by Apple's App Store, you can configure 2 types of revenue events, based on your needs:
Revenue Events with Product Details - __iap__
Revenue Events with Product Details - __iap__
To include product level details from your revenue event that will be accessible from your Revenue Analysis, you must use the reserved Apsalar event, __iap__. This protected event name must be passed with a specific set of attributes (Key/Value pairs) to ensure proper handling by Apsalar's servers. If any required attributes are missing or invalid, revenue will not be reported from this event.
To send this event, the following attributes should be used:
Here is an example __iap__ call:
Revenue Events Without Product Details
To send this event, the following attributes should be used:
Key | Required? | Description | Example Value |
---|---|---|---|
ps | Yes | Your Apsalar API Key | SampleCompanyName |
pk | Yes | SKU for the purchased product | XXX-01-000 |
pn | Yes | Name of the purchased product | Sample Product |
pc | No | Category of the purchased product | Sample Category |
pcc | Yes | 3-letter ISO4217 currency code for the transaction | USD |
pq | Yes | Quantity of purchased product for the transaction | 1 |
pp | Yes | Price of the purchased product in the currency specified in 'pcc'. Apsalar will automatically convert this to your Account's currency for reporting purposes, if needed. | 10.99 |
r | Yes | Total Revenue from the transaction in the currency specified in 'pcc'. This is required to allow accounting for taxes, shipping costs, etc.. Apsalar will automatically convert this to your Account's currency for reporting purposes, if needed. | 15.50 |
Here is an example __iap__ call:
[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:296.28], nil];
Reporting revenue without product details has significantly less requirements and restrictions, but will not provide Product level information in your Revenue Analysis. Please note, revenue reported in this manner must be in your account's specified currency.
To configure these events:
To configure these events:
- Configure an event with at least one attribute which contains the revenue value for the transaction. For example, this event named 'purchase':
[Apsalar eventWithArgs:@"purchase", @"total", [NSNumber numberWithDouble:123.45], nil];
- Trigger at least one instance of this event.
- Visit the Applications page on your Apsalar account and click on the applicable application name
- On the resulting list of events for the application, click the Action button next to your event and select Assign Revenue
- Select either a static value or attribute to use for the reported revenue for this event:
- Static Revenue Value: This single value will be reported as revenue value for every occurrence of this event
- Variable Revenue Value: Select an attribute from your event to support variable revenue values. The revenue reported will be the value passed on this attribute.
For Android Applications
Android Applications must manually configure all revenue events, as automated revenue tracking offered for iOS is not currently possible for the Android platform. There are two revenue tracking options for Android, each is explained in detail below. Here's an easy way to figure out which is right for you:
Revenue Tracking Options:
Revenue Events with Product Details - __iap__
To include product level details from your revenue event that will be accessible from your Revenue Analysis, you must use the reserved Apsalar event, __iap__. This protected event name must be passed with a specific set of attributes (Key/Value pairs) to ensure proper handling by Apsalar's servers. If any required attributes are missing or invalid, revenue will not be reported from this event.
To send this event, the following attributes should be used:
Here is an example __iap__ call:
Revenue Events Without Product Details
To send this event, the following attributes should be used:
Key | Required? | Description | Example Value |
---|---|---|---|
ps | Yes | Your Apsalar API Key | SampleCompanyName |
pk | Yes | SKU for the purchased product | XXX-01-000 |
pn | Yes | Name of the purchased product | Sample Product |
pc | No | Category of the purchased product | Sample Category |
pcc | Yes | 3-letter ISO4217 currency code for the transaction | USD |
pq | Yes | Quantity of purchased product for the transaction | 1 |
pp | Yes | Price of the purchased product in the currency specified in 'pcc'. Apsalar will automatically convert this to your Account's currency for reporting purposes, if needed. | 10.99 |
r | Yes | Total Revenue from the transaction in the currency specified in 'pcc'. This is required to allow accounting for taxes, shipping costs, etc.. Apsalar will automatically convert this to your Account's currency for reporting purposes, if needed. | 15.50 |
Here is an example __iap__ call:
Apsalar.event("__iap__",
"ps", "MyAccountName",
"pk", "MyProductSKU",
"pn", "MyProductName",
"pc", "MyProductCategory",
"pcc", "EUR",
"pq", 2,
"pp", 123.45,
"r", 296.28);
Reporting revenue without product details has significantly less requirements and restrictions, but will not provide Product level information in your Revenue Analysis. Please note, revenue reported in this manner must be in your account's specified currency.
To configure these events:
To configure these events:
- Configure an event with at least one attribute which contains the revenue value for the transaction. For example, this event named 'purchase':
Apsalar.event("purchase", "total", 123.45);
- Trigger at least one instance of this event.
- Visit the Applications page on your Apsalar account and click on the applicable application name
- On the resulting list of events for the application, click the Action button next to your event and select Assign Revenue
- Select either a static value or attribute to use for the reported revenue for this event:
- Static Revenue Value: This single value will be reported as revenue value for every occurrence of this event
- Variable Revenue Value: Select an attribute from your event to support variable revenue values. The revenue reported will be the value passed on this attribute.