Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Le proprietà utente sono attributi che definisci per descrivere i segmenti della tua base utenti, come la preferenza della lingua o la posizione geografica.
Analytics registra automaticamente alcune
proprietà utente;
non devi aggiungere alcun codice per abilitarle. Se la tua app deve raccogliere
dati aggiuntivi, puoi configurare fino a 25 proprietà utente Analytics diverse
nella tua app.
Registra il tuo progetto Unity e configuralo in modo che utilizzi Firebase.
Se il tuo progetto Unity utilizza già Firebase, è già
registrato e configurato per Firebase.
Se non hai un progetto Unity, puoi scaricare un'app di esempio.
Aggiungi l'SDK FirebaseUnity (in particolare, FirebaseAnalytics.unitypackage) al tuo progetto Unity.
Tieni presente che l'aggiunta di Firebase al tuo progetto Unity comporta attività sia nella
Firebase console sia nel progetto Unity aperto
(ad esempio, scarichi i file di configurazione Firebase dalla console, poi li sposti
nel progetto Unity).
Impostare le proprietà utente
Puoi impostare le proprietà utente Analytics per descrivere gli utenti della tua app.
Puoi analizzare i comportamenti di vari segmenti di utenti applicando queste
proprietà come filtri ai report.
Aggiungi il codice per impostare una proprietà utente Analytics con il metodo
SetUserProperty(). Puoi utilizzare il nome e il valore che preferisci per ogni proprietà.
L'esempio seguente mostra l'aggiunta di una proprietà ipotetica di cibo preferito, che
assegna il valore nella stringa mFavoriteFood all'utente attivo:
Seleziona Analytics dal menu per visualizzare la dashboard dei report Analytics.
La scheda Proprietà utente mostra un elenco delle proprietà utente che hai
definito per la tua app. Puoi utilizzare queste proprietà come filtro in molti dei
report disponibili in Google Analytics. Scopri di più sulla
dashboard.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Mancano le informazioni di cui ho bisogno","missingTheInformationINeed","thumb-down"],["Troppo complicato/troppi passaggi","tooComplicatedTooManySteps","thumb-down"],["Obsoleti","outOfDate","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Problema relativo a esempi/codice","samplesCodeIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-08-30 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."]]