Skip to content
Docs and guides

Help Center

Step-by-step guides for every setting in App Studio.

AppsFlyer

Updated

Mobile attribution and campaign measurement.

Enable a native plugin, configure its settings, then rebuild and install the app.
Native plugin changes require a new build. Follow this guide for the exact settings and supported methods.View full size
  • JavaScript: window.AppSorcerer.appsflyer
  • Plan: Business (premium) — included on plans with premium plugins, and you can try it free for 14 days
  • Platforms: Android apps today. iOS support arrives with iOS builds (coming soon).

Turn the plugin on in App Studio → Plugins, fill in its settings, then rebuild your app. Websites call it through the JavaScript bridge.

Settings

Studio labelTypeDefaultNotes
Dev keytext–required
Apple app ID (iOS)text–

Setup

Enter your AppsFlyer Dev key (the Apple app ID setting is for iOS). Deep linking, including deferred deep links, is handled automatically. OneLink domains for direct deep links aren't set up by this plugin.

JavaScript API

Every method returns a Promise. Call it as await AppSorcerer.appsflyer.<method>(args).

MethodArgumentsResolves with
logEvent{ name, values?: {} }null once AppsFlyer accepted the event (e.g. af_purchase with af_revenue, af_currency)
setCustomerUserId{ userId }null
getAppsFlyerUID–{ uid }
getConversionData–install attribution data, or null
getDeepLink–last deep link data, or null
anonymizeUser{ enabled }null
stop{ stopped }null (opt-out)
setUserEmails{ emails: [] }null

Events

Listen with AppSorcerer.on('<event>', callback) (or the DOM event appsorcerer:<event>).

EventData
appsflyer.conversioninstall attribution map (af_status, media_source, campaign, …)
appsflyer.deepLinkdeep link clickEvent + { deepLinkValue, isDeferred }. A deep_link_value that is a path (/products/x) or an https URL is opened first
appsflyer.appOpenAttributionattribution of a re-engagement open

Events that happen before the page is ready are queued and delivered after the next page load.

Errors

Rejections carry error.code: not_configured, log_failed, invalid_args, unknown_method.

Example

JavaScript
await AppSorcerer.appsflyer.setCustomerUserId({ userId: customer.id });
await AppSorcerer.appsflyer.logEvent({ name: 'af_purchase', values: { af_revenue: 59.8, af_currency: 'EUR', af_order_id: '1042' } });

Notes

  • Google Play install referrer attribution is included.
Was this helpful?