Packageio.branch.nativeExtensions.branch.tracking
Classpublic class BranchEventBuilder
InheritanceBranchEventBuilder Inheritance Object

Class for creating Branch events for tracking and analytical purpose. This class can construct both standard and custom Branch events.

Standard Branch events are defined with a name from the predefined constants STANDARD_EVENT_....

Please use Branch.instance.logEvent() method to log the events for tracking.

See also

io.branch.nativeExtensions.branch.Branch.logEvent()


Public Methods
 MethodDefined By
  
BranchEventBuilder(eventName:String)
Class constructor
BranchEventBuilder
  
addCustomDataProperty(propertyName:String, propertyValue:String):BranchEventBuilder
Adds a custom data property associated with this Branch Event
BranchEventBuilder
  
build():Object
Creates an object representing an event for the extension.
BranchEventBuilder
  
Set any affiliation for this transaction event
BranchEventBuilder
  
Set any coupons associated with this transaction event
BranchEventBuilder
  
setCurrency(iso4217Code:String):BranchEventBuilder
Set the currency related with this transaction event
BranchEventBuilder
  
Set description for this transaction event
BranchEventBuilder
  
Set the revenue value related with this transaction event
BranchEventBuilder
  
Set any search query associated with the event
BranchEventBuilder
  
Set the shipping value related with this transaction event
BranchEventBuilder
  
Set the tax value related with this transaction event
BranchEventBuilder
  
setTransactionID(transactionId:String):BranchEventBuilder
Set the transaction id associated with this event if there in any
BranchEventBuilder
Public Constants
 ConstantDefined By
  STANDARD_EVENT_ACHIEVE_LEVEL : String = ACHIEVE_LEVEL
[static]
BranchEventBuilder
  STANDARD_EVENT_ADD_PAYMENT_INFO : String = ADD_PAYMENT_INFO
[static]
BranchEventBuilder
  STANDARD_EVENT_ADD_TO_CART : String = ADD_TO_CART
[static]
BranchEventBuilder
  STANDARD_EVENT_ADD_TO_WISHLIST : String = ADD_TO_WISHLIST
[static]
BranchEventBuilder
  STANDARD_EVENT_COMPLETE_REGISTRATION : String = COMPLETE_REGISTRATION
[static]
BranchEventBuilder
  STANDARD_EVENT_COMPLETE_TUTORIAL : String = COMPLETE_TUTORIAL
[static]
BranchEventBuilder
  STANDARD_EVENT_INITIATE_PURCHASE : String = INITIATE_PURCHASE
[static]
BranchEventBuilder
  STANDARD_EVENT_PURCHASE : String = PURCHASE
[static]
BranchEventBuilder
  STANDARD_EVENT_RATE : String = RATE
[static]
BranchEventBuilder
  STANDARD_EVENT_SEARCH : String = SEARCH
[static]
BranchEventBuilder
  STANDARD_EVENT_SHARE : String = SHARE
[static]
BranchEventBuilder
  STANDARD_EVENT_SPEND_CREDITS : String = SPEND_CREDITS
[static]
BranchEventBuilder
  STANDARD_EVENT_UNLOCK_ACHIEVEMENT : String = UNLOCK_ACHIEVEMENT
[static]
BranchEventBuilder
  STANDARD_EVENT_VIEW_CART : String = VIEW_CART
[static]
BranchEventBuilder
  STANDARD_EVENT_VIEW_ITEM : String = VIEW_ITEM
[static]
BranchEventBuilder
  STANDARD_EVENT_VIEW_ITEMS : String = VIEW_ITEMS
[static]
BranchEventBuilder
Constructor Detail
BranchEventBuilder()Constructor
public function BranchEventBuilder(eventName:String)

Class constructor

Parameters
eventName:String
Method Detail
addCustomDataProperty()method
public function addCustomDataProperty(propertyName:String, propertyValue:String):BranchEventBuilder

Adds a custom data property associated with this Branch Event

Parameters

propertyName:String — Name of the custom property
 
propertyValue:String — Value of the custom property

Returns
BranchEventBuilder — This object for chaining builder methods
build()method 
public function build():Object

Creates an object representing an event for the extension.

Returns
Object
setAffiliation()method 
public function setAffiliation(affiliation:String):BranchEventBuilder

Set any affiliation for this transaction event

Parameters

affiliation:String — any affiliation value

