Release Status Released Supported By Singer community
Availability Free Status Page AppsFlyer Status Page
Default Historical Sync 60 days Default Replication Frequency 30 minutes
Whitelisting Unsupported Destination Incompatibilities None

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, without the id portion. For example: If the app is id987654321, the ID would be 987654321.
  • Android - This will be the package name registered on AppsFlyer. For example: If the package is registered as com.stitchdata.test, the ID would be com.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:

AppsFlyer app ID locations

Step 2: Retrieve the account's API key

  1. In the list of apps, click the app you want to replicate data from. This will open the app’s dashboard page.
  2. Under the Integration section, click API Access.
  3. Copy the key from the Your API Key field.

Step 3: Add AppsFlyer as a Stitch data source

  1. Sign into your Stitch account.
  2. On the Stitch Dashboard page, click the Add Integration button.

  3. Click the AppsFlyer icon.

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

  5. In the App ID field, enter the ID of the app you want to replicate data from.
  6. In the API Token field, paste the API key from Step 2.

Step 4: Define the Historical Sync

The Sync Historical Data setting will define 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.

Stitch offers two methods of creating a replication schedule:

  • Replication Frequency: This method requires selecting the interval you want replication to run for the integration. Start times of replication jobs are based on the start time and duration of the previous job. Refer to the Replication Frequency documentation for more information and examples.
  • Anchor scheduling: Based on the Replication Frequency, or interval, you select, this method “anchors” the start times of this integration’s replication jobs to a time you select to create a predictable schedule. Anchor scheduling is a combination of the Anchor Time and Replication Frequency settings, which must both be defined to use this method. Additionally, note that:

    • A Replication Frequency of at least one hour is required to use anchor scheduling.
    • An initial replication job may not begin immediately after saving the integration, depending on the selected Replication Frequency and Anchor Time. Refer to the Anchor Scheduling documentation for more information.

To help prevent overages, 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.

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 schemas

Replication Method: Key-based Incremental Replication Key : event_time
Primary Key : appsflyer_id : event_name : event_time Documentation: Official Docs

The in_app_events table contains information about in-app events for iOS and Android apps.

appsflyer_id
STRING

The unique ID for the event.

event_name
STRING

The name of the event.

event_time
STRING

The time the event occurred.

advertising_id
STRING

A user-resettable, unique, anonymous ID for advertising provided by Google Play services.

android_id
STRING

For Android, the customer’s Android device ID.

app_id
STRING

The ID of the app.

app_version
STRING

The version of the app.

app_name
STRING

The name of the app.

af_ad
STRING

For link tracking. The name of the ad.

af_ad_id
STRING

For link tracking. The ad ID.

af_ad_type
STRING

For link tracking. The type of ad. Possible values are:

  • search_text
  • banner
  • interstitial
  • video
  • rewarded_video
  • playable
  • sponsored_content
  • audio
af_adset
STRING

For link tracking. The adset name, provided by the advertiser.

af_adset_id
STRING

For link tracking. The adset ID.

af_attribution_lookback
STRING

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:

  • 1 to 48 hours (1h-48h)
  • 1 to 7 days (1d - 7d)
af_c_id
STRING

For link tracking. The campaign ID.

af_channel
STRING

For link tracking. The channel of the media source, such as YouTube for Google, Instagram for Facebook, etc.

af_cost_currency
STRING

For link tracking. The currency that af_cost_value is in. Refer to XE.com for a list of possible values.

af_cost_model
STRING

For link tracking. The cost model of the ad. Possible values are:

  • CPC
  • CPA
  • CPM
  • Other

Note: AppsFlyer currently calculates all cost according to CPA, regardless of the value in this field.

af_cost_value
STRING

For link tracking. The cost in original currency.

af_reengagement_window
STRING

For link tracking. The number of days in which an event can be attributed to a re-targeting campaign.

af_keywords
STRING

For link tracking. The keywords list for text-targeted campaigns.

af_prt
STRING

For link tracking. The agency account name.

af_siteid
STRING

For link tracking. The ad network publisher ID.

af_sub1
STRING

For link tracking. A custom parameter, defined by you.

af_sub2
STRING

For link tracking. A custom parameter, defined by you.

af_sub3
STRING

For link tracking. A custom parameter, defined by you.

af_sub4
STRING

For link tracking. A custom parameter, defined by you.

af_sub5
STRING

For link tracking. A custom parameter, defined by you.

af_sub_siteid
STRING

For link tracking. The ad sub-network/publisher ID.

attributed_touch_type
STRING

The type of the touch AppsFlyer attributed to.

attributed_touch_time
STRING

The time of the touch AppsFlyer attributed to.

bundle_id
STRING

