Google Analytics에는 앱을 사용하는 개인의 사용자 ID를 저장할 수 있는 setUserID 호출이 포함되어 있습니다. 이 호출(선택사항)은 일반적으로 조직에서 Analytics를 BigQuery와 함께 사용하여 다양한 앱과 기기, 여러 분석 제공업체가 동일한 사용자에 대해 제공하는 분석 데이터를 연결하는 데 사용합니다.
유효한 사용자 ID를 구성하는 방법에는 여러 가지가 있습니다. 한 가지 방법은 개발자가 할당하는 식별자를 사용하여 개발자만 개인 사용자를 역추적할 수 있도록 만드는 것입니다. 예를 들기 위해 AwesomeGameCompany라는 모바일 게임 개발업체가 있다고 가정해 보겠습니다. 이 개발업체에서는 모든 사용자를 대상으로 자체적인 내부 AwesomeGameCompanyID를 발급합니다. 외부 조직이 AwesomeGameCompanyID를 사용해 원래 사용자를 역추적하는 것이 불가능하다면 AwesomeGameCompanyID(또는 AwesomeGameCompanyID의 해시 표시 버전)를 Analytics의 사용자 ID 값으로 사용할 수 있습니다.
그러면 한 사용자가 모든 게임에 지출하는 총액 등의 값을 계산할 수 있게 됩니다.
반드시 사용자 ID를 설정해야 Analytics가 작동하는 것은 아닙니다.
한 기기에서 동일한 앱에 대한 동일한 사용자에게 속한 이벤트를 찾는 것에만 관심이 있다면 user_pseudo_id를 사용할 수 있습니다.
이 값은 Analytics에서 자동으로 생성되어 BigQuery 내에 각 이벤트별로 저장됩니다.
[null,null,["최종 업데이트: 2025-08-30(UTC)"],[],[],null,["Google Analytics has a `setUserID` call, which allows you to\nstore a user ID for the individual using your app. This call is optional, and\nis generally used by organizations that want to use Analytics\nin conjunction with BigQuery to associate analytics data for the same user across\nmultiple apps, multiple devices, or multiple analytics providers.\n| **Note:** You are responsible for ensuring that your use of the user ID is in accordance with the [Google Analytics Terms of Service](https://www.google.com/analytics/terms/). This includes avoiding the use of impermissible personally identifiable information, and providing appropriate notice of your use of identifiers in your Privacy Policy. Your user ID must not contain information that a third party could use to determine the identity of an individual user. For example, you cannot use a user's email address or social security number as a user ID.\n\nThere are many ways you can construct valid user IDs. One approach is to use an\nidentifier you assign and only you can track back to an individual user. For one\npossible example, consider a hypothetical mobile game developer,\nAwesomeGameCompany, that has their own internal `AwesomeGameCompanyID` that they\ncreate for every user. If it isn't possible for an outside organization to track\nthat `AwesomeGameCompanyID` back to the original user, they might consider using\nthat `AwesomeGameCompanyID` --- or, better yet, a hashed version of\n`AwesomeGameCompanyID` --- as the user ID value for Analytics.\nThis would then allow them to calculate values such as a user's total spend\nacross all of their games.\n\nSetting a user ID is never required for Analytics to work correctly.\nIf you're only interested in finding events belonging to the same user for the\nsame app on a single device, you can use the `user_pseudo_id`.\nThis value is generated automatically by Analytics and is\nstored within BigQuery for each event.\n\nSetting the user ID\n\nYou can set a user ID with the following method: \n\nSwift\n\n\n**Note:** This Firebase product is not available on the macOS target. \n\n```swift\nAnalytics.setUserID(\"123456\")\n```\n\nObjective-C\n\n\n**Note:** This Firebase product is not available on the macOS target. \n\n```objective-c\n[FIRAnalytics setUserID:@\"123456\"]\n```\n\nAndroid \n\n```java\nmFirebaseAnalytics.setUserId(\"123456\");\n```\n\nWeb \n\n```java\nimport { getAnalytics, setUserId } from \"firebase/analytics\";\n\nconst analytics = getAnalytics();\nsetUserId(analytics, \"123456\");\n```\n\nWeb \n\n```java\nfirebase.analytics().setUserId(\"123456\");\n```\n\nDart \n\n```dart\nawait FirebaseAnalytics.instance.setUserId(id: '123456');\n```\n\nUnity \n\n```c#\nFirebase.Analytics.FirebaseAnalytics.SetUserID(\"123456\");\n```\n\nC++ \n\n```c++\nanalytics::SetUserId(\"123456\");\n```\n\nAfter setting a user ID, all future events will be automatically tagged\nwith this value, and you can access it by querying for the `user_id`\nvalue in BigQuery. Adding a user ID will not affect any\nevents previously recorded by Google Analytics.\n\nTo find out more about accessing Analytics data in BigQuery, please see\nthis [development guide](https://cloud.google.com/solutions/mobile/mobile-firebase-analytics-big-query)."]]