Skip to main content
Version: 3.x

Initialization Options

The SDK supports a TapInitOptions object for additional configuration. The structure is shown below (Kotlin example):

data class TapInitOptions(
val userAttributes: HashMap<String, Any>? = null,
val clearPreviousAttributes: Boolean? = false,
)

Configuration Options

KeyDescriptionRequired?
userAttributesUser attributes hash, see usages hereNo
clearPreviousAttributesWill clear our any attributes stored on tapresearch backend for the current userNo

User Attributes in TapInitOptions

Best practice: If user attributes are known at SDK initialization, pass them through initOptions instead of using sendUserAttributes.

Benefit: Faster load times for targeted content.

Clearing Previous Attributes

User attributes sent from the SDK (via TapInitOptions or sendUserAttributes) are stored on the TapResearch backend for targeting purposes.

Use clearPreviousAttributes to remove all previously stored attribute values for a user. This is useful when:

  • A user logs out
  • User data needs to be reset
  • Starting fresh with new attributes