The bundle ID, used to match a single app or a group of apps (for iOS).

campaign
STRING

For link tracking. The campaign name.

carrier
STRING

The name of the cellular network operator.

city
STRING

The city, based on IP address (ip).

contributor1_af_prt
STRING

The contribution parter.

contributor1_media_source
STRING

The media source of the contributor.

contributor1_campaign
STRING

The campaign of the contributor.

contributor1_touch_type
STRING

The type of the touch. Possible values are:

  • click
  • impression
  • tv
contributor1_touch_time
STRING

The time of the touch.

contributor2_af_prt
STRING

The second contribution partner.

contributor2_media_source
STRING

The media source of the second contributor.

contributor2_campaign
STRING

The campaign of the second contributor.

contributor2_touch_type
STRING

The type of the touch. Possible values are:

  • click
  • impression
  • tv
contributor2_touch_time
STRING

The time of the touch.

contributor3_af_prt
STRING

The third contribution partner.

contributor3_media_source
STRING

The media source of the third contributor.

contributor3_campaign
STRING

The campaign of the third contributor.

contributor3_touch_type
STRING

The type of touch. Possible values are:

  • click
  • impression
  • tv
contributor3_touch_time
STRING

The time of the touch.

country_code
STRING

The customer’s country code.

customer_user_id
INTEGER

The customer’s user ID.

device_type
STRING

The commercial model name of the customer’s device. For example: iPhone7

dma
STRING

The Designated Market Area, or the geographical areas in the US where local TV viewing is measured by the Nielsen company.

event_revenue
STRING

The revenue created as a result of the event.

event_revenue_usd
STRING

The amount of the revenue created, in USD.

event_revenue_currency
STRING

The amount of the revenue in local currency.

event_source
STRING

The source of the event. Possible values are SDK or S2S (Server to Server).

event_value
STRING

The value of the event.

http_referrer
STRING

The address of the webpage that linked to the AppsFlyer click URL.

idfa
STRING

For iOS, the device IDFA.

idfv
STRING

The app-level identifier for a specific vendor.

install_time
STRING

The time of the first launch after installation took place.

imei
STRING

For Android and iOS, the IMEI of the customer’s device.

ip
STRING

The customer’s IP address.

is_primary_attribution
BOOLEAN

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
BOOLEAN

If true, the receipt for the purchase was validated.

is_retargeting
BOOLEAN

For link tracking. Indicates if a click or impression event is considered from a retargeting campaign.

language
STRING

The language the customer’s device uses.

media_source
STRING

The regular networks (excluding FB) that appear on the link.

operator
STRING

The name of the SIM provider for the customer’s device.

original_url
STRING

The click/impression URL.

os_version
STRING

The version of the operating system the customer’s device uses.

platform
STRING

The platform of the customer’s device. Possible values are:

  • iOS
  • Android
  • Windows
  • Mobile
postal_code
STRING

The customer’s postal code, based on IP address (ip).

region
STRING

The customer’s region, based on IP address (ip).

retargeting_conversion_type
STRING

For link tracking. The re-engagement/re-attribution type.

sdk_version
STRING

The version of the AppsFlyer SDK.

state
STRING

The customer’s state, based on IP address (ip).

user_agent
STRING

The user agent for the URL.

wifi
BOOLEAN

If true, the installation occurred over WiFi.


Replication Method: Key-based Incremental Replication Key : event_time
Primary Key : appsflyer_id : event_name : event_time Documentation: Official Docs

The installations table contains information about iOS and Android app installations.

appsflyer_id
STRING

The unique ID for the event.

event_name
STRING

The name of the event.

event_time
STRING

The time the event occurred.

advertising_id
STRING

A user-resettable, unique, anonymous ID for advertising provided by Google Play services.

android_id
STRING

For Android, the customer’s Android device ID.

app_id
STRING

The ID of the app that was installed.

app_version
STRING

The version of the app that was installed.

app_name
STRING

The name of the app that was installed.

af_ad
STRING

For link tracking. The name of the ad.

af_ad_id
STRING

For link tracking. The ad ID.

af_ad_type
STRING

For link tracking. The type of ad. Possible values are:

  • search_text
  • banner
  • interstitial
  • video
  • rewarded_video
  • playable
  • sponsored_content
  • audio
af_adset
STRING

For link tracking. The adset name, provided by the advertiser.

af_adset_id
STRING

For link tracking. The adset ID.

af_attribution_lookback
STRING

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:

  • 1 to 48 hours (1h-48h)
  • 1 to 7 days (1d - 7d)
af_c_id
STRING

For link tracking. The campaign ID.

af_channel
STRING

For link tracking. The channel of the media source, such as YouTube for Google, Instagram for Facebook, etc.

