Skip to main content
Version: 3.x

Initialization Options

We support an additional TapInitOptions hash to handle aditional configuration. It's current structure is looks like this below (kotlin example):

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

Values and usages

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

userAttributes in TapInitOptions

If user attributes are known at SDK initialization, it is preferable to pass them through initOptions compared to using sendUserAttributes. This will result in quicker load times for targeted content.

Clearing previous attributes

Any time user attributes are sent from the sdk. Either through TapInitOptions or from the sendUserAttributes method, we store them on our end to use for user targeting. clearPreviousAttributes will remove any previous values attributes stored for that user.