Stay organized with collections
Save and categorize content based on your preferences.
Firebase.Analytics.Parameter
Event parameter.
Summary
Parameters supply information that contextualize events (see LogEvent). You can associate up to 25 unique Parameters with each event type (name).
Common event types are provided as static properties of the FirebaseAnalytics class (e.g FirebaseAnalytics.EventPostScore) where parameters of these events are also provided in this FirebaseAnalytics class (e.g FirebaseAnalytics.ParameterScore).
You are not limited to the set of event types and parameter names suggested in FirebaseAnalytics class properties. Additional Parameters can be supplied for suggested event types or custom Parameters for custom event types.
Parameter names must be a combination of letters and digits (matching the regular expression [a-zA-Z0-9]) between 1 and 40 characters long starting with a letter [a-zA-Z] character. The "firebase_", "google_" and "ga_" prefixes are reserved and should not be used.
Parameter string values can be up to 100 characters long.
An array of Parameter class instances can be passed to LogEvent in order to associate parameters's of an event with values where each value can be a double, 64-bit integer or string.
For example, a game may log an achievement event along with the character the player is using and the level they're currently on:
using Firebase.Analytics;
int currentLevel = GetCurrentLevel();
Parameter[] AchievementParameters = {
new Parameter(FirebaseAnalytics.ParameterAchievementID,
"ultimate_wizard"),
new Parameter(FirebaseAnalytics.ParameterCharacter, "mysterion"),
new Parameter(FirebaseAnalytics.ParameterLevel, currentLevel),
};
FirebaseAnalytics.LogEvent(FirebaseAnalytics.EventLevelUp,
AchievementParameters);
Constructors and Destructors
|
Parameter(string parameterName, string parameterValue)
|
Parameter(string parameterName, long parameterValue)
|
Parameter(string parameterName, double parameterValue)
|
Parameter(string parameterName, IDictionary< string, object > parameterValue)
|
Parameter(string parameterName, IEnumerable< IDictionary< string, object >> parameterValue)
|
Public functions
Parameter
Parameter(
string parameterName,
string parameterValue
)
Parameter
Parameter(
string parameterName,
long parameterValue
)
Parameter
Parameter(
string parameterName,
double parameterValue
)
Parameter
Parameter(
string parameterName,
IDictionary< string, object > parameterValue
)
Parameter
Parameter(
string parameterName,
IEnumerable< IDictionary< string, object >> parameterValue
)
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-07-24 UTC.
[null,null,["Last updated 2025-07-24 UTC."],[],[],null,["Firebase.Analytics.Parameter\n\nEvent parameter.\n\nSummary\n\nParameters supply information that contextualize events (see LogEvent). You can associate up to 25 unique Parameters with each event type (name).\n\nCommon event types are provided as static properties of the [FirebaseAnalytics](/docs/reference/unity/class/firebase/analytics/firebase-analytics#class_firebase_1_1_analytics_1_1_firebase_analytics) class (e.g [FirebaseAnalytics.EventPostScore](/docs/reference/unity/group/event-names#group__event__names_1gae6c7bae26bf168725550d92fde85686b)) where parameters of these events are also provided in this [FirebaseAnalytics](/docs/reference/unity/class/firebase/analytics/firebase-analytics#class_firebase_1_1_analytics_1_1_firebase_analytics) class (e.g [FirebaseAnalytics.ParameterScore](/docs/reference/unity/group/parameter-names#group__parameter__names_1gac69aa0a217496876f0e5a9aedf98b853)).\n\nYou are not limited to the set of event types and parameter names suggested in [FirebaseAnalytics](/docs/reference/unity/class/firebase/analytics/firebase-analytics#class_firebase_1_1_analytics_1_1_firebase_analytics) class properties. Additional Parameters can be supplied for suggested event types or custom Parameters for custom event types.\n\n[Parameter](/docs/reference/unity/class/firebase/analytics/parameter#class_firebase_1_1_analytics_1_1_parameter) names must be a combination of letters and digits (matching the regular expression \\[a-zA-Z0-9\\]) between 1 and 40 characters long starting with a letter \\[a-zA-Z\\] character. The \"firebase_\", \"google_\" and \"ga_\" prefixes are reserved and should not be used.\n\n[Parameter](/docs/reference/unity/class/firebase/analytics/parameter#class_firebase_1_1_analytics_1_1_parameter) string values can be up to 100 characters long.\n\nAn array of [Parameter](/docs/reference/unity/class/firebase/analytics/parameter#class_firebase_1_1_analytics_1_1_parameter) class instances can be passed to LogEvent in order to associate parameters's of an event with values where each value can be a double, 64-bit integer or string.\n\nFor example, a game may log an achievement event along with the character the player is using and the level they're currently on:\n\n\n```c#\nusing Firebase.Analytics;\n\nint currentLevel = GetCurrentLevel();\nParameter[] AchievementParameters = {\n new Parameter(FirebaseAnalytics.ParameterAchievementID,\n \"ultimate_wizard\"),\n new Parameter(FirebaseAnalytics.ParameterCharacter, \"mysterion\"),\n new Parameter(FirebaseAnalytics.ParameterLevel, currentLevel),\n};\nFirebaseAnalytics.LogEvent(FirebaseAnalytics.EventLevelUp,\n AchievementParameters);\n```\n\n\u003cbr /\u003e\n\nInheritanceInherits from: IDisposable\n\nPublic functions \n\nDispose \n\n```c#\nvoid Dispose()\n``` \n**[Deprecated.](/docs/reference/unity/deprecated/deprecated)**No longer needed, will be removed in the future. \n\nDispose \n\n```c#\nvoid Dispose(\n bool disposing\n)\n``` \n**[Deprecated.](/docs/reference/unity/deprecated/deprecated)**No longer needed, will be removed in the future. \n\nParameter \n\n```c#\n Parameter(\n string parameterName,\n string parameterValue\n)\n``` \n\nParameter \n\n```c#\n Parameter(\n string parameterName,\n long parameterValue\n)\n``` \n\nParameter \n\n```c#\n Parameter(\n string parameterName,\n double parameterValue\n)\n``` \n\nParameter \n\n```c#\n Parameter(\n string parameterName,\n IDictionary\u003c string, object \u003e parameterValue\n)\n``` \n\nParameter \n\n```c#\n Parameter(\n string parameterName,\n IEnumerable\u003c IDictionary\u003c string, object \u003e\u003e parameterValue\n)\n```"]]