Skip to content

사용자 ID 설정

이 참조 문서에서는 Android 또는 FireOS 앱에서 사용자 ID를 설정하는 방법, 제안된 사용자 ID 명명 규칙 및 몇 가지 모범 사례를 보여줍니다.

User IDs should be set for each of your users. These should be unchanging and accessible when a user opens the app. Naming your user IDs correctly from the start is one of the most crucial steps when setting up user IDs. We strongly suggest using the Braze standard of UUIDs and GUIDs (detailed below). We also strongly recommend providing this identifier as it will allow you to:

  • Track your users across devices and platforms, improving the quality of your behavioral and demographic data.
  • Import data about your users using our user data API.
  • Target specific users with our messaging API for both general and transactional messages.

추천 사용자 ID 명명 규칙

At Braze, we strongly recommend naming user IDs, also referred to as external IDs, in a UUIDs and GUIDs format. UUIDs and GUIDs are universally unique identifiers that consist of a 128-bit number used to identify information in computer systems. This means that these UUIDs are long, random and well distributed. If you choose a different method in which to name your user IDs, they must also be long, random and well distributed. It is also important to note, that user IDs are case sensitive. For example, “Abcdef” is a different user from “abcdef”.

If you find your user IDs include names, email addresses, timestamps, or incrementors, we suggest using a new naming method that is more secure so that your user IDs are not as easy to guess or impersonate. If you choose to include this in your user IDs, we strongly recommend adding our SDK authentication feature to prevent user impersonation.

Providing this information to others may allow people outside your organization to glean information on how your user IDs are structured, opening up your organization to potentially malicious updates or removal of information. Choosing the correct naming convention from the start is one of the most important steps in setting up user IDs. However, a migration is possible using our external ID migration endpoint.

User ID Naming  
Recommended Not Recommended
123e4567-e89b-12d3-a456-836199333115 JonDoe829525552
8c0b3728-7fa7-4c68-a32e-12de1d3ed2d5 Anna@email.com
f0a9b506-3c5b-4d86-b16a-94fc4fc3f7b0 CompanyName-1-2-19
2d9e96a1-8f15-4eaf-bf7b-eb8c34e25962 jon-doe-1-2-19

사용자 ID 할당

사용자가 식별되는 즉시(일반적으로 로그인 후) 다음 호출을 수행하여 사용자 ID를 설정해야 합니다.

1
Braze.getInstance(context).changeUser(YOUR_USER_ID_STRING);
1
Braze.getInstance(context).changeUser(YOUR_USER_ID_STRING)

또한 사용자가 로그아웃할 때 사용자 ID를 변경하지 않는 것이 좋습니다. 이전에 로그인한 사용자를 재참여 캠페인에서 타겟팅할 수 없기 때문입니다. 여러 사용자가 동일한 기기를 사용할 것으로 예상되지만 앱에서 로그아웃한 상태일 때 사용자 중 한 명만을 타겟팅하려는 경우, 로그아웃 상태에서 타겟팅하려는 사용자 ID를 별도로 추적하고 앱의 로그아웃 프로세스의 일환으로 해당 사용자 ID로 전환하는 방법을 권장합니다.

자세한 내용은 changeUser 문서를 참조하세요.

사용자 ID 통합 모범 사례 및 참고 사항

Automatic preservation of anonymous user history

Identification Context Preservation Behavior
User has not been previously identified Anonymous history is merged with user profile upon identification.
User has been previously identified in-app or via API Anonymous history is not merged with user profile upon identification.

Refer to Identified user profiles for more information on what occurs when you identify anonymous users.

Additional notes and best practices

Note the following:

  • If your app is used by multiple people, you can assign each user a unique identifier to track them.
  • After a user ID has been set, you cannot revert that user to an anonymous profile.
  • Do not change the user ID when a user logs out as this can separate the device from the user profile.
    • As a result, you won’t be able to target the previously logged out user with re-engagement messages. If you anticipate multiple users on the same device, but only want to target one of them when your app is in a logged-out state, we recommend separately keeping track of the user ID you want to target while logged out and switching back to that user ID as part of your app’s logout process. By default, only the last user that was logged in will receive push notifications from your app.
  • Switching from one identified user to another is a relatively costly operation.
    • When you request the user switch, the current session for the previous user is automatically closed and a new session is started. Braze will automatically make a data refresh request for in-app messages and other Braze resources for the new user.

사용자 별칭 지정

A user alias serves as an alternative unique user identifier. You can use aliases to identify users along different dimensions than your core user ID:

  • Set a consistent identifier for analytics that will follow a given user both before and after they have logged in to a mobile app or website.
  • Add the identifiers used by a third-party vendor to your Braze users in order to more easily reconcile your data externally.

Each alias consists of two parts: a name for the identifier itself, and a label indicating the type of alias. Users can have multiple aliases with different labels, but only one name per label.

For more information on setting user aliases against a user profile, refer to User aliases.

1
Braze.getInstance(context).getCurrentUser().addAlias(ALIAS_NAME, ALIAS_LABEL);
1
Braze.getInstance(context).currentUser?.addAlias(ALIAS_NAME, ALIAS_LABEL)
이 페이지가 얼마나 도움이 되었나요?
New Stuff!