Version: stable
CONSTANTS | |
---|---|
MSG_ERROR | |
MSG_INSTANCE_ID |
firebase.analytics.initialize()
Initialise analytics
PARAMETERS
None
firebase.analytics.set_callback(callback)
Sets a callback function for receiving events from the SDK. Call `firebase.analytics.set_callback(nil)` to remove callback
PARAMETERS
callback |
function |
Callback function that is executed on any event in the SDK.
|
firebase.analytics.log(name)
Log an event without parameters.
PARAMETERS
name |
string |
Event name |
firebase.analytics.log_string(name,PARAMeter_name,PARAMeter_value)
Log an event with one string parameter.
PARAMETERS
name |
string |
Event name |
PARAMeter_name |
string |
Parameter name |
PARAMeter_value |
string |
Parameter value |
firebase.analytics.log_int(name,PARAMeter_name,PARAMeter_value)
Log an event with one integer parameter.
PARAMETERS
name |
string |
Event name |
PARAMeter_name |
string |
Parameter name |
PARAMeter_value |
number |
Parameter value |
firebase.analytics.log_number(name,PARAMeter_name,PARAMeter_value)
Log an event with one float parameter.
PARAMETERS
name |
string |
Event name |
PARAMeter_name |
string |
Parameter name |
PARAMeter_value |
number |
Parameter value |
firebase.analytics.log_table(name,parameters_table)
Log an event with table parameters.
PARAMETERS
name |
string |
Event name |
parameters_table |
table |
Table with parameters (key-value pairs) |
firebase.analytics.set_default_event_params(default_params)
Log an event with table parameters.
PARAMETERS
default_params |
table |
Table with default parameters (key-value pairs) |
firebase.analytics.set_user_id(user_id)
Sets the user ID property.
PARAMETERS
user_id |
string |
User ID property |
firebase.analytics.set_user_property(name,property)
Set a user property to the given value.
PARAMETERS
name |
string |
User property name |
property |
string |
User property value |
firebase.analytics.reset()
Clears all data for this app from the device and resets the app instance id.
PARAMETERS
None
firebase.analytics.get_id()
Get the instance ID from the service. Returned in callback with MSG_INSTANCE_ID message_id.
PARAMETERS
None
firebase.analytics.set_enabled(key)
Sets whether analytics collection is enabled for this app on this device.
PARAMETERS
key |
boolean |
The value |
Event generated when an error occurred.
Event generated when instance_id ready after `firebase.analytics.get_id()` call