Package | com.tuarua.firebase |
Class | public class Analytics |
Inheritance | Analytics ![]() |
Property | Defined By | ||
---|---|---|---|
analyticsCollectionEnabled : Boolean [write-only]
Sets whether analytics collection is enabled for this app on this device. | Analytics | ||
appInstanceId : String [read-only] The unique ID for this instance of the application. | Analytics | ||
currentScreen : String [write-only]
The name of the current screen. | Analytics | ||
defaultEventParameters : Object [write-only]
Adds parameters that will be set on every event logged from the SDK, including automatic ones. | Analytics | ||
minimumSessionDuration : Number [write-only]
Sets the minimum engagement time in seconds required to start a new session. | Analytics | ||
sessionTimeoutDuration : Number [write-only]
Sets the interval of inactivity in seconds that terminates the current session. | Analytics | ||
userId : String [write-only]
The user ID to ascribe to the user of this app on this device, which must be
non-empty and no more than 256 characters long. | Analytics |
Method | Defined By | ||
---|---|---|---|
dispose():void [static] Disposes the ANE | Analytics | ||
logEvent(name:String, params:Object):void | Analytics | ||
resetAnalyticsData():void Clears all analytics data for this app from the device and resets the app instance id. | Analytics | ||
setUserProperty(name:String, value:String):void | Analytics |
analyticsCollectionEnabled | property |
analyticsCollectionEnabled:Boolean
[write-only] Sets whether analytics collection is enabled for this app on this device. This setting is persisted across app sessions. By default it is enabled.
public function set analyticsCollectionEnabled(value:Boolean):void
appInstanceId | property |
appInstanceId:String
[read-only] The unique ID for this instance of the application.
public function get appInstanceId():String
currentScreen | property |
currentScreen:String
[write-only] The name of the current screen. Should contain 1 to 100 characters. Set to null to clear the current screen name.
public function set currentScreen(value:String):void
defaultEventParameters | property |
defaultEventParameters:Object
[write-only] Adds parameters that will be set on every event logged from the SDK, including automatic ones. The values passed in the parameters dictionary will be added to the dictionary of default event parameters. These parameters persist across app runs. They are of lower precedence than event parameters, so if an event parameter and a parameter set using this API have the same name, the value of the event parameter will be used. The same limitations on event parameters apply to default event parameters.
public function set defaultEventParameters(value:Object):void
minimumSessionDuration | property |
minimumSessionDuration:Number
[write-only] Sets the minimum engagement time in seconds required to start a new session. The default value is 10000 milliseconds.
public function set minimumSessionDuration(value:Number):void
sessionTimeoutDuration | property |
sessionTimeoutDuration:Number
[write-only] Sets the interval of inactivity in seconds that terminates the current session. The default value is 1800000 milliseconds (30 minutes).
public function set sessionTimeoutDuration(value:Number):void
userId | property |
userId:String
[write-only] The user ID to ascribe to the user of this app on this device, which must be non-empty and no more than 256 characters long. Setting userID to null removes the user ID.
public function set userId(value:String):void
dispose | () | method |
public static function dispose():void
Disposes the ANE
logEvent | () | method |
public function logEvent(name:String, params:Object):void
Parameters
name:String — The name of the event. Should contain 1 to 40 alphanumeric characters or underscores. The name must start with an alphabetic character. Some event names are reserved. | |
params:Object — The Object of event parameters. Passing null indicates that the event has no parameters. Parameter names can be up to 40 characters long and must start with an alphabetic character and contain only alphanumeric characters and underscores. Only String and Number parameter types are supported. |
resetAnalyticsData | () | method |
public function resetAnalyticsData():void
Clears all analytics data for this app from the device and resets the app instance id. Android only.
setUserProperty | () | method |
public function setUserProperty(name:String, value:String):void
Parameters
name:String — The name of the user property to set. Should contain 1 to 24 alphanumeric characters or underscores and must start with an alphabetic character. The "firebase_", "google_", and "ga_" prefixes are reserved and should not be used for user property names. | |
value:String — The value of the user property. Values can be up to 36 characters long. Setting the value to null removes the user property. |