af_cost_currency
STRING

For link tracking. The currency that af_cost_value is in. Refer to XE.com for a list of possible values.

af_cost_model
STRING

For link tracking. The cost model of the ad. Possible values are:

  • CPC
  • CPA
  • CPM
  • Other

Note: AppsFlyer currently calculates all cost according to CPA, regardless of the value in this field.

af_cost_value
STRING

For link tracking. The cost in original currency.

af_reengagement_window
STRING

For link tracking. The number of days in which an event can be attributed to a re-targeting campaign.

af_keywords
STRING

For link tracking. The keywords list for text-targeted campaigns.

af_prt
STRING

For link tracking. The agency account name.

af_siteid
STRING

For link tracking. The ad network publisher ID.

af_sub1
STRING

For link tracking. A custom parameter, defined by you.

af_sub2
STRING

For link tracking. A custom parameter, defined by you.

af_sub3
STRING

For link tracking. A custom parameter, defined by you.

af_sub4
STRING

For link tracking. A custom parameter, defined by you.

af_sub5
STRING

For link tracking. A custom parameter, defined by you.

af_sub_siteid
STRING

For link tracking. The ad sub-network/publisher ID.

attributed_touch_type
STRING

The type of the touch AppsFlyer attributed to.

attributed_touch_time
STRING

The time of the touch AppsFlyer attributed to.

bundle_id
STRING

The bundle ID, used to match a single app or a group of apps (for iOS).

campaign
STRING

For link tracking. The campaign name.

carrier
STRING

The name of the cellular network operator.

city
STRING

The city, based on IP address (ip).

contributor1_af_prt
STRING

The contribution parter.

contributor1_media_source
STRING

The media source of the contributor.

contributor1_campaign
STRING

The campaign of the contributor.

contributor1_touch_type
STRING

The type of the touch. Possible values are:

  • click
  • impression
  • tv
contributor1_touch_time
STRING

The time of the touch.

contributor2_af_prt
STRING

The second contribution partner.

contributor2_media_source
STRING

The media source of the second contributor.

contributor2_campaign
STRING

The campaign of the second contributor.

contributor2_touch_type
STRING

The type of the touch. Possible values are:

  • click
  • impression
  • tv
contributor2_touch_time
STRING

The time of the touch.

contributor3_af_prt
STRING

The third contribution partner.

contributor3_media_source
STRING

The media source of the third contributor.

contributor3_campaign
STRING

The campaign of the third contributor.

contributor3_touch_type
STRING

The type of touch. Possible values are:

  • click
  • impression
  • tv
contributor3_touch_time
STRING

The time of the touch.

country_code
STRING

The customer’s country code.

customer_user_id
INTEGER

The customer’s user ID.

device_type
STRING

The commercial model name of the customer’s device. For example: iPhone7

dma
STRING

The Designated Market Area, or the geographical areas in the US where local TV viewing is measured by the Nielsen company.

event_revenue
STRING

The revenue created as a result of the event.

event_revenue_usd
STRING

The amount of the revenue created, in USD.

event_revenue_currency
STRING

The amount of the revenue in local currency.

event_source
STRING

The source of the event. Possible values are SDK or S2S (Server to Server).

event_value
STRING

The value of the event.

http_referrer
STRING

The address of the webpage that linked to the AppsFlyer click URL.

idfa
STRING

For iOS, the device IDFA.

idfv
STRING

The app-level identifier for a specific vendor.

install_time
STRING

The time of the first launch after installation took place.

imei
STRING

For Android and iOS, the IMEI of the customer’s device.

ip
STRING

The customer’s IP address.

is_primary_attribution
BOOLEAN

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
BOOLEAN

If true, the receipt for the purchase was validated.

is_retargeting
BOOLEAN

For link tracking. Indicates if a click or impression event is considered from a retargeting campaign.

language
STRING

The language the customer’s device uses.

media_source
STRING

The regular networks (excluding FB) that appear on the link.

operator
STRING

The name of the SIM provider for the customer’s device.

original_url
STRING

The click/impression URL.

os_version
STRING

The version of the operating system the customer’s device uses.

platform
STRING

The platform of the customer’s device. Possible values are:

  • iOS
  • Android
  • Windows
  • Mobile
postal_code
STRING

The customer’s postal code, based on IP address (ip).

region
STRING

The customer’s region, based on IP address (ip).

retargeting_conversion_type
STRING

For link tracking. The re-engagement/re-attribution type.

sdk_version
STRING

The version of the AppsFlyer SDK.

state
STRING

The customer’s state, based on IP address (ip).

user_agent
STRING

The user agent for the URL.

wifi
BOOLEAN

If true, the installation occurred over WiFi.



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.