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 24 characters long starting with a letter [a-zA-Z] character.

Parameter string values can be up to 36 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);

Inheritance

Inherits from: SystemIDisposable

Constructors and Destructors

Parameter(string parameterName, string parameterValue)
Construct a string parameter.
Parameter(string parameterName, long parameterValue)
Construct a 64-bit integer parameter.
Parameter(string parameterName, double parameterValue)
Construct a floating point parameter.

Public functions

Dispose()
void

Public functions

Dispose

void Dispose()

Parameter

 Parameter(
  string parameterName,
  string parameterValue
)

Construct a string parameter.

Details
Parameters
parameterName
Name of the parameter. Parameter names must be a combination of letters and digits (matching the regular expression [a-zA-Z0-9]) between 1 and 24 characters long starting with a letter [a-zA-Z] character.
parameterValue
String value for the parameter, can be up to 36 characters long.

Parameter

 Parameter(
  string parameterName,
  long parameterValue
)

Construct a 64-bit integer parameter.

Details
Parameters
parameterName
Name of the parameter. Parameter names must be a combination of letters and digits (matching the regular expression [a-zA-Z0-9]) between 1 and 24 characters long starting with a letter [a-zA-Z] character.
parameterValue
Integer value for the parameter.

Parameter

 Parameter(
  string parameterName,
  double parameterValue
)

Construct a floating point parameter.

Details
Parameters
parameterName
Name of the parameter. Parameter names must be a combination of letters and digits (matching the regular expression [a-zA-Z0-9]) between 1 and 24 characters long starting with a letter [a-zA-Z] character.
parameterValue
Floating point value for the parameter.

Send feedback about...

Need help? Visit our support page.