Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Properti pengguna adalah atribut yang Anda tentukan untuk menggambarkan segmen basis
pengguna, seperti preferensi bahasa atau lokasi geografis.
Analytics akan otomatis mencatat beberapa
properti pengguna ke dalam log.
Anda tidak perlu menambahkan kode apa pun untuk mengaktifkannya. Jika aplikasi Anda harus mengumpulkan
data tambahan, Anda dapat menyiapkan hingga 25 properti pengguna Analytics yang berbeda
dalam aplikasi Anda.
Mendaftarkan project Unity Anda dan mengonfigurasikannya agar dapat menggunakan Firebase.
Jika project Unity Anda telah menggunakan Firebase, berarti project tersebut telah terdaftar dan dikonfigurasi untuk Firebase.
Jika belum memiliki project Unity, Anda dapat mendownload aplikasi contoh.
Tambahkan FirebaseUnity SDK (khususnya, FirebaseAnalytics.unitypackage) ke
project Unity Anda.
Perlu diperhatikan bahwa penambahan Firebase ke project Unity Anda memerlukan tindakan baik di
Firebase console maupun di project Unity yang terbuka
(misalnya, Anda mendownload file konfigurasi Firebase dari konsol, lalu memindahkannya
ke project Unity).
Menetapkan properti pengguna
Anda dapat menetapkan properti pengguna Analytics untuk menggambarkan pengguna aplikasi.
Anda dapat menganalisis perilaku berbagai segmen pengguna dengan menerapkan properti
ini sebagai filter pada laporan.
Tambahkan kode untuk menetapkan properti pengguna Analytics dengan
metode SetUserProperty(). Anda dapat menggunakan nama dan
nilai pilihan Anda untuk setiap properti.
Contoh berikut menunjukkan penambahan properti makanan favorit fiktif yang
menetapkan nilai pada string mFavoriteFood ke pengguna aktif:
Pilih Analytics dari menu untuk melihat dasbor pelaporan
Analytics.
Tab User Properties menampilkan daftar properti pengguna yang telah
ditentukan untuk aplikasi Anda. Anda dapat menggunakan properti ini sebagai filter pada banyak
laporan yang tersedia di Google Analytics. Baca selengkapnya tentang
dasbor.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Informasi yang saya butuhkan tidak ada","missingTheInformationINeed","thumb-down"],["Terlalu rumit/langkahnya terlalu banyak","tooComplicatedTooManySteps","thumb-down"],["Sudah usang","outOfDate","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Masalah kode / contoh","samplesCodeIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-09-05 UTC."],[],[],null,["User properties are attributes you define to describe segments of your user\nbase, such as language preference or geographic location.\n\nAnalytics automatically logs some\n[user properties](https://support.google.com/analytics/answer/6317486);\nyou don't need to add any code to enable them. If your app needs to collect\nadditional data, you can set up to 25 different Analytics user properties\nin your app.\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\nSet user properties\n\nYou can set Analytics user properties to describe the users of your app.\nYou can analyze behaviors of various user segments by applying these\nproperties as filters to your reports.\n\nSet a user property as follows:\n\n1. [Register](https://support.google.com/analytics/answer/6317519) the property in the **Analytics** tab\n of the [Firebase console](//console.firebase.google.com/).\n\n2. Add code to set an Analytics user property with the\n [`SetUserProperty()`](/docs/reference/unity/class/firebase/analytics/firebase-analytics#setuserproperty) method. You can use the name and\n value of your choosing for each property.\n\nThe following example shows adding a hypothetical favorite food property, which\nassigns the value in the string `mFavoriteFood` to the active user: \n\n```c#\nFirebase.Analytics.FirebaseAnalytics.SetUserProperty(\"favorite_food\", \"ice cream\");\n```\n| **Note:** After the property is registered, it can take several hours for data collected with the property to be included in reports. When the new data is available, the user property can be used as a report filter.\n\nYou can access this data as follows:\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 **User Properties** tab shows a list of user properties that you have\ndefined for your app. You can use these properties as a filter on many of the\nreports available in Google Analytics. Read more about the\n[dashboard](https://support.google.com/analytics/answer/11014767).\n| **Note:** Data in the Analytics reporting dashboard refreshes periodically throughout the day."]]