Skip to main content
The Kotlin SDK records installs, sessions, screens and your own events, and links each install to the RevenueCat or Superwall customer. It sends the same data as the React Native SDK, so the dashboard, attribution and revenue work the same way.
  • No advertising id. The install id is a random UUID stored in the app.
  • Events are queued on the device and sent in batches. They survive offline periods and app restarts.
  • Reads the Google Play Install Referrer on the first launch, so installs from a smart link are attributed exactly and can open a deferred deep link.
  • Android 6.0 (API 23) or later. Kotlin coroutines and the AndroidX process lifecycle, no HTTP or JSON library.
The source is on GitHub: appeeky/analytics-android.

Setup

1

Turn on Analytics for the app

In Appeeky, open the app under My Apps → Attribution and click Turn on attribution. Copy the publishable key (apk_pub_…). See the Quickstart for the API call.
2

Add the dependency

The SDK is published through JitPack:
It brings kotlinx-coroutines-android, androidx.lifecycle:lifecycle-process and the Play Install Referrer library, and adds the INTERNET permission.
3

Configure the SDK in your Application

The SDK sends to https://ingest.appeeky.com/v1/ingest. For a self-hosted server, pass endpoint = "https://analytics.example.com/v1/ingest".When configure runs in Application.onCreate(), the SDK reads the launch Intent of the first Activity itself, so campaign links (?aky_c=spring, utm_*) are attributed.
4

Link the install to RevenueCat or Superwall

With Superwall, pass the same user id you give Superwall.instance.identify(userId).
5

Track screens

With Jetpack Navigation:

Methods

Event names may use letters, digits, _, ., : and -, up to 64 characters. An event with another name is dropped on the device and logged when debug = true. Property values are strings (up to 512 characters), numbers, booleans or null.

Ad revenue

Options


Automatic Events

Foreground and background come from ProcessLifecycleOwner, so they follow the whole app, not single Activities.
On Android a smart link sends the visitor to Google Play with the campaign, the link and the click in the install referrer. On the first launch the SDK reads the referrer once and sends it with the first batch:
  • A referrer with aky_l is attributed to that smart link.
  • utm_* without it counts as a Play referrer campaign.
  • utm_source=google-play&utm_medium=organic is organic.
If the link has an in-app destination, open it on the first launch:
Installs from outside Google Play have no referrer.

Delivery and Storage

  • Up to 100 events per request.
  • No network, HTTP 429 or 5xx: the batch stays queued and is retried with backoff (5 s, doubling, up to 5 minutes). Event ids stay the same, so a retry is not counted twice.
  • Other 4xx responses drop the batch.
  • The install id, session state and queue are kept in the app’s no-backup directory. Auto Backup never copies them, so a restored or new device counts as a new install.
  • The SDK uses no reflection and ships its own consumer rules, so R8 / ProGuard needs nothing extra.

Privacy

The SDK sends the install id, app version and build, Android version, device model, locale, the install referrer and launch URL of the first launch, and the events you track. It never reads the advertising id, Android id or other device identifiers. In the Play Console’s Data safety form, declare App activity → App interactions, and Financial info → Purchase history if you use RevenueCat or Superwall, as collected, not shared and not used for advertising. See Privacy.