firebase:: analytics
Firebase Analytics API.
Summary
See the developer guides for general information on using Firebase Analytics in your apps.
Functions |
|
|---|---|
Initialize(const App & app)
|
void
Initialize the Analytics API.
|
LogEvent(const char *name, const char *parameter_name, const char *parameter_value)
|
void
Log an event with one string parameter.
|
LogEvent(const char *name, const char *parameter_name, const double parameter_value)
|
void
Log an event with one float parameter.
|
LogEvent(const char *name, const char *parameter_name, const int64_t parameter_value)
|
void
Log an event with one 64-bit integer parameter.
|
LogEvent(const char *name, const char *parameter_name, const int parameter_value)
|
void
Log an event with one integer parameter (stored as a 64-bit integer).
|
LogEvent(const char *name)
|
void
Log an event with no parameters.
|
LogEvent(const char *name, const Parameter *parameters, size_t number_of_parameters)
|
void
Log an event with associated parameters.
|
SetAnalyticsCollectionEnabled(bool enabled)
|
void
Sets whether analytics collection is enabled for this app on this device.
|
SetMinimumSessionDuration(int64_t milliseconds)
|
void
Sets the minimum engagement time required before starting a session.
|
SetSessionTimeoutDuration(int64_t milliseconds)
|
void
Sets the duration of inactivity that terminates the current session.
|
SetUserId(const char *user_id)
|
void
Sets the user ID property.
|
SetUserProperty(const char *name, const char *property)
|
void
Set a user property to the given value.
|
Terminate()
|
void
Terminate the Analytics API.
|
Structs |
|
|---|---|
|
firebase:: |
Event parameter. |
Functions
Initialize
void Initialize( const App & app )
Initialize the Analytics API.
This must be called prior to calling any other methods in the firebase::analytics namespace.
See also:firebase::App::GetInstance().
| Details | |||
|---|---|---|---|
| Parameters |
|
LogEvent
void LogEvent( const char *name, const char *parameter_name, const char *parameter_value )
Log an event with one string parameter.
See also: LogEvent(const char*, const Parameter*, size_t)
| Details | |||||||
|---|---|---|---|---|---|---|---|
| Parameters |
|
LogEvent
void LogEvent( const char *name, const char *parameter_name, const double parameter_value )
Log an event with one float parameter.
See also: LogEvent(const char*, const Parameter*, size_t)
| Details | |||||||
|---|---|---|---|---|---|---|---|
| Parameters |
|
LogEvent
void LogEvent( const char *name, const char *parameter_name, const int64_t parameter_value )
Log an event with one 64-bit integer parameter.
See also: LogEvent(const char*, const Parameter*, size_t)
| Details | |||||||
|---|---|---|---|---|---|---|---|
| Parameters |
|
LogEvent
void LogEvent( const char *name, const char *parameter_name, const int parameter_value )
Log an event with one integer parameter (stored as a 64-bit integer).
See also: LogEvent(const char*, const Parameter*, size_t)
| Details | |||||||
|---|---|---|---|---|---|---|---|
| Parameters |
|
LogEvent
void LogEvent( const char *name )
Log an event with no parameters.
See also: LogEvent(const char*, const Parameter*, size_t)
| Details | |||
|---|---|---|---|
| Parameters |
|
LogEvent
void LogEvent( const char *name, const Parameter *parameters, size_t number_of_parameters )
Log an event with associated parameters.
An Event is an important occurrence in your app that you want to measure. You can report up to 500 different types of events per app and you can associate up to 25 unique parameters with each Event type.
Some common events are documented in Analytics Events (event_names.h), but you may also choose to specify custom event types that are associated with your specific app.
| Details | |||||||
|---|---|---|---|---|---|---|---|
| Parameters |
|
SetAnalyticsCollectionEnabled
void SetAnalyticsCollectionEnabled( bool enabled )
Sets whether analytics collection is enabled for this app on this device.
This setting is persisted across app sessions. By default it is enabled.
| Details | |||
|---|---|---|---|
| Parameters |
|
SetMinimumSessionDuration
void SetMinimumSessionDuration( int64_t milliseconds )
Sets the minimum engagement time required before starting a session.
Note:The default value is 10000 (10 seconds).
| Details | |||
|---|---|---|---|
| Parameters |
|
SetSessionTimeoutDuration
void SetSessionTimeoutDuration( int64_t milliseconds )
Sets the duration of inactivity that terminates the current session.
Note:The default value is 1800000 (30 minutes).
| Details | |||
|---|---|---|---|
| Parameters |
|
SetUserId
void SetUserId( const char *user_id )
Sets the user ID property.
This feature must be used in accordance with Google's Privacy Policy
| Details | |||
|---|---|---|---|
| Parameters |
|
SetUserProperty
void SetUserProperty( const char *name, const char *property )
Set a user property to the given value.
Properties associated with a user allow a developer to segment users into groups that are useful to their application. Up to 25 properties can be associated with a user.
Suggested property names are listed Analytics User Properties (user_property_names.h) but you're not limited to this set. For example, the "gamertype" property could be used to store the type of player where a range of values could be "casual", "mid_core", or "core".
| Details | |||||
|---|---|---|---|---|---|
| Parameters |
|
Terminate
void Terminate()
Terminate the Analytics API.
Cleans up resources associated with the API.

