Install
Config plugin
NSAdvertisingAttributionReportEndpoint and AdAttributionKit › AttributionCopyEndpoint to Info.plist, so iOS sends copies of winning SKAdNetwork and AdAttributionKit postbacks to Appeeky.
Native module
The package includes a native module (Expo Modules). It needs a development build or a release build.
Without the native module (Expo Go, or a plain React Native app without Expo Modules) the SDK still runs in JavaScript. Events, screens, sessions,
identify and campaign links keep working. Apple Search Ads attribution, the Play referrer and conversion values turn off, unless you pass getAdServicesToken and getInstallReferrer yourself (see Options).
Methods
init(options)
Starts the SDK. Call it once, as early as possible.
init are ignored (with a warning in development).
identify(userId)
Links the install to a RevenueCat app user id, so purchases get the install’s source.
identify so the install is linked before the first purchase. Ids are cut to 256 characters.
screen(name, props?)
Records a screen view.
screen:Paywall, and by the purchase journey in sale alerts.
track(name, props?, value?)
Records a custom event, with optional properties and an optional number.
- Event names may use letters, digits,
_,.,:and-, up to 64 characters. - Property values are strings (up to 512 characters), numbers, booleans or
null. All properties of one event together must stay under 4 KB.
track: use RevenueCat for purchases and adRevenue for ads.
adRevenue(valueUsd, details?)
Records ad revenue from one paid impression, in USD. It counts as revenue for the install’s source, next to RevenueCat purchases.
getDeferredDeepLink()
Returns the in-app destination of the smart link that brought this install, once, on the first launch. Returns null afterwards, or when there is none.
trialStarted()
Raises the SKAdNetwork / AdAttributionKit conversion value to “trial started”. Call it when a trial starts.
purchased(valueUsd)
Raises the conversion value to the purchase bucket for this amount in USD. Call it after a purchase succeeds.
trialStarted and purchased only update the conversion value on iOS. Revenue itself comes from RevenueCat, so nothing is counted twice. See SKAdNetwork for the value schema.
flush()
Sends queued events now. Returns a promise.
shutdown()
Stops timers and app state listeners. Use it in tests, or before calling init again with a different key.
Options
Without the native module, you can supply the attribution callbacks yourself:
Automatic Events
Sale events (
trial_started, purchase, trial_converted, renewal, refund) do not come from the SDK. They come from RevenueCat. See Revenue.
The first time the app is opened, the SDK also reads the URL it was opened with (Linking.getInitialURL()) to detect campaign links.
Sending and Retries
- Events are queued in AsyncStorage and sent in batches of up to 100.
- A batch is sent every
flushIntervalMs, whenflushAtevents are queued, and when the app goes to the background. - If the server is busy or the device is offline, the SDK keeps the batch and retries later. Each event has an id, so a retried batch is never counted twice.
- The server drops events older than 30 days, more than 10 minutes in the future (a wrong device clock or a very old offline queue), or with properties over 4 KB. The rest of the batch is kept.

