Usage
The /reports/usage resource gives you usage reports for your apps, in JSON or CSV.
The main resource returns one combined result for the filters you select. You can limit it by date, product, country and network.
Use group_by to break the report down by product, country, date, network or any combination.
Available Metrics
Section titled “Available Metrics”Unlike other routes, this one returns different metrics for each network:
| Apple | Flurry | Google Analytics | |
|---|---|---|---|
| active_users | ● | ||
| avg_optin_rate | ● | ||
| crashes | ● | ● | ● |
| daily_active_devices | ● | ● | |
| daily_new_devices | ● | ||
| median_session_length | ● | ||
| monthly_active_devices | ● | ||
| paying_users | ● | ||
| app_store_views | ● | ||
| unique_app_store_views | ● | ||
| impressions | ● | ||
| unique_impressions | ● | ||
| screen_views | ● | ||
| screen_views_per_user | ● | ||
| sessions | ● | ● | ● |
| session_duration | ● | ● | |
| sessions_per_device | ● | ● | |
| sessions_per_user | ● | ||
| unique_screen_views | ● |
Getting Totals
Section titled “Getting Totals”Request
Section titled “Request”GET /reports/usage/?group_by=network&start_date={start_date}&end_date={end_date}&products={product_ids}&countries={countries}&format={format}&networks={networks}Arguments
Section titled “Arguments”| Argument | Type | Description |
|---|---|---|
| start_date | Date | Date (yyyy-mm-dd), inclusive, to start reporting from. Default: the beginning of time. |
| end_date | Date | Date (yyyy-mm-dd), inclusive, to stop reporting. Default: today. |
| group_by | List | One or more pivots separated by a comma (,). Available pivots: network, product, country, and date. |
| products | List | One or more products to include in the response, separated by a comma (,). Default: all active products in the account. |
| countries | List | One or more countries to limit the report to, separated by a comma (,). See /data/countries for all available countries. Default: all countries. |
| format | String | Output format: JSON or CSV. Defaults to JSON. |
Response
Section titled “Response”The response depends on whether you request one network or several. See the metrics table above and the examples below.
Example
Section titled “Example”// GET /reports/usage?group_by=network
{ "apple:analytics": { "sessions": 3589097152, "avg_optin_rate": "0.43", ... "storefront": "apple:analytics", "store": "apple" }, "flurry_analytics": { "sessions": 1540311105, ... "storefront": "flurry_analytics", "store": "flurry_analytics" }, "google_analytics": { "sessions": 1251311105, ... "storefront": "google_analytics", "store": "google_analytics" }}Generating a Report By Product, Country, or Date
Section titled “Generating a Report By Product, Country, or Date”Request
Section titled “Request”GET /reports/usage/?group_by={group_by}&start_date={start_date}&end_date={end_date}&products={product_ids}&countries={countries}&format={format}Arguments
Section titled “Arguments”| Argument | Type | Description |
|---|---|---|
| start_date | Date | Date (yyyy-mm-dd), inclusive, to start reporting from. Default: the beginning of time. |
| end_date | Date | Date (yyyy-mm-dd), inclusive, to stop reporting. Default: today. |
| group_by | List | One or more pivots separated by a comma (,). Available pivots: network, product, country, and date. |
| products | List | One or more products to include in the response, separated by a comma (,). Default: all active products in the account. |
| countries | List | One or more countries to limit the report to, separated by a comma (,). See /data/countries for all available countries. Default: all countries. |
| format | String | Output format: JSON or CSV. Defaults to JSON. |
Response
Section titled “Response”The shape of the response depends on group_by. Whatever the grouping, each innermost object holds the metrics in the table above.
Example for Usage by Country From Google Analytics
Section titled “Example for Usage by Country From Google Analytics”// GET /reports/usage/?group_by=countries&networks=google_analytics
{ "AU": { "crashes": 5, "sessions": 1121, "session_duration": "53911.00", "active_users": 192, "screen_views": 2443, "unique_screen_views": 1311, "sessions_per_user": "1.32", "screen_views_per_user": "4.82", "iso": "AU", "country": "Australia" }, "US": { "crashes": 110, "sessions": 1345394, "session_duration": "1272666.00", "active_users": 96912, "screen_views": 5122347, "unique_screen_views": 361239, "sessions_per_user": "1.44", "screen_views_per_user": "5.29", "storefront": "google_analytics", "store": "google_analytics", "iso": "US", "country": "United States" }, ...}Example for Usage by Network, Date, and Product
Section titled “Example for Usage by Network, Date, and Product”// GET /reports/usage/?group_by=networks,dates,products
{ "apple:analytics": { "2017-10-01": { "100000000000001": { "sessions": 109275, "avg_optin_rate": "0.32", ... "storefront": "apple:analytics", "store": "apple", "date": "2017-10-02", "product_id": 100000000000001 }, "100000000000002": { ... } }, "2017-10-02": { ... } }, "google_analytics": { "2017-10-01": { ... } }, ...}