AppsFlyer
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
Once the premium module has been added to your app, you may use the following Median JavaScript Bridge commands to access its functionality.
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" }
Updated 2 months ago