Skip to main content

AppsFlyer Pull Raw Data

Last updated 10/03/2026
tip

Note that data generated by third-party data integration counts toward the cluster's data consumption

Summary​

Interface overview​

InterfaceTypeGranularityAttributionCostRevenueImpressionsClicksConversions
Pull API Raw DataAPIUser level✅✅✅

Pull API Raw Data can pull user-level data for a period of time. This integration method lets you get detailed user data when real-time delivery isn't required, and it's also well suited to pulling historical user-level data.

Integration process​

  1. Integrate the AppsFlyer client SDK and the AE SDK, and set the AE user identification ID in the AF SDK
  2. Log in to the AppsFlyer dashboard and get the V2.0 API Token and App ID
  3. Log in to the AE backend, go to the Third-party Integration module, add an AppsFlyer Pull Raw Data plan, and complete the related configuration
  4. Check whether the AE system receives the data successfully, and build reports

1. Client SDK configuration​

The first step in integrating AppsFlyer data is to connect the AE SDK and the AF SDK on the client by setting the AE system's user identification ID in the AF SDK

1.1 Option 1 (automatic integration)​

  • If the AE SDK version you integrated is 2.8.0~2.8.1, you can use this option directly
  • If the AE SDK version you integrated is 2.8.2 or later, you also need to install the third-party data plugin. For details, see Android SDK third-party data and iOS SDK third-party data
// Initialize the AE SDK
TDConfig config = TDConfig.getInstance(this, APPID, TE_SERVER_URL);
TDAnalytics.init(config);

// Enable AppsFlyer ID association
TDAnalytics.enableThirdPartySharing(TDThirdPartyShareType.TD_APPS_FLYER);

// Initialize the AppsFlyer SDK
AppsFlyerLib.getInstance().init("appid", null, this);
AppsFlyerLib.getInstance().start(this);

// We strongly recommend that you use setcustomerUserId() to set the distinct ID again
String distinctId = TDAnalytics.GetDistinctId();
AppsFlyerLib.getInstance().setcustomerUserId(distinctId);

// After calling login to set the account ID, sync the data again (optional)
TDAnalytics.login("account_id");
TDAnalytics.enableThirdPartySharing(TDThirdPartyShareType.TD_APPS_FLYER);

If you call the login() or identify() method of the AE SDK, call enableThirdPartySharing() again to sync the data.

Note: If you also need to call the setAdditionalData() method of the AppsFlyer SDK, calling it multiple times overwrites the previous parameters. In this case, you can pass the parameters to the AE SDK, which concatenates and merges them internally.

Map<String, Object> additionalData = new HashMap<>();
additionalData.put("af_test_key1", "test1");
additionalData.put("af_test_key2", "test2");
TDAnalytics.enableThirdPartySharing(
TDThirdPartyShareType.TD_APPS_FLYER,
additionalData
);

This option works by automatically calling AppsFlyer's setAdditionalData() method internally and passing in the distinct ID and account ID of the AE project.

1.2 Option 2 (manual integration)​

For manual integration, you need to use setAdditionalData in the AppsFlyer SDK to configure the distinct ID and account ID of the AE project. The following is a Java code sample:

// Get the AE distinct ID, which corresponds to #distinct_id in AE
String distinctId = TDAnalytics.GetDistinctId();
// Your account ID (or character ID), which corresponds to #account_id in AE
String accountId = "your_account_id";

// Deploy at activation
HashMap<String,Object> CustomDataMap = new HashMap<>();
CustomDataMap.put("ta_distinct_id",distinctId);
AppsFlyerLib.getInstance().setAdditionalData(CustomDataMap);

// We strongly recommend that you use setcustomerUserId() to set the distinct ID again
AppsFlyerLib.getInstance().setcustomerUserId(distinctId);
...

// Deploy at registration
HashMap<String,Object> CustomDataMap = new HashMap<>();
CustomDataMap.put("ta_distinct_id", distinctId);
CustomDataMap.put("ta_account_id",accountId);
AppsFlyerLib.getInstance().setAdditionalData(CustomDataMap);

After these settings, custom_data in the returned data carries the two fields ta_distinct_id and ta_account_id, and customer_user_id equals the distinct ID.

2. Get the API token and App ID​

2.1 Get the API token​

Log in with an admin account, find API Access in the AppsFlyer sidebar menu, and get the V2.0 API token for Pull API Raw Data.

