Skip to content

Quick Start

This guide walks you through creating an app, installing the SDK, and getting your first attributed install.

  • A Trace account with an API key and hash salt
  • An Android or iOS app project
  1. Create your app

    Use the Trace CLI or API to register your app. You’ll get an API key (e.g. tr_live_xxxx) and a hash salt (64-character hex string).

  2. Add the SDK

    Add the Trace SDK to your build.gradle.kts:

    dependencies {
    implementation("io.traceclick:sdk:<version>")
    }
  3. Initialize on app launch

    class MyApp : Application() {
    override fun onCreate() {
    super.onCreate()
    TraceAndroid.initialize(
    application = this,
    config = TraceConfig(
    apiKey = "tr_live_xxxxxxxxxxxx",
    hashSalt = "your_64_char_hex_salt",
    region = Region.US
    )
    )
    }
    }

    That’s it. The SDK automatically reports the install to Trace and performs attribution on first launch.

  4. Create a short link

    Terminal window
    curl -X POST https://api.traceclick.io/v1/links \
    -H "X-Api-Key: tr_live_xxxxxxxxxxxx" \
    -H "Content-Type: application/json" \
    -d '{
    "deepLinkPath": "/welcome",
    "campaignId": "launch_campaign",
    "fallbackUrl": "https://yourapp.com"
    }'

    Response:

    {
    "shortCode": "abc123",
    "shortUrl": "https://yourapp.traceclick.io/l/abc123"
    }
  5. Handle the deep link

    TraceAndroid.setDeepLinkListener { deepLink ->
    // deepLink.path = "/welcome"
    // deepLink.isDeferred = true (arrived via install attribution)
    navigateTo(deepLink.path)
    }
  1. You created a short link with a deep link path of /welcome
  2. When a user clicks that link, Trace records the click and redirects to the app store
  3. After the user installs and opens the app, the SDK calls Trace
  4. Trace matches the install to the click and returns the attribution result
  5. The deferred deep link (/welcome) is delivered to your listener
  • Android setup — full integration guide including deep link routing
  • iOS setup — Universal Links, SwiftUI integration
  • Deep links — type-safe routing, auth gates, deferred link handling
  • Links API — create and manage short links programmatically