Skip to main content
This is the recommended way to integrate without the SDK. You add two Kotlin files, configure your token, and call typed methods that mirror the SDK. The client collects all device signals, manages the install instance ID, and retries failed requests.

1. Add dependencies

2. Add permissions and queries

In AndroidManifest.xml:
For Meta attribution, add your Facebook App ID inside <application>:

3. Add the device data collector

Create LinkrunnerDeviceData.kt. This gathers everything Linkrunner uses for matching. See Collecting device data for what each field means.

4. Add the client

Create LinkrunnerClient.kt. It authenticates with your project token in the request body.

5. Initialize and read attribution

Call configure once, then init, then poll getAttributionData. The Application class is a good place.

6. Identify the user

Call signup when the user signs up or logs in. Events and payments are only stored for attributed users.

7. Track events and payments

Add amount as a number in event or payment data to enable revenue sharing with Google and Meta.

Other endpoints

The client also wraps the remaining endpoints:

Retries and idempotency

The client retries failed requests up to 3 times with exponential backoff (1s, 2s, 4s). It retries on network errors and on HTTP 408, 429, and 5xx. Other responses, such as 400 or 401, are not retried. A retry can send the same request twice if the first attempt reached the server but the response was lost. How that is handled depends on the endpoint:
payment_id is required for capturePayment, and a unique value ensures retries cannot double count revenue. Events have no server-side deduplication, so if exact event counts matter, disable retries for those calls.

Troubleshooting

Make sure init ran on the device, not your backend, and that gaid and install_ref are present in device_data. Without them, only organic installs resolve. See Collecting device data.
Events and payments are only stored for attributed users. Call signup first, and use the same install_instance_id everywhere.
You are likely calling from your backend. The server matches on the calling IP, so calls must come from the user’s device.
You are over the 25 requests per second per token limit. The client already retries with backoff. Slow down bursty calls.
Need help? Contact support@linkrunner.io