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 theFirebaseAnalytics class (e.gFirebaseAnalytics.EventPostScore) where parameters of these events are also provided in thisFirebaseAnalytics class (e.gFirebaseAnalytics.ParameterScore).
You are not limited to the set of event types and parameter names suggested inFirebaseAnalytics 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 ofParameter 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:
usingFirebase.Analytics;intcurrentLevel=GetCurrentLevel();Parameter[]AchievementParameters={newParameter(FirebaseAnalytics.ParameterAchievementID,"ultimate_wizard"),newParameter(FirebaseAnalytics.ParameterCharacter,"mysterion"),newParameter(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(stringparameterName,stringparameterValue)
Parameter
Parameter(stringparameterName,longparameterValue)
Parameter
Parameter(stringparameterName,doubleparameterValue)
Parameter
Parameter(stringparameterName,IDictionary<string,object>parameterValue)
Parameter
Parameter(stringparameterName,IEnumerable<IDictionary<string,object>>parameterValue)
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-07-24 UTC.