Packagecom.distriqt.extension.facebookapi.appevents
Interfacepublic interface AppEvents extends flash.events.IEventDispatcher

Access to App Events and Facebook Analytics for Apps



Public Properties
 PropertyDefined By
  isSupported : Boolean
[read-only] Whether analytics and app events are supported on the current device.
AppEvents
Public Methods
 MethodDefined By
  
clearUserID():Boolean
Delete the user ID stored on the device.
AppEvents
  
flush():Boolean
Manually flushes pending Facebook app events now
AppEvents
  
logEvent(event:FacebookAppEvent):Boolean
Sends a logEvent call to Facebook
AppEvents
  
Sends a logPurchase call to Facebook
AppEvents
  
setAdvertiserIDCollectionEnabled(enabled:Boolean = true):void
In some cases, you want to delay the collection of the advertiser id, such as to obtain User consent or fulfill legal obligations, instead of disabling it.
AppEvents
  
setAutoInitEnabled(enabled:Boolean = true):void
AppEvents
  
setAutoLogAppEventsEnabled(enabled:Boolean = true):void
In some cases, you want to delay the automatic logging, such as to obtain User consent or fulfill legal obligations, instead of disabling it.
AppEvents
  
setFlushBehaviour(mode:String):Boolean
Sets the default behaviour for when the app should flush app events and send them to Facebook The mode should be one of the values defined in the AnalyticsFlushMode class the default is MODE_AUTO that will automatically flush events and send when appropriate.
AppEvents
  
setUserID(userID:String):Boolean
Assign an ID to a user of your app
AppEvents
  
setUserProperties(properties:Object):Boolean
Once you have called setUserID, then you can also create a table with custom fields for user properties, that you can update with custom values.
AppEvents
Property Detail
isSupportedproperty
isSupported:Boolean  [read-only]

Whether analytics and app events are supported on the current device.


Implementation
    public function get isSupported():Boolean
Method Detail
clearUserID()method
public function clearUserID():Boolean

Delete the user ID stored on the device.

Returns
Boolean — true if successful and false otherwise
flush()method 
public function flush():Boolean

Manually flushes pending Facebook app events now

Returns
Boolean
logEvent()method 
public function logEvent(event:FacebookAppEvent):Boolean

Sends a logEvent call to Facebook

Parameters

event:FacebookAppEvent — - FacebookAppEvent object

Returns
Boolean

See also

com.distriqt.extension.facebookapi.objects.FacebookAppEvent
logPurchase()method 
public function logPurchase(event:FacebookAppPurchaseEvent):Boolean

Sends a logPurchase call to Facebook

Parameters

event:FacebookAppPurchaseEvent — - FacebookAppPurchaseEvent object

Returns
Boolean

See also

com.distriqt.extension.facebookapi.objects.FacebookAppPurchaseEvent
setAdvertiserIDCollectionEnabled()method 
public function setAdvertiserIDCollectionEnabled(enabled:Boolean = true):void

In some cases, you want to delay the collection of the advertiser id, such as to obtain User consent or fulfill legal obligations, instead of disabling it. In this case disable the collection of the advertiser id as described in the documentation and then once you have been provided consent call this function to enable (or disable) collection.

Parameters

enabled:Boolean (default = true) — Whether collection is enabled or disabled

setAutoInitEnabled()method 
public function setAutoInitEnabled(enabled:Boolean = true):void

Parameters

enabled:Boolean (default = true)

setAutoLogAppEventsEnabled()method 
public function setAutoLogAppEventsEnabled(enabled:Boolean = true):void

In some cases, you want to delay the automatic logging, such as to obtain User consent or fulfill legal obligations, instead of disabling it. In this case disable the automatic logging as described in the documentation and then once you have been provided consent call this function to enable (or disable) automatic logging.

Parameters

enabled:Boolean (default = true) — Whether collection is enabled or disabled

setFlushBehaviour()method 
public function setFlushBehaviour(mode:String):Boolean

Sets the default behaviour for when the app should flush app events and send them to Facebook

The mode should be one of the values defined in the AnalyticsFlushMode class the default is MODE_AUTO that will automatically flush events and send when appropriate.

If you set MODE_EXPLICIT, you must then call the flush method manually in order for your events to be sent.

Parameters

mode:String (default = NaN) — The flush behaviour mode

Returns
Boolean

See also

com.distriqt.extension.facebookapi.analytics.AnalyticsFlushMode
setUserID()method 
public function setUserID(userID:String):Boolean

Assign an ID to a user of your app

Parameters

userID:String — The ID to use for the current user

Returns
Boolean — true if successful and false otherwise
setUserProperties()method 
public function setUserProperties(properties:Object):Boolean

Once you have called setUserID, then you can also create a table with custom fields for user properties, that you can update with custom values. For example, you could have a user property like "Customer Loyalty Status" with values like "Gold," "Silver," or "Bronze." This would allow you to see and segment analytics based on these values in Analytics.

Parameters

properties:Object — An object with key-value pairs representing user properties and their values

Returns
Boolean — true if successful and false otherwise