AppsFlyer Master API
Note that data generated by third-party data integration counts toward the cluster's data consumption
Summary
Interface overview
| Interface | Type | Granularity | Attribution | Cost | Revenue | Impressions | Clicks | Conversions |
|---|---|---|---|---|---|---|---|---|
| Master API | API | Aggregated metrics | ✅ | ✅ | ✅ | ✅ |
Master API supports custom analysis dimensions and aggregated metrics, and is more flexible than the Pull API aggregated metrics API.
Integration process
- Log in to the AppsFlyer dashboard and get the V2.0 API Token and App ID
- Log in to the AE backend, go to the Third-party Integration module, add an AppsFlyer Master API plan, and complete the related configuration
- Check whether the AE system receives the data successfully, and build reports
1. Get the API Token and App ID
1.1 Get the API Token
1.1 Get the API Token
Get the V2.0 API token for Master API
1.2 Get the App ID
You can find your app's App ID under My Apps in the AppsFlyer dashboard. On Android, it starts with com., such as com.demoapp.ta; on iOS, it starts with id, such as id12345678
2. Plan configuration
After getting the AppsFlyer API token and App ID, you can log in to the AE system and configure the new plan in the Third-party Integration module. The image below shows the configuration page of AppsFlyer Master API. Follow this section to create the plan:
2.1 Authorization information configuration
Click the Configure authorization information button under Authorization Information, and enter the API Token and App ID in the pop-up
2.2 Sync Schedule
In the Sync Schedule module, you can set the policy for the AE system to pull AppsFlyer Master API data on a schedule. You can choose to pull data for a period of time at a specific time every day, with a maximum of 31 days per pull. Because pulled data also counts toward the data volume, avoid pulling data for overly long periods on a schedule
2.3 Pull time zone
Data is pulled in the project time zone, and the plan configuration has no separate pull time zone setting. The description under Sync Schedule states the time zone used, for example, "The system will, at UTC+8, every..."
2.4 Receive Settings
You can control whether the data is written as events. If you turn this off, the data is not written to the event table, so do not turn off this setting.
2.5 Configuration
Finally, in the Configuration module, you can control the detailed settings of data pulling, including the data type, the dimensions to pull, and the event name after ingestion.
The content of the configuration is a JSON, which you can customize as follows:
| Module | Name | Description |
|---|---|---|
| sink_event | event_name | Event name after ingestion; customizable |
source | metrics | Metrics in the data; list type; customizable |
| group_by | Grouping dimensions in the data; list type; customizable |
- Grouping dimensions
The following lists the grouping dimensions. To change them, modify source.group_by and use the field names.
| Field meaning | Field name | Ingested name | Default |
|---|---|---|---|
| App ID | app_id | app_id | ✓ |
| Media Source | pid | media_source | ✓ |
| Agency | af_prt | partner | ✓ |
| Campaign | c | campaign | ✓ |
| Adset | af_adset | adset | ✓ |
| Ad | af_ad | ad | ✓ |
| Channel | af_channel | channel | ✓ |
| Publisher ID | af_siteid | publisher_id_af_siteid | ✓ |
| Keywords | af_keywords | keywords | |
| Is Primary Attribution | is_primary | is_primary_attribution | |
| Campaign ID | af_c_id | campaign_id | |
| Adset ID | af_adset_id | adset_id | |
| Ad ID | af_ad_id | ad_id | |
| Install Time | install_time | install_time | ✓ |
| Touch Type | attributed_touch_type | touch_type | ✓ |
| GEO | geo | geo | ✓ |
- Metric fields
Master API includes many types of metrics. The following lists some commonly used Master API fields. For the full list of fields, see the AppsFlyer official documentation:
Note that some metrics support different dimension fields. To make changes, we recommend that you contact ThinkingAI staff
To change them, modify source.metrics
| Ingested name | Description | Default |
|---|---|---|
| impressions | Impressions | ✓ |
| clicks | Clicks | ✓ |
| installs | Installs | ✓ |
| cr | Conversion rate | ✓ |
| sessions | Sessions | ✓ |
| loyal_users | Loyal user installs | ✓ |
| loyal_users_rate | Loyal user rate | ✓ |
| cost | Total cost | ✓ |
| revenue | Total revenue | ✓ |
| roi | ROI | ✓ |
| arpu_ltv | Average lifetime value | ✓ |
| average_ecpi | Average eCPI | ✓ |
| uninstalls | Uninstalls | ✓ |
| uninstalls_rate | Uninstall rate | ✓ |
retention_day_[x] | Retained users on day N (N = 0,1,2,3,4,5,6,7,15,30) | |
| retention_rate_day_[x] | Retention rate on day N (N = 0,1,2,3,4,5,6,7,15,30) | |
cohort_day_[x]_total_revenue_per_user | Cumulative revenue on day N (N = 1,2,3,4,5,6,7,15,30,40,50,60,70,80,90) | |
cohort_day_[x]_revenue_per_user | Same-day revenue on day N (N = 1,2,3,4,5,6,7,15,30,40,50,60,70,80,90) | |
| cohort_[x]_days_total_revenue_per_user | Same as cumulative revenue on day N (N = 1,2,3,4,5,6,7,15,30,40,50,60,70,80,90) |
2.6 Data ingestion rules
By default, we write the pulled data to the AE project as events:
- Because the Master API aggregated metrics API returns aggregated data, we use a fixed value as the user identifier. You can think of all the data as attached to one virtual user
- The install_time field in the data, that is, the user's install time, is used as the event's #event_time
- The event name is appsflyer_master_data
- All other fields are ingested
2.7 Standardized fields
The following event properties are standardized:
| Original field | Standardized field | Description |
|---|---|---|
| media_source | te_ads_object.media_source | Media source |
| campaign | te_ads_object.campaign_name | Campaign name |
| campaign_id | te_ads_object.campaign_id | Campaign ID |
| adset | te_ads_object.ad_group_name | Ad group name |
| adset_id | te_ads_object.ad_group_id | Ad group ID |
| ad | te_ads_object.ad_name | Ad name |
| ad_id | te_ads_object.ad_id | Ad ID |
| app_id | te_ads_object.app_id | App ID |
| geo | te_ads_object.country | Country or region code |
| impressions | te_ads_object.impressions | Impressions |
| clicks | te_ads_object.clicks | Clicks |
| installs | te_ads_object.installs | Conversions (installs) |
| cost | te_ads_object.cost | Campaign cost |
| revenue | te_ads_object.revenue | Monetization revenue |

