Exporting analytics with API
Exporting your analytics data to CSV gives you the flexibility to dive deeper into your app’s performance metrics, customize reports, and analyze trends over time. With the Adapty API, you can easily pull detailed analytics into a CSV format, making it convenient to track, share, and refine your data insights as needed.
Getting started with the API for analytics export
With the analytics export API, you can, for example:
-
Analyze MRR from Marketing Campaigns: Measure the impact of last year's marketing campaigns in the USA to see which ones brought in the highest revenue, with weekly tracking. Use the Retrieve analytics data method for this.
-
Track Cohort Retention Over Time: Follow retention by cohort to spot drop-off points and compare cohorts over time, revealing trends and key moments where engagement strategies could boost retention. Limited to App Store, a specific product, and the USA. Use the Retrieve cohort data method for this.
-
Evaluate Conversion Rates Across Channels: Analyze conversion rates for key acquisition channels to see which are most effective in driving first-time purchases. This helps prioritize marketing spend on high-performing channels. Use the Retrieve conversion data method for this.
-
Review Churn Rate: Monitor how quickly users are unsubscribing to uncover churn patterns or gauge the success of retention efforts, focusing on France and a specific product. Use the Retrieve funnel data method for this.
-
Assess LTV by User Segment: Identify the lifetime value of different user segments to understand which groups bring in the highest revenue over time. Focus on high-value segments like long-term subscribers, and use the results to refine acquisition strategies. Use the Retrieve LTV data method for this.
-
Check Retention by Country: Look at retention rates by region to find high-engagement markets and guide localization or regional strategies. Use the Retrieve retention data method for this.
Authorization
-
Base URL: https://api-admin.adapty.io
-
Authorization header: API requests must be authenticated by including your secret API key as an Authorization header.
- In the Authorization -> Auth type field, choose API Key.
- In the Value field, enter the API Key in format
Api-Key {secret_token}
to each request, for example,Api-Key secret_live_BEHrYLTr.ce5zuDEWz06lFRNiaJC8mrLtL8fUwswD
. You can find your secret API key in Adapty Dashboard -> App Settings -> General tab API -> API keys section. This key is secret, so be careful not to share it publicly.
-
Content-Type header: The API expects the request to use the Content-Type header set to
application/json
. -
Adapty-Tz header: (optional) Set the timezone to define how the data is grouped and displayed. Use the IANA Time Zone Database format (e.g.,
Europe/Berlin
). -
Body: The API expects the request to use the body as JSON.
Retrieve analytics data
Retrieves analytics data for insights on user behavior and performance metrics to further use in charts.
Endpoint
https://api-admin.adapty.io/api/v1/client-api/metrics/analytics/
Method
POST
Parameters
Name | Type | Required | Description |
---|---|---|---|
chart_id | String | ➕ | define which char you need. Possible values are:
|
filters | MetricsFilters object | ➕ | An object containing filtration parameters. See details below this table. |
period_unit | String | ➖ | Specify the time interval for aggregating analytics data, to view results grouped by selected periods, such as days, weeks, months, etc. Possible values are:
|
segmentation | String | ➖ | Sets the basis for segmentation. See which segmentation is available for different chats in teh Segmentatiuon table below this table |
format | String | ➖ | Specify the export file format. Available options are:
|
Segmentation
Different charts can use different types of segmentation:
For ARPU (click to expand)
- country
- store
- attribution_status
- attribution_channel
- attribution_campaign
- attribution_adgroup
- attribution_adset
- attribution_creative
- attribution_source
- period
For revenue, MRR, ARR, active subscriptions, and active trials (click to expand)
- country
- store
- attribution_status
- attribution_channel
- attribution_campaign
- attribution_adgroup
- attribution_adset
- attribution_creative
- attribution_source
- store_product_id
- paywall_id
- audience_id
- placement_id
- duration
- renewal_status
- period
- offer_category
- offer_type
- offer_id
For ARRPU (click to expand)
- country
- store
- attribution_status
- attribution_channel
- attribution_campaign
- attribution_adgroup
- attribution_adset
- attribution_creative
- attribution_source
- store_product_id
- paywall_id
- audience_id
- placement_id
- duration
- renewal_status
- period
For new subscriptopns, new trials, and refund events (click to expand)
- country
- store
- attribution_status
- attribution_channel
- attribution_campaign
- attribution_adgroup
- attribution_adset
- attribution_creative
- attribution_source
- store_product_id
- paywall_id
- audience_id
- placement_id
- duration
- offer_category
- offer_type
- offer_id
For expired subscriptions and expired trials (click to expand)
- country
- store
- attribution_status
- attribution_channel
- attribution_campaign
- attribution_adgroup
- attribution_adset
- attribution_creative
- attribution_source
- store_product_id
- paywall_id
- audience_id
- placement_id
- duration
- cancellation_reason
For cancelled subscriptipn renewals, cancelled trials, grace periods, billing issues, money refunds, and non-subscription purchases (click to expand)
- country
- store
- attribution_status
- attribution_channel
- attribution_campaign
- attribution_adgroup
- attribution_adset
- attribution_creative
- attribution_source
- store_product_id
- paywall_id
- audience_id
- placement_id
- duration
For installs (click to expand)
- country
- store
- attribution_status
- attribution_channel
- attribution_campaign
- attribution_adgroup
- attribution_adset
- attribution_creative
- attribution_source
MetricsFilters object
Filtration criteria differe for different chats. Please see below the variants:
For ARPU and installs (click to expand)
Name | Type | Required | Description |
---|---|---|---|
date | array of String values(data) | ➕ | Enter the date or time period for which you want to retrieve chart data. |
store | array of String values | ➖ | Filter by the app store where the purchase was made. Possible values include app_store, play_store, stripe, and any custom store ID. If using a custom store, enter its ID as set in the Adapty Dashboard. |
country | array of String values | ➖ | Filter by the 2-letter country code where the purchase took place, using ISO 3166-1 standard codes. |
attribution_source | array of String values | ➖ | The source integration for attribution. Possible options:
|
attribution_status | array of String values | ➖ | Indicates if the attribution is organic or non-organic. Possible values are:
|
attribution_channel | array of String values | ➖ | Marketing channel that led to the transaction. |
attribution_campaign | array of String values | ➖ | Marketing campaign that brought the transaction. |
attribution_adgroup | array of String values | ➖ | Attribution ad group that brought the transaction. |
attribution_adset | array of String values | ➖ | Attribution ad set that led to the transaction. |
attribution_creative | array of String values | ➖ | Specific visual or text elements in an ad or campaign tracked to measure effectiveness (e.g., clicks, conversions). |
For cancelled trials, expired trials, grace period, billing issues, cancelled subscription renewals, expired subscriptions (click to expand)
Name | Type | Required | Description |
---|---|---|---|
date | array of String values(data) | ➕ | Enter the date or period for which you want to retrieve chart data. |
store | array of String values | ➖ | Filter by the app store where the purchase was made. Possible values include app_store, play_store, stripe, and any custom store ID. If using a custom store, enter its ID as set in the Adapty Dashboard. |
country | array of String values | ➖ | Filter by the 2-letter country code where the purchase took place, using ISO 3166-1 standard codes. |
store_product_id | array of String values | ➖ | Unique identifier of a product from the app store. You can see this ID in the Products section of the Adapty Dashboard. |
duration | array of String | ➖ | Specify the subscription duration. Possible values are:
|
attribution_source | array of String values | ➖ | The source integration for attribution. Possible options:
|
attribution_status | array of String values | ➖ | Indicates if the attribution is organic or non-organic. Possible values are:
|
attribution_channel | array of String values | ➖ | Marketing channel that led to the transaction. |
attribution_campaign | array of String values | ➖ | Marketing campaign that brought the transaction. |
attribution_adgroup | array of String values | ➖ | Attribution ad group that brought the transaction. |
attribution_adset | array of String values | ➖ | Attribution ad set that led to the transaction. |
attribution_creative | array of String values | ➖ | Specific visual or text elements in an ad or campaign tracked to measure effectiveness (e.g., clicks, conversions). |
For all other charts (click to expand)
Name | Type | Required | Description |
---|---|---|---|
date | array of String values(data) | ➕ | Enter the date or period for which you want to retrieve chart data. |
compare_date | array of String values(data) | ➖ | If comparing two dates or periods, enter the earlier one here and the later one in the date parameter. |
store | array of String values | ➖ | Filter by the app store where the purchase was made. Possible values include app_store, play_store, stripe, and any custom store ID. If using a custom store, enter its ID as set in the Adapty Dashboard. |
country | array of String values | ➖ | Filter by the 2-letter country code where the purchase took place, using ISO 3166-1 standard codes. |
store_product_id | array of String values | ➖ | Unique identifier of a product from the app store. You can see this ID in the Products section of the Adapty Dashboard. |
duration | array of String | ➖ | Specify the subscription duration. Possible values are:
|
attribution_source | array of String values | ➖ | The source integration for attribution. Possible options:
|
attribution_status | array of String values | ➖ | Indicates if the attribution is organic or non-organic. Possible values are:
|
attribution_channel | array of String values | ➖ | Marketing channel that led to the transaction. |
attribution_campaign | array of String values | ➖ | Marketing campaign that brought the transaction. |
attribution_adgroup | array of String values | ➖ | Attribution ad group that brought the transaction. |
attribution_adset | array of String values | ➖ | Attribution ad set that led to the transaction. |
attribution_creative | array of String values | ➖ | Specific visual or text elements in an ad or campaign tracked to measure effectiveness (e.g., clicks, conversions). |
offer_category | array of String values | ➖ | Specify the offer categories you want to retrieve data for. Possible values are:
|
offer_type | array of String values |