Overview

Median's AppsFlyer Native Plugin provides app installation and event recording functionality. You can record app installs, updates, sessions, and in-app events. Recording these events can help you evaluate ROI and user quality.

All default events will be recorded automatically. Custom in-app events can be sent using the Median JavaScript Bridge.

Implementation Guide

👍

Developer Demo

Display our demo page in your app to test during development https://median.dev/appsflyer/

🚧

iOS 14.5+ App Tracking Transparency Requirement

Requesting user consent through the App Tracking Transparency (ATT) framework is required for iOS 14.5+. Learn more about adding ATT support for your iOS app in our docs and additionally refer to the AppsFlyer documentation.

Associating a User

Setting your own customer ID enables you to cross-reference your own unique ID with AppsFlyer’s unique ID and other devices’ IDs.

↔️Median JavaScript Bridge

median.appsflyer.setCustomerUserId(STRING id);

Log a Custom In-App Event

↔️Median JavaScript Bridge

median.appsflyer.logEvent(STRING eventName, OBJECT eventValues); // eventValues is a JavaScript object

Conversion Data

Define a callback which will be invoked by the app with AppsFlyer conversion data each time the app is launched or brought to the foreground (e.g. via a deep link). The function is called with an object (conversionDataMap in the below example) that contains the conversion data provided by the AppsFlyer SDK for that install including the property af_status which specifies the install as Organic or Non-organic. The conversion data is cached the first time the callback is called and will be identical on consecutive calls.

↔️Median JavaScript Bridge

// Define this function which will be called automatically by the app
function median_appsflyer_cd_success(conversionDataMap){
	// conversionDataMap.af_status is a String set as "Organic" or "Non-organic"
}