Returns
BranchEventBuilder — This object for chaining builder methods
setCoupon()method 
public function setCoupon(coupon:String):BranchEventBuilder

Set any coupons associated with this transaction event

Parameters

coupon:String — with any coupon value

Returns
BranchEventBuilder — This object for chaining builder methods
setCurrency()method 
public function setCurrency(iso4217Code:String):BranchEventBuilder

Set the currency related with this transaction event

Parameters

iso4217Code:String — ISO 4217 currency code (eg USD, EUR, JPY)

Returns
BranchEventBuilder — This object for chaining builder methods
setDescription()method 
public function setDescription(description:String):BranchEventBuilder

Set description for this transaction event

Parameters

description:String — transaction description

Returns
BranchEventBuilder — This object for chaining builder methods
setRevenue()method 
public function setRevenue(revenue:Number):BranchEventBuilder

Set the revenue value related with this transaction event

Parameters

revenue:Number — revenue value

Returns
BranchEventBuilder — This object for chaining builder methods
setSearchQuery()method 
public function setSearchQuery(searchQuery:String):BranchEventBuilder

Set any search query associated with the event

Parameters

searchQuery:String — Search Query value

Returns
BranchEventBuilder — This object for chaining builder methods
setShipping()method 
public function setShipping(shipping:Number):BranchEventBuilder

Set the shipping value related with this transaction event

Parameters

shipping:Number — shipping value

Returns
BranchEventBuilder — This object for chaining builder methods
setTax()method 
public function setTax(tax:Number):BranchEventBuilder

Set the tax value related with this transaction event

Parameters

tax:Number — tax value

Returns
BranchEventBuilder — This object for chaining builder methods
setTransactionID()method 
public function setTransactionID(transactionId:String):BranchEventBuilder

Set the transaction id associated with this event if there in any

Parameters

transactionId:String

Returns
BranchEventBuilder — This object for chaining builder methods
Constant Detail
STANDARD_EVENT_ACHIEVE_LEVELConstant
public static const STANDARD_EVENT_ACHIEVE_LEVEL:String = ACHIEVE_LEVEL

STANDARD_EVENT_ADD_PAYMENT_INFOConstant 
public static const STANDARD_EVENT_ADD_PAYMENT_INFO:String = ADD_PAYMENT_INFO

STANDARD_EVENT_ADD_TO_CARTConstant 
public static const STANDARD_EVENT_ADD_TO_CART:String = ADD_TO_CART

STANDARD_EVENT_ADD_TO_WISHLISTConstant 
public static const STANDARD_EVENT_ADD_TO_WISHLIST:String = ADD_TO_WISHLIST

STANDARD_EVENT_COMPLETE_REGISTRATIONConstant 
public static const STANDARD_EVENT_COMPLETE_REGISTRATION:String = COMPLETE_REGISTRATION

STANDARD_EVENT_COMPLETE_TUTORIALConstant 
public static const STANDARD_EVENT_COMPLETE_TUTORIAL:String = COMPLETE_TUTORIAL

STANDARD_EVENT_INITIATE_PURCHASEConstant 
public static const STANDARD_EVENT_INITIATE_PURCHASE:String = INITIATE_PURCHASE

STANDARD_EVENT_PURCHASEConstant 
public static const STANDARD_EVENT_PURCHASE:String = PURCHASE

STANDARD_EVENT_RATEConstant 
public static const STANDARD_EVENT_RATE:String = RATE

STANDARD_EVENT_SEARCHConstant 
public static const STANDARD_EVENT_SEARCH:String = SEARCH

STANDARD_EVENT_SHAREConstant 
public static const STANDARD_EVENT_SHARE:String = SHARE

STANDARD_EVENT_SPEND_CREDITSConstant 
public static const STANDARD_EVENT_SPEND_CREDITS:String = SPEND_CREDITS

STANDARD_EVENT_UNLOCK_ACHIEVEMENTConstant 
public static const STANDARD_EVENT_UNLOCK_ACHIEVEMENT:String = UNLOCK_ACHIEVEMENT

STANDARD_EVENT_VIEW_CARTConstant 
public static const STANDARD_EVENT_VIEW_CART:String = VIEW_CART

STANDARD_EVENT_VIEW_ITEMConstant 
public static const STANDARD_EVENT_VIEW_ITEM:String = VIEW_ITEM

STANDARD_EVENT_VIEW_ITEMSConstant 
public static const STANDARD_EVENT_VIEW_ITEMS:String = VIEW_ITEMS