> For the complete documentation index, see [llms.txt](https://docs.hackle.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hackle.io/development-guide/sdk/user-identifier.md).

# 사용자 식별자와 속성

## 식별자

{% hint style="info" %}
사용자 식별자의 의미와 중요성, 선택하는 기준 등에 대해서는 [사용자 식별자 관리하기](/getting-started/user-identifier.md) 문서를 참고하시기 바랍니다.
{% endhint %}

사용자 식별자는 사용자를 고유하게 식별하는 목적으로 사용합니다.\
핵클 SDK를 통해 사용자 식별자를 관리할 수 있습니다.

<table><thead><tr><th width="199.671875">구분</th><th>설명</th></tr></thead><tbody><tr><td><a href="/pages/X9yrGMTqRfkKtIwBnmIT">클라이언트</a></td><td>클라이언트에서는 내부적으로 사용자 식별자를 관리합니다.<br>클라이언트에서는 크게 2가지 식별자를 사용합니다.<br>- 핵클 SDK에서 제공하는 디바이스 ID<br>- 사용자 지정 식별자</td></tr><tr><td><a href="/pages/HgToCUd3Yp2eaeQvKnxd">서버</a></td><td>서버에서는 내부적으로 사용자 식별자를 관리하지 않습니다.<br>서버의 모든 요청에 대해서 사용자 식별자 항상 전달해야 합니다.</td></tr></tbody></table>

## 속성(Property)

핵클 SDK는 사용자(User) 객체에 속성을 추가할 수 있도록 지원합니다.\
사용자 속성으로 사용자별 정보를 전송하면 반복적인 코드 작업을 줄이면서도 A/B테스트나 데이터 분석에서 다양하게 활용할 수 있습니다.

* 속성은 속성명(key)과 속성값(value)을 한 쌍으로 보내야 합니다.
* 추가 가능한 속성 개수는 최대 128개입니다.

<table><thead><tr><th width="133.04296875">구분</th><th width="127.60546875">타입</th><th>제약사항</th></tr></thead><tbody><tr><td>속성 명(key)</td><td><code>string</code></td><td><ul><li>글자수 제한은 128자입니다. (128 characters)</li><li>대소문자를 구분하지 않습니다.</li><li>예를 들어 AGE와 age는 동일한 속성명으로 인식합니다.</li></ul></td></tr><tr><td>속성 값(value)</td><td><code>boolean</code>, <code>string</code>, <code>number</code>, <code>array</code></td><td><ul><li>string 타입인 경우 글자수 제한은 1024자입니다.<br>(1024 characters)</li><li>string 타입은 대소문자를 구분합니다.</li><li>예를 들어 APPLE과 apple은 서로 다른 속성값으로 인식합니다.</li><li>number 타입인 경우 정수 최대 15자리, 소수점 최대 6자리를<br>지원합니다.</li></ul></td></tr></tbody></table>

### 예시

사용자(User) 객체는 테스트 그룹 분배, 기능 플래그 결정, 사용자 이벤트 전송에서 파라미터로 사용됩니다. 아래 예시에서는 세 가지 속성(age, grade, is\_paying\_user)을 추가한 것을 확인할 수 있습니다.

```java
import io.hackle.android.HackleApp
import io.hackle.sdk.common.User
import io.hackle.sdk.common.Variation
  
User user = User.builder()
  	.userId(userId)
    .property("age", 30)
    .property("grade", "GOLD")
    .property("is_paying_user", false)
    .build();
    
// 테스트 그룹 분배  
Variation variation = hackleApp.variation(experimentKey, user);

// 기능 플래그 결정
boolean featureOn = hackleApp.isFeatureOn(featureKey, user);

// 사용자 이벤트 전송
hackleApp.track(event, user);
```

```kotlin
import io.hackle.android.Hackle
import io.hackle.sdk.common.User
import io.hackle.sdk.common.Variation
  
val user = Hackle.user() {
  	userId(userId)
    property("age", 30)
    property("grade", "GOLD")
    property("is_paying_user", false)
}
    
// 테스트 그룹 분배
val variation = hackleApp.variation(experimentKey, user)

// 기능 플래그 결정
val featureOn = hackleApp.isFeatureOn(featureKey, user)

// 사용자 이벤트 전송
hackleApp.track(event, user)
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.hackle.io/development-guide/sdk/user-identifier.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
