Skip to content

Configuration

The TraceConfig object controls SDK behavior. Pass it during initialization.

TraceConfig(
apiKey = "tr_live_xxxxxxxxxxxx", // Required
hashSalt = "your_64_char_hex_salt", // Required
region = Region.US, // US (default) or EU
debug = false // Enable verbose logging
)
ParameterDescription
apiKeyYour app’s API key. Starts with tr_live_ (production) or tr_test_ (sandbox).
hashSalt64-character hex string used for privacy-preserving IP hashing. Unique per app.
ParameterDefaultDescription
regionRegion.USData region. Region.US or Region.EU. Must match the region your app was created in.
debugfalseWhen true, the SDK logs fingerprint data, attribution results, and network calls to the console.

Trace supports US and EU regions. When you create an app, you choose a region. The SDK must be configured with the same region.

// US region (default)
TraceConfig(apiKey = "...", hashSalt = "...", region = Region.US)
// EU region
TraceConfig(apiKey = "...", hashSalt = "...", region = Region.EU)

Data is pinned to the region — EU app data never touches US servers, and vice versa.

Enable debug logging to see what the SDK is doing:

TraceConfig(
apiKey = "tr_live_xxxxxxxxxxxx",
hashSalt = "...",
debug = true
)

With debug = true, the SDK logs:

  • Device fingerprint (screen size, OS version, locale, timezone)
  • Attribution request/response
  • Deep link delivery
  • Event tracking calls

Check Logcat (Android) or Console (iOS) for output tagged Trace.

For unit tests and UI tests, use test mode to avoid network calls:

TraceConfig.test(
simulatedDeepLink = DeepLink(
path = "/product/test_id",
params = mapOf("color" to "blue"),
isDeferred = true
)
)

In test mode:

  • No network requests are made
  • Attribution immediately returns as organic
  • The simulated deep link (if provided) is delivered to your listener
  • All behavior is synchronous and deterministic