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 real-time 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 comprehensive tools for fraud prevention and data-driven decision-making. This helps businesses maximize their return on investment and refine their marketing strategies effectively.

What are the benefits of integrating MetaRouter with AppsFlyer?

  • Single, standardized event stream for AppsFlyer and other destinations
  • Server-side event stream that enables real-time journeys
  • First-party, parameter-by-parameter control over data sent to AppsFlyer
  • No AppsFlyer or other third-party tags required

Getting Started - From Your AppsFlyer Account

Dev Key

  1. In AppsFlyer, from the side menu, select Settings > App Settings.
  2. Copy your dev key.

AppsFlyer Android

  • Bundle ID - This is a unique identifier for the app, which is used internally by the system and must be unique across all apps available on the Google Play Store or other Android app marketplaces. It typically follows a domain-style notation, like com.example.myapp.
    • If your app is already published on the Google Play Store, you can find the bundle ID in the Google Play Console.
    • Log in to your Google Play Console, select your app, and you can typically see the package name (bundle ID) listed in the app's information section.

AppsFlyer iOS

  • App ID - This is a unique identifier created by Apple when you register your app in the App Store Connect. Within the integration, ensure to prefix with id. Failure to do so results in a valid 200 OK return code; without recording the event.
    • Log in to App Store Connect.
    • Select "My Apps" and click on the app for which you want the ID.
    • The Apple App ID can be found in the App Information section under "General Information." This ID is also visible in the URL when you're viewing your app in App Store Connect; it's the numeric part at the end of the URL.

Getting Started - From Your MetaRouter Account

Adding an AppsFlyer integration.

From the integration library, add a 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 Microsoft App Store.
DEV_KEYDev key obtained from apps settings.

AppsFlyer iOS

Connection ParameterDescription
APP_IDThis is a unique identifier created by Apple when you register your app in the App Store Connect. Within the integration, ensure to prefix with id. Failure to do so results in a valid 200 OK return code; without recording the event.
DEV_KEYDev key obtained from apps settings.

Adding an AppsFlyer Sync

To gather the appsFlyerId, idfa, and advertising_id values, you must add an AppsFlyer sync.

  1. From the Pipelines page, find the pipeline associated with the web property you’d like to add a sync to. Hover over the three dot dropdown and select “Build AJS File.”
  2. In the Identity Syncs section, select the AppsFlyer sync.
  3. Fill out the following fields:
    1. Consent Type
    2. Cookie Lifetime (in days) - 365 default and recommended
  4. Scroll down and click the Save and Build File button.
  5. Deploy your AJS file to propagate changes to your web property.

Event Mappings

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.

Please note that the Global and Event specific parameters are consistent between Android and iOS integrations.

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.

All parameters in the starter-kit are required.

Output KeyDescriptionExpected Input
appsflyer_idString: AppsFlyer unique device IDcontext.providers.appsFlyer.appsFlyerId
osString: Device operating system versionN/A - Expression
eventTimeString: Event time in the format 'YYYY-MM-DD HH:MM.SSS'Enrichment - date: {'format': '2006-01-02 15:04:05.000'}

Event Specific

All parameters in the starter-kit are required.

page

Output KeyDescriptionExpected Input
eventNameString: Event nameEnrichment - staticString: 'af_content_view'
eventValueString: JSON object containing event attributesN/A - Expression

products_searched

Output KeyDescriptionExpected Input
eventNameString: Event nameEnrichment - staticString: 'af_search'
eventValueString: JSON object containing event attributesN/A - Expression

product_list_viewed

Output KeyDescriptionExpected Input
eventNameString: Event nameEnrichment - staticString: 'af_list_view'
eventValueString: JSON object containing event attributesN/A - Expression

product_viewed

Output KeyDescriptionExpected Input
eventNameString: Event nameEnrichment - staticString: 'af_content_view'
eventValueString: JSON object containing event attributesN/A - Expression

cart_viewed

Output KeyDescriptionExpected Input
eventNameString: Event nameEnrichment - staticString: 'af_initiated_checkout'
eventValueString: JSON object containing event attributesN/A - Expression

order_completed

Output KeyDescriptionExpected Input
eventNameString: Event nameEnrichment - staticString: 'af_purchase'
eventCurrencyString: Event currencyproperties.currency
eventValueString: JSON object containing event attributesN/A - Expression

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
Required
156723-672183-241806-12472Yes
idfa
Highly Recommended for iOS
AEBE52E7-03EE-455A-B3C4-E57283966239Yes
advertising_id
Highly Recommended for Android
38400000-8cf0-11bd-b23e-10b96e40000dYes

Additional Identifiers

These identifiers should be mapped to AppsFlyer whenever possible to ensure the highest user match rates possible. If using these identifiers, they must be added as Global or Event Specific mappings.

AttributeDescriptionExample
IDFViOS: The Identifier for Vendor (IDFV) is a unique identifier assigned by Apple to all apps from the same developer on a device, used to track user activity across those apps without revealing personal information.6D92078A-8246-4BA4-AE5B-76104861E7DC
OAIDAndroid: OAID is a non-permanent, resettable identifier used by Android devices to enable personalized advertising without compromising user privacy.A7BC7823-4FEB-43AD-8EC9-F08626E113D4
IMEIAndroid: IMEI is a unique 15-digit number used to identify individual mobile devices and their network-related attributes.490154203237518
CUIDiOS: CUID is a unique identifier that companies use to track users across their applications or services, often set by the developer to integrate user data from different sources.A CUID might be user-defined and look something like user12345 or 123e4567-e89b-12d3-a456-42661417400
ipThe mobile device's IP address during the event occurrence.
If sent, the IP address is used to populate geo fields.
If not sent, AppsFlyer populates the geo fields using the values from the install attribution event. The IP address isn't populated.
172.16.254.1
amazon_aidThe Amazon Advertising ID (AAID) is a unique identifier assigned to each Amazon device (like Kindle or Fire tablets) that allows developers and advertisers to track user interactions and measure advertising effectiveness on those devices.df7d3a23-c1d1-4e07-9234-2bd6a98a8b5b


Additional AppsFlyer Documentation

Server-to-server events API for mobile

Send Event API Reference

Privacy Regulations

Audiences user identifier policy