Configuration Options

Full builder option reference

Every option is set through a ConvertSDK.Builder method and is optional except sdkKey(...) or data(...). Set what you need and leave the rest at their defaults. All options mirror the Convert JS SDK's Config type — if you are porting from the JS SDK, each field is reachable through a camelCase builder setter.

val sdk = ConvertSDK.builder(applicationContext)
    .sdkKey("YOUR_SDK_KEY")
    .environment("prod")
    .dataRefreshInterval(600_000)
    .logLevel(LogLevel.INFO)
    .build()

Builder options

MethodPurposeDefault
sdkKey(value)Merchant-facing SDK keyrequired (unless data supplied)
sdkKeySecret(value)Confidential SDK secret — used when the server requires signed requestsnull
data(config)Pre-fetched ConfigResponseData; bypasses the initial network fetchnull
environment(value)"staging" / "prod" hint forwarded with every requestlibrary default
configEndpoint(url)Override the config-fetch URL (staging / on-prem)Convert CDN
trackEndpoint(url)Override the tracking URL (staging / on-prem)Convert tracking endpoint
dataRefreshInterval(millis)Config re-fetch interval600_000 (10 min)
batchSize(size)Maximum events per outbound batchJS-SDK parity
releaseInterval(millis)Minimum delay between flushesJS-SDK parity
hashSeed(seed)MurmurHash3 seed for bucketingJS-SDK parity
maxTraffic(basisPoints)Total traffic basis for bucketing10000
excludeExperienceIdHash(bool)Legacy-account bucketing compatibilityfalse
logLevel(level)Minimum log severityERROR
trackingEnabled(bool)Boot-time tracking switchtrue
cacheLevel(level)HTTP cache directive hint ("default" / "low")"default"
rulesKeysCaseSensitive(bool)Rule-engine key case sensitivitytrue
rulesNegation(str)Rule-engine negation semanticslibrary default

JS-SDK parity hooks

The builder also exposes parity setters that exist so the full JS Config surface is reachable from Android. Set them only when matching specific JS-SDK behavior:

  • rulesComparisonProcessor(value) — the rule-engine comparison-processor identifier (rules.comparisonProcessor in the JS SDK).
  • networkSource(value) — the platform network.source identifier appended to tracking payloads (e.g. "android").
  • mapper(value) — an opaque consumer-supplied object reserved for JS-SDK response-mapping parity.

Notes on key options

  • logLevel accepts LogLevel.ERROR, WARN, INFO, DEBUG, or TRACE. Use DEBUG while integrating; the default ERROR keeps production logs quiet. See Logging.
  • trackingEnabled(false) is the boot-time equivalent of sdk.setTrackingEnabled(false) — useful when consent is unknown at launch. Flip it at runtime once consent resolves. See Tracking Control.
  • dataRefreshInterval drives the foreground config-refresh loop. The loop runs only while the app is in the foreground and only after the first config has loaded.
  • hashSeed, maxTraffic, excludeExperienceIdHash affect bucketing math. Leave them at their defaults unless you are matching a legacy account's bucketing — see the shared Bucketing Algorithm doc.

Logging during development

import com.convert.sdk.core.model.LogLevel

ConvertSDK.builder(context)
    .sdkKey("YOUR_SDK_KEY")
    .logLevel(LogLevel.DEBUG)
    .build()

The SDK logs through android.util.Log under the tag ConvertSDK. Capture logs with:

adb logcat -s ConvertSDK:V

Next steps