AppsFlyer

What Is AppsFlyer?

AppsFlyer is a global mobile marketing analytics and attribution platform that helps advertisers and developers measure and optimize their marketing campaigns. It provides data and insights on app performance and user engagement, enabling clients to understand the effectiveness of their advertising sources. The platform supports a wide range of attribution solutions, including mobile attribution, marketing analytics, and deep linking across various channels and platforms. AppsFlyer's technology integrates with numerous apps and ad networks, providing tools for fraud prevention and data-driven decision-making. This helps businesses maximize their return on investment and refine their marketing strategies effectively.


Product Type: Analytics
Integration Type: Starter Kit & ID Sync
Event Source Type: Mobile App
Event Scope: Full-Funnel Events


Capabilities

  • Sends a single, standardized server-side event stream to AppsFlyer and other destinations.
  • Provides first-party, parameter-by-parameter control over data sent to AppsFlyer.
  • Eliminates the need for AppsFlyer or other third-party tags.
  • Supports full-funnel events including page, product, cart, and order lifecycle actions.
  • Supports both AppsFlyer Android and AppsFlyer iOS as separate integrations.

Considerations

  • This integration consists of two separate starter kits: AppsFlyer Android and AppsFlyer iOS. Add the integration(s) that match the platforms you are tracking.
  • Global and event-specific parameters are consistent between the Android and iOS integrations.
  • All parameters in the starter kit are required.
  • Events are only sent when an appsFlyerId is present; events without it are filtered out.
  • For iOS, the App ID must be prefixed with id. Failure to do so returns a valid 200 OK without recording the event.
  • The idfa (iOS) and advertising_id (Android) are highly recommended for user matching and are collected by the sync.
  • Additional identifiers such as idfv, oaid, imei, cuid, ip, and amazon_aid can be added as Global or Event Specific mappings to improve user match rates when available.

Identity Sync

  • Sync Available: Yes
  • Required for Starter Kit: Yes
  • Prerequisites: AppsFlyer app registered (Android Bundle ID or iOS App ID)
  • Documentation: See Additional AppsFlyer Sync Documentation

Sync Details

  • Captures the appsFlyerId, idfa, and advertising_id values used for user matching.
  • Required by AppsFlyer to accurately attribute and report on events.
  • Without this sync, events may not be accurately reflected in reporting.

Starter Kit Setup Guide

1. Deploy the AppsFlyer Sync

  • To collect the sync values (e.g., appsFlyerId, idfa, advertising_id), you must implement an AppsFlyer ID sync. Refer to the following documentation to complete the setup: AppsFlyer - ID Sync Guide.

2. Gather Credentials

  • Ask AppsFlyer representatives for, or retrieve from your AppsFlyer account, the following credentials:
    • Dev Key: In AppsFlyer, from the side menu, select Settings > App Settings, then copy your dev key.
    • Android Bundle ID: The unique identifier for the app (e.g., com.example.myapp), found in the Google Play Console under your app's information section.
    • iOS App ID: The unique identifier created by Apple in App Store Connect, found in the App Information section under General Information. Prefix with id within the integration.

3. Add an AppsFlyer Integration

  • From the integration library, add an AppsFlyer Android and/or AppsFlyer iOS integration. Then, fill out the Connection Parameters:

AppsFlyer Android

Connection ParameterDescription
BUNDLE_IDUnique identifier for the app. Get the Bundle ID from the Google Play Store.
DEV_KEYDev key obtained from app settings.

AppsFlyer iOS

Connection ParameterDescription
APP_IDUnique identifier created by Apple when you register your app in App Store Connect. Prefix with id; failure to do so returns a valid 200 OK without recording the event.
DEV_KEYDev key obtained from app settings.

4. Configure Event Mapping

  • MetaRouter provides all of the event mappings that AppsFlyer integrations typically require. You may add custom events, parameters, or mappings in accordance with AppsFlyer's API documentation.

5. Deploy to Pipeline

  • In the Pipelines tab, add your AppsFlyer integration.
  • Select the correct integration revision.
  • Click Add Integration to finalize deployment.

Event Mappings

Global

Global mappings will be applied to all events. If your parameter names do not match the Expected Inputs provided, you will need to overwrite the Inputs provided with your own.

Output KeyDescriptionExpected Input
appsflyer_idString: AppsFlyer unique device ID.context.providers.appsFlyer.appsFlyerId
osString: Device operating system version.Expression – derives OS version from context.userAgent
eventTimeString: Event time in the format 'YYYY-MM-DD HH:MM:SS.SSS'.Expression – formats timestamp to '2006-01-02 15:04:05.000'

Event Specific

Page

Output KeyDescriptionExpected Input
eventNameString: Event name.Enrichment – 'af_content_view'
eventValueString: JSON object containing event attributes.Expression – builds af_content_type, af_content from properties

Products Searched

Output KeyDescriptionExpected Input
eventNameString: Event name.Enrichment – 'af_search'
eventValueString: JSON object containing event attributes.Expression – builds af_search_string from properties.query

Product List Viewed

Output KeyDescriptionExpected Input
eventNameString: Event name.Enrichment – 'af_list_view'
eventValueString: JSON object containing event attributes.Expression – builds af_content_type, af_content_list from properties

Product Viewed

Output KeyDescriptionExpected Input
eventNameString: Event name.Enrichment – 'af_content_view'
eventValueString: JSON object containing event attributes.Expression – builds af_price, af_content_type, af_content_id, af_currency, af_content from properties

Product Added

Output KeyDescriptionExpected Input
eventNameString: Event name.Enrichment – 'af_add_to_cart'
eventValueString: JSON object containing event attributes.Expression – builds af_price, af_content_type, af_content_id, af_content, af_currency, af_quantity from properties

Cart Viewed

Output KeyDescriptionExpected Input
eventNameString: Event name.Enrichment – 'af_initiated_checkout'
eventValueString: JSON object containing event attributes.Expression – builds af_price, af_content_id, af_content, af_currency, af_quantity from properties.products

Order Completed

Output KeyDescriptionExpected Input
eventNameString: Event name.Enrichment – 'af_purchase'
eventCurrencyString: Event currency.properties.currency (uppercased, default USD)
eventValueString: JSON object containing event attributes.Expression – builds af_revenue, af_currency, af_order_id, af_content, af_content_id, af_quantity, af_price from properties

Required & Recommended Identifiers

These identifiers must be mapped to AppsFlyer in order for successful user matching to occur. Without these IDs, any events sent to AppsFlyer may not be accurately reflected in reporting. For your convenience, required and recommended IDs are mapped as Global parameters to ensure they are added to every event.

AttributeExampleSync Injector Required?
appsFlyerId Required156723-672183-241806-12472Yes
idfa Highly Recommended for iOSAEBE52E7-03EE-455A-B3C4-E57283966239Yes
advertising_id Highly Recommended for Android38400000-8cf0-11bd-b23e-10b96e40000dYes

Integration Validation

Use the Live Events Viewer (SDK Integration Tests page) in your AppsFlyer dashboard to confirm that server-side events are being received in real time. Events sent through the S2S API appear here alongside SDK events. If events are not appearing as expected, coordinate with your AppsFlyer representative to confirm that events are being received and attributed correctly on their backend.


Additional AppsFlyer Documentation