이벤트는 사용자 행동, 시스템 이벤트, 오류 등 앱에서 발생하는 상황을 파악하는 수단입니다.
Google Analytics는 몇 가지 이벤트를 자동으로 로깅하며 별도로 코드를 추가하지 않아도 이벤트를 수신할 수 있습니다. 앱에서 데이터를 추가로 수집해야 하는 경우 서로 다른 Analytics 이벤트 유형을 최대 500개까지 로깅할 수 있습니다. 앱에서 로깅할 수 있는 이벤트의 총분량에는 제한이 없습니다.
이벤트 이름은 대소문자를 구분합니다. 이름은 동일하지만 대소문자만 다른 두 이벤트를 로깅하면 서로 다른 이벤트 2개로 인식됩니다.
FirebaseUnity SDK(특히 FirebaseAnalytics.unitypackage)를 Unity 프로젝트에 추가합니다.
Unity 프로젝트에 Firebase를 추가할 때 Firebase Console 및 열려 있는 Unity 프로젝트 모두에서 작업을 수행해야 합니다. 예를 들어 Console에서 Firebase 구성 파일을 다운로드한 후 이 파일을 Unity 프로젝트로 이동하는 작업이 필요합니다.
이벤트 로깅
Firebase.Analytics.FirebaseAnalytics 모듈을 초기화한 후 이를 사용하여 LogEvent() 메서드로 이벤트를 로깅할 수 있습니다.
시작하는 데 도움을 제공하기 위해 Analytics SDK에서는 소매 및 전자상거래, 여행, 게임 앱을 포함한 다양한 유형의 앱에서 공통적으로 사용되는 여러 가지 추천 이벤트를 정의합니다. 이러한 이벤트에 대한 정보와 사용 시점을 자세히 알아보려면 Google 애널리틱스 고객센터의 추천 이벤트를 참조하세요.
// Log an event with multiple parameters, passed as an array:Firebase.Analytics.FirebaseAnalytics.LogEvent(Firebase.Analytics.FirebaseAnalytics.EventSelectContent,newFirebase.Analytics.Parameter(Firebase.Analytics.FirebaseAnalytics.ParameterItemId,id),newFirebase.Analytics.Parameter(Firebase.Analytics.FirebaseAnalytics.ParameterItemName,"name"),newFirebase.Analytics.Parameter(Firebase.Analytics.FirebaseAnalytics.UserPropertySignUpMethod,"Google"),newFirebase.Analytics.Parameter("favorite_food",mFavoriteFood),newFirebase.Analytics.Parameter("user_id",mUserId));
사전 정의된 매개변수뿐 아니라 다음과 같은 매개변수를 이벤트에 추가할 수 있습니다.
맞춤 매개변수: 맞춤 매개변수는 Analytics 보고서에 직접 표시되지 않지만 잠재고객 정의에서 필터로 사용하여 모든 보고서에 적용할 수 있습니다. 앱을 BigQuery 프로젝트에 연결한 경우 BigQuery로 내보내는 데이터에도 맞춤 매개변수가 포함됩니다.
VALUE 매개변수: VALUE는 Analytics 이벤트에 해당하는 핵심 측정항목을 집계하는 데 유용한 범용 매개변수입니다. 수익, 거리, 시간, 점수 등을 예시로 들 수 있습니다.
애플리케이션에 Analytics 이벤트 유형으로 해결되지 않는 특정한 요구사항이 있으면 다음 예시와 같이 커스텀 Analytics 이벤트를 직접 로깅할 수 있습니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-04(UTC)"],[],[],null,["Events provide insight on what is happening in your app, such as user\nactions, system events, or errors.\n\nGoogle Analytics automatically logs some\n[events](https://support.google.com/analytics/answer/9234069) for you;\nyou don't need to add any code to receive them. If your app needs to collect\nadditional data, you can log up to 500 different Analytics event types\nin your app. There is no limit on the total volume of events your app logs.\nNote that event names are case-sensitive and that logging two events whose\nnames differ only in case results in two distinct events.\n\nBefore you begin\n\nBefore you can use\n[Google Analytics](/docs/reference/unity/namespace/firebase/analytics),\nyou need to:\n\n- Register your Unity project and configure it to use Firebase.\n\n - If your Unity project already uses Firebase, then it's already\n registered and configured for Firebase.\n\n - If you don't have a Unity project, you can download a\n [sample app](//github.com/google/mechahamster).\n\n- Add the [Firebase Unity SDK](/download/unity) (specifically, `FirebaseAnalytics.unitypackage`) to\n your Unity project.\n\n| **Find detailed instructions for these initial\n| setup tasks in\n| [Add Firebase to your Unity project](/docs/unity/setup#prerequisites).**\n\nNote that adding Firebase to your Unity project involves tasks both in the\n[Firebase console](//console.firebase.google.com/) and in your open Unity project\n(for example, you download Firebase config files from the console, then move\nthem into your Unity project).\n\nLog events\n\nAfter you have initialized the `Firebase.Analytics.FirebaseAnalytics` module,\nyou can use it to log events with the [`LogEvent()`](/docs/reference/unity/class/firebase/analytics/firebase-analytics#logevent) method.\n\nTo help you get started, the Analytics SDK defines a number of\nrecommended events that are common among different types of apps, including\nretail and ecommerce, travel, and gaming apps. To learn more about these events\nand when to use them, see [Recommended events](https://support.google.com/analytics/answer/9267735)\narticles in the Google Analytics Help Center.\n| **Note:** To get the maximum detail in reports, log the suggested Analytics Events that make sense for your app and their prescribed parameters. This also ensures that you benefit from the latest Google Analytics features as they become available.\n\nYou can find implementation details for recommended events in the following\nlocations:\n\n- Suggested events: see the list of [`Event`](/docs/reference/unity/class/firebase/analytics/firebase-analytics#eventaddpaymentinfo) constants.\n- Prescribed parameters: see the list of [`Parameters`](/docs/reference/unity/class/firebase/analytics/parameter) constants.\n\nThe following example demonstrates how to log a suggested\n[`SELECT_CONTENT`](/docs/reference/unity/class/firebase/analytics/firebase-analytics#eventselectcontent) Event: \n\n```c#\n // Log an event with multiple parameters, passed as an array:\n\nFirebase.Analytics.FirebaseAnalytics.LogEvent(\n Firebase.Analytics.FirebaseAnalytics.EventSelectContent,\n new Firebase.Analytics.Parameter(\n Firebase.Analytics.FirebaseAnalytics.ParameterItemId, id),\n new Firebase.Analytics.Parameter(\n Firebase.Analytics.FirebaseAnalytics.ParameterItemName, \"name\"),\n new Firebase.Analytics.Parameter(\n Firebase.Analytics.FirebaseAnalytics.UserPropertySignUpMethod, \"Google\"),\n new Firebase.Analytics.Parameter(\n \"favorite_food\", mFavoriteFood),\n new Firebase.Analytics.Parameter(\n \"user_id\", mUserId)\n);\n```\n\nIn addition to the prescribed parameters, you can add the following parameters\nto any event:\n\n- Custom parameters: Custom parameters are not represented directly in your\n Analytics reports, but they can be used as filters in\n [Audience](https://support.google.com/firebase/answer/6317509) definitions that can be applied to every report. Custom\n parameters are also included in data [exported to BigQuery](https://support.google.com/firebase/answer/6318765) if\n your app is linked to a BigQuery project.\n\n- `VALUE` Parameter: `VALUE` is a general purpose [parameter](/docs/reference/unity/class/firebase/analytics/parameter)\n that is useful for accumulating a key metric that pertains to an\n Analytics Event. Examples include revenue, distance, time and points.\n\nIf your application has specific needs not covered by a suggested\nAnalytics Event type, you can log your own custom Analytics Events\nas shown in this example: \n\n```c#\nFirebase.Analytics.FirebaseAnalytics.LogEvent(\"custom_progress_event\", \"percent\", 0.4f);\n```\n\nView events in the log output \n\nAndroid\n\nYou can enable verbose logging in the Android Studio Debug Log, to help\nverify that events are being logged properly by the SDK.\nThis includes both automatically and manually logged events.\n\nYou can enable verbose logging with a series of adb commands:\n\n\u003cbr /\u003e\n\n```\nadb shell setprop log.tag.FA VERBOSE\n``` \n\n```\nadb shell setprop log.tag.FA-SVC VERBOSE\n``` \n\n```\nadb logcat -v time -s FA FA-SVC\n```\n\n\u003cbr /\u003e\n\nThis command displays your events in the Android Studio logcat, helping\nyou immediately verify that events are being sent.\n\niOS+\n\nEvents are logged to the console, and can be viewed while running the app\nthrough XCode.\n\nView analytics events in the dashboard\n\nYou can view aggregated statistics about your Analytics Events in the\nFirebase console dashboards. These dashboards update periodically\nthroughout the day. For immediate testing, use the logcat output as described in\nthe previous section.\n\nTo access this data in the Firebase console:\n\n1. In the [Firebase console](//console.firebase.google.com/), open your project.\n2. Select **Analytics** from the menu to view the Analytics reporting dashboard.\n\nThe **Events** tab shows the event reports that are\nautomatically created for each distinct type of Analytics event logged by\nyour app. Read more about the [dashboard](https://support.google.com/analytics/answer/11014767)."]]