For the complete documentation index, see llms.txt. This page is also available as Markdown.

User Identifier & Properties

User Identifier Management

User Identifiers are used to uniquely identify users. For information about the meaning and importance of User Identifiers, and how to choose them, refer to the Manage User Identifiers documentation.

User Identifier

Default Identifiers Provided by Hackle

The Android SDK includes functionality to manage the device's identifier. Therefore, users can be automatically identified without separately providing a User Identifier.

You can query the identifiers managed by the SDK as follows.

// 디바이스ID 가져오기
val deviceId = hackleApp.deviceId

// 세션 ID 가져오기
val sessionId = hackleApp.sessionId

// 사용자 정보 모두 가지고 오기
val user = hackleApp.user

Modify Device ID

You can inject a custom device ID instead of using the device ID provided by Hackle.

// 디바이스 ID 변경
hackleApp.setDeviceId("CUSTOM_DEVICE_ID")

// 빌더 패턴 사용
val user = User.builder()
    .deviceId("CUSTOM_DEVICE_ID") // 디바이스 ID
    .build()

hackleApp.setUser(user)

Set User Identifier (User ID)

You can set the identifier for a logged-in user.

Additional Identifiers

You can add identifier types other than the default identifiers (deviceId, userId) as follows.

Additional identifiers are not integrated with the Hackle ID.

User Property

The Hackle SDK supports adding user properties.

  • Properties must be sent as key-value pairs (Property Key and Property Value).

  • A maximum of 128 properties can be added.

Category
Type
Constraints

Property Key

string

  • Character limit is 128 characters.

  • Case-insensitive.

  • For example, AGE and age are recognized as the same Property Key.

Property Value

boolean, string, number, array

  • For string type, the character limit is 1024 characters.

  • String type is case-sensitive.

  • For example, APPLE and apple are recognized as different Property Values.

  • For number type, up to 15 integer digits and up to 6 decimal places are supported.

Add User Property

You can add a user property simply. Calling the function below works the same as adding a property using set in a PropertyOperations object.

Configure User Properties

You can add or remove user properties.

Supported Functions
Description

set

Sets a User Property. If a Property Value already exists for the Property Key, it is overwritten.

setOnce

Sets a User Property value only once. If a property already exists for the Property Key, it is ignored.

For example, you can use this to set a user's registration date or initial sign-up location.

unset

Removes a User Property.

clearAll

Removes all User Properties.

Instantiate a PropertyOperations object with the user properties you want to configure. Then call updateUserProperties to update the user properties. You can configure multiple properties at once.

Reset User

You need to reset the previously configured information. When reset, all previously configured identifiers and properties are cleared.

Last updated