2.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

3. 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 Pull Raw Data. Follow this section to create the plan:

3.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

3.2 Sync Schedule​

In the Sync Schedule module, you can set the policy for the AE system to pull AppsFlyer Pull Raw Data 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

3.3 Pull time zone​

You can also set the time zone of the pulled data. The default is UTC+0

3.4 User identification fields​

Because AppsFlyer Pull Raw Data returns user-level data, you need to set user identification rules for it, that is, the fields in the data returned by AF that correspond to #distinct_id and #account_id. Based on this configuration, the AE system sets these fields as the user identification fields of the data when it converts the returned data.

If you configured the client SDK as described in the previous step of this document, use the following configuration:

  • Account ID association field: custom_data.ta_account_id
  • Distinct ID association field: customer_user_id,custom_data.ta_distinct_id

3.5 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.

3.6 User Properties Configuration​

By default, the AE system automatically writes the attribution fields in the data returned by AF to standardized user properties. The following are the fields written to user properties and their meanings:

AppsFlyer fieldStandardized fieldDescription
media_sourcete_ads_object.media_sourceMedia source
campaignte_ads_object.campaign_nameCampaign name
adsette_ads_object.ad_group_nameAd group name
adte_ads_object.ad_nameAd name
tip

The default user property ingestion rules in earlier versions differ from the current ones, so be careful to distinguish them. To merge the old and new properties, you can use the custom property feature

To make changes, click Configure Rules to go to the ingestion rule configuration page, as shown below:

Click the Property Mapping button to add fields to write to user properties. You can also click the Rule button on the left to add a new set of rules. For example, you may want to extract ad revenue from the monetization data returned by AF and write it to user properties with user_add to record each user's cumulative ad revenue.

To turn off user property ingestion, stop all rules:

3.7 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:

ModuleNameDescription
sink_eventevent_mappingEvent name after ingestion; customizable
sourcereport_typesThe type of data to pull; customizable. The default is installs, ad_revenue, that is, install and monetization events
group_byGrouping dimensions in the data; list type; customizable
extra_paramsdouble_columnsNumeric field definitions. Fields entered here are stored as numeric types. Enter the field names after ingestion

By default, Pull API Raw Data supports pulling the following data:

You can also see the AppsFlyer official documentation for more supported fields, and enter the fields you need in source.group_by

3.7.1 Default metrics​

FieldDisplay name
event_valueEvent value
event_revenueEvent revenue
event_revenue_usdEvent revenue (USD)
cost_valueCost value

3.7.2 Default dimension fields​

FieldDisplay name
attributed_touch_timeAttribution time
install_timeActivation time
event_timeEvent time
event_nameEvent name
event_valueEvent value
event_revenueEvent revenue
event_revenue_currencyEvent revenue currency
event_revenue_usdEvent revenue (USD)
event_sourceEvent source
is_receipt_validatedWhether the receipt has been validated
partnerPartner
media_sourceMedia source
channelSub-channel
keywordsKeywords
campaignCampaign name
campaign_idCampaign ID
adsetAd group name
adset_idAd group ID
adAd creative name
ad_idAd creative ID
ad_typeAd type
site_idSite ID
sub_site_idSub-site ID
sub_param_1Sub-parameter 1
sub_param_2Sub-parameter 2
sub_param_3Sub-parameter 3
sub_param_4Sub-parameter 4
sub_param_5Sub-parameter 5
cost_modelCost model (CPC/CPI/CPM/Other)
cost_valueCost value
cost_currencyCost currency
contributor_1_partnerContributor 1 partner
contributor_1_media_sourceContributor 1 media source
contributor_1_campaignContributor 1 campaign
contributor_1_touch_typeContributor 1 attribution type
contributor_1_touch_timeContributor 1 attribution time
contributor_2_partnerContributor 2 partner
contributor_2_media_sourceContributor 2 media source
contributor_2_campaignContributor 2 campaign
contributor_2_touch_typeContributor 2 attribution type
contributor_2_touch_timeContributor 2 attribution time
contributor_3_partnerContributor 3 partner
contributor_3_media_sourceContributor 3 media source
contributor_3_campaignContributor 3 campaign
contributor_3_touch_typeContributor 3 attribution type
contributor_3_touch_timeContributor 3 attribution time
regionRegion
country_codeCountry code
stateState/Province
cityCity
postal_codePostal code
dmaDMA code
ipIP address
wifiWhether Wi-Fi is on
operatorMobile operator
carrierMobile carrier
languageLanguage
appsflyer_idAppsFlyer ID
advertising_idAdvertising ID
idfaIDFA
android_idAndroid ID
customer_user_idCustomer User ID
imeiIMEI
idfvIDFV
platformPlatform
device_typeDevice Type
os_versionOS
app_versionApp version
sdk_versionSDK version
app_idApp ID
app_nameApp name
bundle_idBundle ID
is_retargetingIs retargeting
retargeting_conversion_typeRetargeting conversion type
attribution_lookbackAttribution lookback
reengagement_windowRe-engagement window
is_primary_attributionIs primary attribution
user_agentUser agent
http_referrerHTTP Referrer
original_urlOriginal URL

