Package | com.distriqt.extension.facebook.appevents |
Class | public class AppEvent |
Inheritance | AppEvent Object |
This class represents data to be used for sending Facebook App Events.
Note that only the eventName is required. parameters and valueToSum are optional.
See also
Property | Defined By | ||
---|---|---|---|
eventName : String
The name of the event. | AppEvent | ||
parameters : Object [read-only]
A key/value object storing additional parameters to be sent with the event (optional)
Keys must be of type String, while their values must either be a String or a Number. | AppEvent | ||
valueToSum : Number = 0
The valueToSum value for the event (optional).
These values are aggregated and averaged in Facebook insights for each event type
Setting this value to 0 will cause it to be ignored and not sent with your event. | AppEvent |
Method | Defined By | ||
---|---|---|---|
AppEvent(eventName:String, valueToSum:Number = 0)
Constructor
| AppEvent | ||
removeParameter(key:String):AppEvent
Removes a parameter from this event
| AppEvent | ||
setEventName(name:String):AppEvent | AppEvent | ||
setParameter(key:String, value:*):AppEvent
Adds or updates a parameter for this event
Keys must be of type String, while their values must either be a String or a Number. | AppEvent | ||
setValueToSum(value:Number):AppEvent | AppEvent | ||
toObject():Object | AppEvent |
eventName | property |
public var eventName:String
The name of the event. May be one of the standard Facebook event types or any custom name.
See also
parameters | property |
parameters:Object
[read-only]
A key/value object storing additional parameters to be sent with the event (optional)
Keys must be of type String, while their values must either be a String or a Number. Anything which does not match these types will be converted to a String.
While you can modify this object directly, it's recommended to use the setParameter and removeParameter methods to ensure data validation.
public function get parameters():Object
valueToSum | property |
public var valueToSum:Number = 0
The valueToSum value for the event (optional).
These values are aggregated and averaged in Facebook insights for each event type
Setting this value to 0 will cause it to be ignored and not sent with your event. This is the default value.
AppEvent | () | Constructor |
public function AppEvent(eventName:String, valueToSum:Number = 0)
Constructor
ParameterseventName:String | |
valueToSum:Number (default = 0 )
|
removeParameter | () | method |
public function removeParameter(key:String):AppEvent
Removes a parameter from this event
Parameters
key:String — String - name of the parameter
|
AppEvent — AppEvent instance for chaining calls
|
setEventName | () | method |
public function setEventName(name:String):AppEvent
Parameters
name:String |
AppEvent — AppEvent instance for chaining calls
|
setParameter | () | method |
public function setParameter(key:String, value:*):AppEvent
Adds or updates a parameter for this event Keys must be of type String, while their values must either be a String or a Number. Any value which does not match these types will be converted to a String.
Parameters
key:String — String - name of the parameter
| |
value:* — String or Number - value of the parameter
|
AppEvent — AppEvent instance for chaining calls
|
setValueToSum | () | method |
public function setValueToSum(value:Number):AppEvent
Parameters
value:Number |
AppEvent — AppEvent instance for chaining calls
|
toObject | () | method |
public function toObject():Object
ReturnsObject |