Configuration
TraceConfig
Section titled “TraceConfig”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)Required parameters
Section titled “Required parameters”| Parameter | Description |
|---|---|
apiKey | Your app’s API key. Starts with tr_live_ (production) or tr_test_ (sandbox). |
hashSalt | 64-character hex string used for privacy-preserving IP hashing. Unique per app. |
Optional parameters
Section titled “Optional parameters”| Parameter | Default | Description |
|---|---|---|
region | Region.US | Data region. Region.US or Region.EU. Must match the region your app was created in. |
debug | false | When true, the SDK logs fingerprint data, attribution results, and network calls to the console. |
Regions
Section titled “Regions”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 regionTraceConfig(apiKey = "...", hashSalt = "...", region = Region.EU)Data is pinned to the region — EU app data never touches US servers, and vice versa.
Debug mode
Section titled “Debug mode”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.
Test mode
Section titled “Test mode”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