3.7.3 Extra fields added in the default configuration​

You can adjust these fields in source.group_by of the configuration

FieldDisplay name
device_modelDevice model
keyword_idAF keyword ID
store_reinstallApp store at reinstall
deeplink_urlDeeplink URL
oaidOAID
install_app_storeApp store at install
contributor1_match_typeContributor 1 match type
contributor2_match_typeContributor 2 match type
contributor3_match_typeContributor 3 match type
match_typeAttribution match type
device_categoryDevice category: phone, laptop, other
gp_referrerGoogle Play URL referrer
gp_click_timeAd click time recorded by Google Play
gp_install_beginInstall time recorded by Google Play
amazon_aidAmazon device ID
keyword_match_typeKeyword match type
attATT status on iOS 14+
conversion_typeTurn into
campaign_typeCampaign type
is_latWhether the user limits ad tracking. When true, the IDFA or GAID is replaced with all zeros
custom_dataCustom Data, used to get the user identification fields

3.8 Data ingestion rules​

The Pull Raw Data API ingests several types of data. The processing rules for each type are as follows:

  • Installs data

    • Pulls Installs data that contains only user acquisition (UA), and Organic Installs data
    • Data is written as events with the event name af_install
    • The event_time in the data, that is, the time the event occurred, is used as the event's #event_time
    • The default user property ingestion rules write some fields of the Installs data to the user table
    • User identification fields are determined by the user identification field configuration. If no user identification rule is configured, customer_user_id in the data is used as the distinct ID by default. If no user identification field is found, the record is discarded.
    • All fields are ingested. Fields in double_columns are ingested as numeric values, and other fields are ingested as strings
  • Ad Revenue

    • Pulls Attributed ad revenue and Organic ad revenue. Attributed ad revenue pulls both user acquisition (UA) and retargeting data
    • Data is written as events with the event name af_ad_revenue_raw
    • The event_time in the data, that is, the time the event occurred, is used as the event's #event_time
    • User identification fields are determined by the user identification field configuration. If no user identification rule is configured, customer_user_id in the data is used as the distinct ID by default. If no user identification field is found, the record is discarded.
    • All fields are ingested. Fields in double_columns are ingested as numeric values, and other fields are ingested as strings

3.9 Standardized fields​

The following event properties are standardized:

Original fieldStandardized fieldDescription
media_sourcete_ads_object.media_sourceMedia source
monetization_network (ad monetization data)te_ads_object.media_sourceMonetization channel
campaignte_ads_object.campaign_nameCampaign name
campaign_idte_ads_object.campaign_idCampaign ID
adsette_ads_object.ad_group_nameAd group name
ad_unit (ad monetization data)te_ads_object.ad_group_nameUnit name of the monetization ad
adset_idte_ads_object.ad_group_idAd group ID
adte_ads_object.ad_nameAd name
ad_idte_ads_object.ad_idAd ID
segment (ad monetization data)te_ads_object.placementAd placement
cost_valuete_ads_object.costCampaign cost
af_cost_currencyte_ads_object.currencyCurrency of the user acquisition spend
event_revenuete_ads_object.revenueMonetization revenue
event_revenue_currency (ad monetization data)te_ads_object.currencyCurrency of the monetization revenue
country_codete_ads_object.countryCountry or region code
platformte_ads_object.platformPlatform, such as Android or iOS
app_idte_ads_object.app_idApp ID
app_namete_ads_object.app_nameApp name
Was this page helpful?