This integration is powered by Singer's AppsFlyer tap. For support, visit the GitHub repo or join the Singer Slack.
AppsFlyer integration summary
Stitch’s AppsFlyer integration replicates data using the AppsFlyer Raw Data Reports V5 API . Refer to the Schema section for a list of objects available for replication.
AppsFlyer feature snapshot
A high-level look at Stitch's AppsFlyer (v1) integration, including release status, useful links, and the features supported in Stitch.
STITCH | |||
Release status |
Released on December 11, 2017 |
Supported by | |
Stitch plan |
Standard |
API availability |
Available |
Singer GitHub repository |
Not applicable |
||
REPLICATION SETTINGS | |||
Anchor Scheduling |
Supported |
Advanced Scheduling |
Supported |
Table-level reset |
Unsupported |
Configurable Replication Methods |
Unsupported |
DATA SELECTION | |||
Table selection |
Unsupported |
Column selection |
Unsupported |
Select all |
Unsupported |
||
TRANSPARENCY | |||
Extraction Logs |
Supported |
Loading Reports |
Supported |
Connecting AppsFlyer
AppsFlyer setup requirements
To set up AppsFlyer in Stitch, you need:
-
To be the AppsFlyer Account Owner. Only Account Owners have access to API credentials in AppsFlyer, which is required to set up the integration.
-
Access to raw data exports in AppsFlyer. Stitch’s AppsFlyer integration uses the Raw Data Report API to replicate installation and in-app event data. Access to raw data is an AppsFlyer premium feature, which may only be available on their higher tiers.
To determine if you have access to raw data pulling, follow these instructions in AppsFlyer’s documentation.
Step 1: Retrieve the app ID
Sign into your AppsFlyer account.
Depending on the app’s type (iOS, Android, or Windows), the app ID format will vary:
- iOS - This will be the iTunes ID of your app. Example:
id987654321
. - Android - This will be the package name registered on AppsFlyer. For example: If the package is registered as
com.stitchdata.test
, the ID would becom.stitchdata.test
. - Windows - This will be the Windows app ID. For example:
f1e2d3c4b5a6
The location of each type of app ID is highlighted in the image below:
Step 2: Retrieve the account's API key
- In the list of apps, click the app you want to replicate data from. This will open the app’s dashboard page.
- Under the Integration section, click API Access.
- Copy the key from the Your API Key field.
Step 3: Add AppsFlyer as a Stitch data source
- Sign into your Stitch account.
-
On the Stitch Dashboard page, click the Add Integration button.
-
Click the AppsFlyer icon.
-
Enter a name for the integration. This is the name that will display on the Stitch Dashboard for the integration; it’ll also be used to create the schema in your destination.
For example, the name “Stitch AppsFlyer” would create a schema called
stitch_appsflyer
in the destination. Note: Schema names cannot be changed after you save the integration. - In the App ID field, enter the ID of the app you want to replicate data from.
- In the API Token field, paste the API key from Step 2.
Step 4: Define the historical replication start date
The Sync Historical Data setting defines the starting date for your AppsFlyer integration. This means that data equal to or newer than this date will be replicated to your data warehouse.
Change this setting if you want to replicate data beyond AppsFlyer’s default setting of 60 days. For a detailed look at historical replication jobs, check out the Syncing Historical SaaS Data guide.
Note: AppsFlyer imposes limits on date ranges for replicating historical data. If the Start Date is more than 90 days from the current date, replication will be unsuccessful. Refer to the Historical AppsFlyer data limitations section for more info.
Step 5: Create a replication schedule
In the Replication Frequency section, you’ll create the integration’s replication schedule. An integration’s replication schedule determines how often Stitch runs a replication job, and the time that job begins.
AppsFlyer integrations support the following replication scheduling methods:
-
Advanced Scheduling using Cron (Advanced or Premium plans only)
To keep your row usage low, consider setting the integration to replicate less frequently. See the Understanding and Reducing Your Row Usage guide for tips on reducing your usage.
Initial and historical replication jobs
After you finish setting up AppsFlyer, its Sync Status may show as Pending on either the Stitch Dashboard or in the Integration Details page.
For a new integration, a Pending status indicates that Stitch is in the process of scheduling the initial replication job for the integration. This may take some time to complete.
Initial replication jobs with Anchor Scheduling
If using Anchor Scheduling, an initial replication job may not kick off immediately. This depends on the selected Replication Frequency and Anchor Time. Refer to the Anchor Scheduling documentation for more information.
Free historical data loads
The first seven days of replication, beginning when data is first replicated, are free. Rows replicated from the new integration during this time won’t count towards your quota. Stitch offers this as a way of testing new integrations, measuring usage, and ensuring historical data volumes don’t quickly consume your quota.
AppsFlyer replication
Historical AppsFlyer data limitations
Due to limits imposed by AppsFlyer on date ranges while querying, only the past 90 days’ of historical data is available for any given app.
If the integration’s Start Date setting in Stitch is set to a date older than 90 days ago, extraction errors will occur and be surfaced in the integration’s Extraction Logs.
AppsFlyer API call limits and Replication Frequency
In addition to historical limitations, AppsFlyer also imposes a limit on the number of raw data API calls that can be made per day. Currently, the maximum is 10 API calls per day, per app and increases when upgrading to a higher AppsFlyer tier.
Each time Stitch requests data for an app - or a single AppsFlyer integration - two API calls will be used: One to replicate in_app_events
, and one for installations
.
If your Stitch AppsFlyer integration is set to replicate frequently (ex: every 30 minutes), you may quickly consume your AppsFlyer API quota. When this occurs, Stitch will pause replication and resume where it left off when more quota is available.
To avoid disruptions in replication, we recommend selecting a lower Replication Frequency, such as 12 or 24 hours.
AppsFlyer table reference
Schemas and versioning
Schemas and naming conventions can change from version to version, so we recommend verifying your integration’s version before continuing.
The schema and info displayed below is for version 1 of this integration.
This is the latest version of the AppsFlyer integration.
Table and column names in your destination
Depending on your destination, table and column names may not appear as they are outlined below.
For example: Object names are lowercased in Redshift (CusTomERs
> customers
), while case is maintained in PostgreSQL destinations (CusTomERs
> CusTomERs
). Refer to the Loading Guide for your destination for more info.
installations
Replication Method : |
Key-based Incremental |
Replication Key |
event_time |
Primary Key |
appsflyer_id : event_name : event_time |
Official docs : |
The installations
table contains information about iOS and Android app installations.
appsflyer_id
The unique ID for the event. |
event_name
The name of the event. |
event_time
The time the event occurred. |
advertising_id
A user-resettable, unique, anonymous ID for advertising provided by Google Play services. |
android_id
For Android, the customer’s Android device ID. |
app_id
The ID of the app that was installed. |
app_version
The version of the app that was installed. |
app_name
The name of the app that was installed. |
af_ad
For link tracking. The name of the ad. |
af_ad_id
For link tracking. The ad ID. |
af_ad_type
For link tracking. The type of ad. Possible values are:
|
af_adset
For link tracking. The adset name, provided by the advertiser. |
af_adset_id
For link tracking. The adset ID. |
af_attribution_lookback
For link tracking. The time period for which AppsFlyer attributes installs to the media source, following the lead’s view of an add. Possible values are:
|
af_c_id
For link tracking. The campaign ID. |
af_channel
For link tracking. The channel of the media source, such as YouTube for Google, Instagram for Facebook, etc. |
af_cost_currency
For link tracking. The currency that |
af_cost_model
For link tracking. The cost model of the ad. Possible values are:
Note: AppsFlyer currently calculates all cost according to |
af_cost_value
For link tracking. The cost in original currency. |
af_reengagement_window
For link tracking. The number of days in which an event can be attributed to a re-targeting campaign. |
af_keywords
For link tracking. The keywords list for text-targeted campaigns. |
af_prt
For link tracking. The agency account name. |
af_siteid
For link tracking. The ad network publisher ID. |
af_sub1
For link tracking. A custom parameter, defined by you. |
af_sub2
For link tracking. A custom parameter, defined by you. |
af_sub3
For link tracking. A custom parameter, defined by you. |
af_sub4
For link tracking. A custom parameter, defined by you. |
af_sub5
For link tracking. A custom parameter, defined by you. |
af_sub_siteid
For link tracking. The ad sub-network/publisher ID. |
attributed_touch_type
The type of the touch AppsFlyer attributed to. |
attributed_touch_time
The time of the touch AppsFlyer attributed to. |
bundle_id
The bundle ID, used to match a single app or a group of apps (for iOS). |
campaign
For link tracking. The campaign name. |
carrier
The name of the cellular network operator. |
city
The city, based on IP address ( |
contributor1_af_prt
The contribution parter. |
contributor1_media_source
The media source of the contributor. |
contributor1_campaign
The campaign of the contributor. |
contributor1_touch_type
The type of the touch. Possible values are:
|
contributor1_touch_time
The time of the touch. |
contributor2_af_prt
The second contribution partner. |
contributor2_media_source
The media source of the second contributor. |
contributor2_campaign
The campaign of the second contributor. |
contributor2_touch_type
The type of the touch. Possible values are:
|
contributor2_touch_time
The time of the touch. |
contributor3_af_prt
The third contribution partner. |
contributor3_media_source
The media source of the third contributor. |
contributor3_campaign
The campaign of the third contributor. |
contributor3_touch_type
The type of touch. Possible values are:
|
contributor3_touch_time
The time of the touch. |
country_code
The customer’s country code. |
customer_user_id
The customer’s user ID. |
device_type
The commercial model name of the customer’s device. For example: |
dma
The Designated Market Area, or the geographical areas in the US where local TV viewing is measured by the Nielsen company. |
event_revenue
The revenue created as a result of the event. |
event_revenue_usd
The amount of the revenue created, in USD. |
event_revenue_currency
The amount of the revenue in local currency. |
event_source
The source of the event. Possible values are |
event_value
The value of the event. |
http_referrer
The address of the webpage that linked to the AppsFlyer click URL. |
idfa
For iOS, the device IDFA. |
idfv
The app-level identifier for a specific vendor. |
install_time
The time of the first launch after installation took place. |
imei
For Android and iOS, the IMEI of the customer’s device. |
ip
The customer’s IP address. |
is_primary_attribution
During a re-engagement window, AppsFlyer can attribute to either the original media source (prior to the re-engagement) or to the re-engagement media source. While the event is within the re-engagement window, the original media source will not be the primary attribution. Outside of the re-engagement window, it will be the primary attribution. |
is_receipt_validated
If |
is_retargeting
For link tracking. Indicates if a click or impression event is considered from a retargeting campaign. |
language
The language the customer’s device uses. |
media_source
The regular networks (excluding FB) that appear on the link. |
operator
The name of the SIM provider for the customer’s device. |
original_url
The click/impression URL. |
os_version
The version of the operating system the customer’s device uses. |
platform
The platform of the customer’s device. Possible values are:
|
postal_code
The customer’s postal code, based on IP address ( |
region
The customer’s region, based on IP address ( |
retargeting_conversion_type
For link tracking. The re-engagement/re-attribution type. |
sdk_version
The version of the AppsFlyer SDK. |
state
The customer’s state, based on IP address ( |
user_agent
The user agent for the URL. |
wifi
If |
in_app_events
Replication Method : |
Key-based Incremental |
Replication Key |
event_time |
Primary Key |
appsflyer_id : event_name : event_time |
Official docs : |
The in_app_events
table contains information about in-app events for iOS and Android apps.
appsflyer_id
The unique ID for the event. |
event_name
The name of the event. |
event_time
The time the event occurred. |
advertising_id
A user-resettable, unique, anonymous ID for advertising provided by Google Play services. |
android_id
For Android, the customer’s Android device ID. |
app_id
The ID of the app. |
app_version
The version of the app. |
app_name
The name of the app. |
af_ad
For link tracking. The name of the ad. |
af_ad_id
For link tracking. The ad ID. |
af_ad_type
For link tracking. The type of ad. Possible values are:
|
af_adset
For link tracking. The adset name, provided by the advertiser. |
af_adset_id
For link tracking. The adset ID. |
af_attribution_lookback
For link tracking. The time period for which AppsFlyer attributes installs to the media source, following the lead’s view of an add. Possible values are:
|
af_c_id
For link tracking. The campaign ID. |
af_channel
For link tracking. The channel of the media source, such as YouTube for Google, Instagram for Facebook, etc. |
af_cost_currency
For link tracking. The currency that |
af_cost_model
For link tracking. The cost model of the ad. Possible values are:
Note: AppsFlyer currently calculates all cost according to |
af_cost_value
For link tracking. The cost in original currency. |
af_reengagement_window
For link tracking. The number of days in which an event can be attributed to a re-targeting campaign. |
af_keywords
For link tracking. The keywords list for text-targeted campaigns. |
af_prt
For link tracking. The agency account name. |
af_siteid
For link tracking. The ad network publisher ID. |
af_sub1
For link tracking. A custom parameter, defined by you. |
af_sub2
For link tracking. A custom parameter, defined by you. |
af_sub3
For link tracking. A custom parameter, defined by you. |
af_sub4
For link tracking. A custom parameter, defined by you. |
af_sub5
For link tracking. A custom parameter, defined by you. |
af_sub_siteid
For link tracking. The ad sub-network/publisher ID. |
attributed_touch_type
The type of the touch AppsFlyer attributed to. |
attributed_touch_time
The time of the touch AppsFlyer attributed to. |
bundle_id
The bundle ID, used to match a single app or a group of apps (for iOS). |
campaign
For link tracking. The campaign name. |
carrier
The name of the cellular network operator. |
city
The city, based on IP address ( |
contributor1_af_prt
The contribution parter. |
contributor1_media_source
The media source of the contributor. |
contributor1_campaign
The campaign of the contributor. |
contributor1_touch_type
The type of the touch. Possible values are:
|
contributor1_touch_time
The time of the touch. |
contributor2_af_prt
The second contribution partner. |
contributor2_media_source
The media source of the second contributor. |
contributor2_campaign
The campaign of the second contributor. |
contributor2_touch_type
The type of the touch. Possible values are:
|
contributor2_touch_time
The time of the touch. |
contributor3_af_prt
The third contribution partner. |
contributor3_media_source
The media source of the third contributor. |
contributor3_campaign
The campaign of the third contributor. |
contributor3_touch_type
The type of touch. Possible values are:
|
contributor3_touch_time
The time of the touch. |
country_code
The customer’s country code. |
customer_user_id
The customer’s user ID. |
device_type
The commercial model name of the customer’s device. For example: |
dma
The Designated Market Area, or the geographical areas in the US where local TV viewing is measured by the Nielsen company. |
event_revenue
The revenue created as a result of the event. |
event_revenue_usd
The amount of the revenue created, in USD. |
event_revenue_currency
The amount of the revenue in local currency. |
event_source
The source of the event. Possible values are |
event_value
The value of the event. |
http_referrer
The address of the webpage that linked to the AppsFlyer click URL. |
idfa
For iOS, the device IDFA. |
idfv
The app-level identifier for a specific vendor. |
install_time
The time of the first launch after installation took place. |
imei
For Android and iOS, the IMEI of the customer’s device. |
ip
The customer’s IP address. |
is_primary_attribution
During a re-engagement window, AppsFlyer can attribute to either the original media source (prior to the re-engagement) or to the re-engagement media source. While the event is within the re-engagement window, the original media source will not be the primary attribution. Outside of the re-engagement window, it will be the primary attribution. |
is_receipt_validated
If |
is_retargeting
For link tracking. Indicates if a click or impression event is considered from a retargeting campaign. |
language
The language the customer’s device uses. |
media_source
The regular networks (excluding FB) that appear on the link. |
operator
The name of the SIM provider for the customer’s device. |
original_url
The click/impression URL. |
os_version
The version of the operating system the customer’s device uses. |
platform
The platform of the customer’s device. Possible values are:
|
postal_code
The customer’s postal code, based on IP address ( |
region
The customer’s region, based on IP address ( |
retargeting_conversion_type
For link tracking. The re-engagement/re-attribution type. |
sdk_version
The version of the AppsFlyer SDK. |
state
The customer’s state, based on IP address ( |
user_agent
The user agent for the URL. |
wifi
If |
Related | Troubleshooting |
Questions? Feedback?
Did this article help? If you have questions or feedback, feel free to submit a pull request with your suggestions, open an issue on GitHub, or reach out to us.