Skip to content
Adobe Air Extension for AppsFlyer
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

AppsFlyer Adobe Air extension

In order for us to provide optimal support, we would kindly ask you to submit any issues to

When submitting an issue please specify your AppsFlyer sign-up (account) email , your app ID , production steps, logs, code snippets and any additional relevant information.

Table of content

Supported Platforms

  • Android
  • iOS 6+

This plugin is built for

  • iOS AppsFlyerSDK v4.8.4
  • Android AppsFlyerSDK v4.8.11


Download the AppsFlyerAIRExtension.ane file from the bin folder Add the ANE to your project and make sure the IDE is marked to package it.

If the following was not added automatically please add it to the APP_NAME-app.xml:


Note for Android applications: On AppsFlyer's dashboard you will need to add "air." prefix to the package name as this is added automatically by Air. For example - an app with the package name "" , should set the app id on AppsFlyer's Dashboard as "".


Import the AppsFlyer Extension into your project:

import AppsFlyerInterface;

Construct the AppsFlyer interface:

private static var appsFlyer:AppsFlyerInterface; 
appsFlyer = new AppsFlyerInterface();

Android: initialisation and install/session tracking

Set the Developer key and Initialise the SDK:


Initialise session tracking (automatically track app launches and background-to-foreground transitions)


If you wish to track sessions manually (send a session tracking event, regardless of app state) use the trackAppLaunch method:


iOS: initialisation and install/session tracking

Set the Developer key, the App ID and Initialise the SDK:

appsFlyer.startTracking("DevKey", "AppID");

Track a session whenever the application is launched / moved from background-to-foreground:


API Methods

Tracking In-App Events

In-App Events can be tracked using the `trackEvent("eventName", "eventValue") API. For Example:

var param:String = "Deposit";
var value:String = '{"amount":10, "FTDLevel":"-"}';
appsFlyer.trackEvent(param, value);         

Setting App User ID


Setting App User Email


Setting Currency


StopTracking (Opt-Out)

In some extreme cases you might want to shut down all SDK tracking due to legal and privacy compliance. This can be achieved with the isStopTracking API. Once this API is invoked, our SDK will no longer communicate with our servers and stop functioning.


Enable / Disable AppsFlyer Debug-Logs


Important : do not release the application to the AppStore / Google Play with debug logs enabled.

Deep Linking

Setting up Deep Links in Adobe Air applications

Android: Create an intent-filter in the Android-Manifest.xml containing the required scheme/host/path properties. For additional reading on App-Links in Adobe Air:

iOS: Using URI schemes. For additional reading on URI schemes in iOS:

More on DeepLinks and AppsFlyer: OneLink™ Overview

Receiving Deep Link Callbacks

In order to receive the relevant AppsFlyer information from the deep link used, register the following event listeners:

appsFlyer.addEventListener(AppsFlyerEvent.APP_OPEN_ATTRIBUTION, eventHandler); // success 
appsFlyer.addEventListener(AppsFlyerEvent.ATTRIBUTION_FAILURE, eventHandler); // error 

And handle the response in a corresponding event handler:

private function eventHandler(event:AppsFlyerEvent):void {
	log("AppsFlyer event: " + event.type + "; \nData: " +;

Deferred Deep Links (get Conversion Data)

In order to receive the conversion data for the current install, register the following event listeners:

appsFlyer.addEventListener(AppsFlyerEvent.INSTALL_CONVERSATION_DATA_LOADED, eventHandler); // success
appsFlyer.addEventListener(AppsFlyerEvent.INSTALL_CONVERSATION_FAILED, eventHandler); //error

And handle the response in a corresponding event handler:

private function eventHandler(event:AppsFlyerEvent):void {
	log("AppsFlyer event: " + event.type + "; \nData: " +;

IMEI And Android ID Collection (Android Only)

By default, IMEI and Android ID are not collected by the SDK if the OS version is higher than KitKat (4.4) and the device contains Google Play Services.

To explicitly send these IDs to AppsFlyer, developers can use the following APIs and place it before initialising the SDK.

If the app does NOT contain Google Play Services, the IMEI and Android ID are collected by the SDK. However, apps with Google play services should avoid IMEI collection as this is in violation of the Google Play policy.

Enable / Disable IMEI collection

*Default value is false (disabled)

Manually setting IMEI Data


Enable / Disable Android ID collection

*Default value is false (disabled)

Manually setting Android ID Data



You can find the release changelog here.

You can’t perform that action at this time.