# 사용자 식별자

각각의 개별 사용자를 식별하는 용도로 사용하는 값으로, 매우 중요한 값입니다.

핵클에서 제공하는 기능은 행동을 기반으로 합니다.\
따라서 사용자 행동을 정확히 분석하기 위해서는 **사용자**를 식별하는 기준이 명확해야 합니다.

특정 사용자가 누군지 명확히 식별할 수 있어야 해당 사용자의 구매, 검색, 상품 조회 등의 이력을 바탕으로 사용자당 구매 금액, 검색 전환율, 상품 페이지 조회 수와 같은 목표를 정확하게 계산할 수 있습니다.

{% hint style="info" %}
식별자는 중복이 없는 유일한 값(unique value)이어야 합니다.\
예를 들어 회원 번호, 사용자 기기 번호와 같이 사용자를 특정할 수 있는 값을 의미합니다.
{% endhint %}

### 기본 사용자 식별자

핵클에 다양한 사용자 식별자를 전송할 수 있지만 가장 기본적인 식별자는 User ID와 Device ID입니다.

<table><thead><tr><th width="146.5703125">식별자</th><th>설명</th></tr></thead><tbody><tr><td><strong>DeviceID</strong></td><td>사용자가 서비스를 사용할 때 쓰게 되는 핸드폰, PC, 태블릿과 같은 기기의 고유 식별자를 의미합니다.<br>UserID 설정에 관계없이 동일하게 유지됩니다.</td></tr><tr><td><strong>HackleDeviceId</strong></td><td>별도로 Device ID를 설정하지 않았다면 이 값으로 DeviceID가 세팅됩니다.</td></tr><tr><td><strong>UserID</strong></td><td>서비스 내의 사용자를 고유하게 식별할 수 있는 회원 번호를 의미합니다.<br>사용자가 로그인 혹은 회원가입 후 생성된 ID 값을 설정하는 것을 권장합니다.</td></tr><tr><td><strong>HackleID</strong></td><td><a href="/pages/bsthCgxvKp2Buvm98za0">핵클에서 제공하는 통합 식별자</a> 입니다.<br>User ID, Device ID가 전송되면 두 정보를 조합한 '핵클 통합 식별자'가 생성되어 더 정확하게 동일한 사용자를 식별할 수 있습니다.</td></tr><tr><td>SessionID</td><td>사용자의 연속된 행동동안 유지되는 <a href="/pages/qOxty6cGNEB0FuabMXDo">세션 ID</a> 입니다.</td></tr><tr><td><strong>ID</strong><br>(deprecated)</td><td>과거에 기본 식별자로 사용되던 식별자입니다.<br>Device ID 혹은 User ID 중에 프론트/서버에서 같은 값으로 전송할 수 있는 값을 보내주시면 됩니다.<br>프론트 SDK의 경우 별도 설정을 하지않으면 Device ID와 동일한 값이 그대로 ID로 전송됩니다. 즉 ID, Device ID, Hackle Device ID가 모두 같은 값을 가지게 됩니다.</td></tr></tbody></table>

### 추가로 보낼 수 있는 사용자 식별자

기본적으로 사용하는 사용자 식별자 외에 'Custom 유형'의 식별자를 추가로 전송할 수 있습니다.

#### Custom 유형

서비스에 맞게 직접 정의하신 사용자 식별자를 의미합니다.\
예를 들어, 커머스라면 Session ID, 주문 번호 등을 사용하실 수 있습니다. 단, Custom 유형은 핵클 통합 식별자를 사용할 수 없습니다.

{% hint style="danger" %}
광고 ID (GAID, IDFA) 사용 시 유의사항

해당 ID를 수집할 때에는 Google 및 Apple의 정책을 반드시 따라야 합니다. 각 사의 정책에 대해서는 아래 링크를 참고하시기 바랍니다.

* [Google 광고 ID 사용 시 유의사항](https://developer.android.com/training/articles/user-data-ids?hl=ko#advertising-ids)
* [Apple의 사용자 개인정보 보호 및 데이터 사용 안내](https://developer.apple.com/kr/app-store/user-privacy-and-data-use/)
  {% endhint %}


---

# Agent Instructions: 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:

```
GET https://docs.hackle.io/getting-started/user-identifier.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
