Package | io.branch.nativeExtensions.branch.tracking |
Class | public class BranchEventBuilder |
Inheritance | BranchEventBuilder 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
Method | Defined 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 | ||
setAffiliation(affiliation:String):BranchEventBuilder
Set any affiliation for this transaction event
| BranchEventBuilder | ||
setCoupon(coupon:String):BranchEventBuilder
Set any coupons associated with this transaction event
| BranchEventBuilder | ||
setCurrency(iso4217Code:String):BranchEventBuilder
Set the currency related with this transaction event
| BranchEventBuilder | ||
setDescription(description:String):BranchEventBuilder
Set description for this transaction event
| BranchEventBuilder | ||
setRevenue(revenue:Number):BranchEventBuilder
Set the revenue value related with this transaction event
| BranchEventBuilder | ||
setSearchQuery(searchQuery:String):BranchEventBuilder
Set any search query associated with the event
| BranchEventBuilder | ||
setShipping(shipping:Number):BranchEventBuilder
Set the shipping value related with this transaction event
| BranchEventBuilder | ||
setTax(tax:Number):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 |
Constant | Defined 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 |
BranchEventBuilder | () | Constructor |
public function BranchEventBuilder(eventName:String)
Class constructor
ParameterseventName:String |
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
|
BranchEventBuilder — This object for chaining builder methods
|
build | () | method |
public function build():Object
Creates an object representing an event for the extension.
ReturnsObject |
setAffiliation | () | method |
public function setAffiliation(affiliation:String):BranchEventBuilder
Set any affiliation for this transaction event
Parameters
affiliation:String — any affiliation value
|
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
|
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)
|
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
|
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
|
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
|
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
|
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
|
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 |
BranchEventBuilder — This object for chaining builder methods
|
STANDARD_EVENT_ACHIEVE_LEVEL | Constant |
public static const STANDARD_EVENT_ACHIEVE_LEVEL:String = ACHIEVE_LEVEL
STANDARD_EVENT_ADD_PAYMENT_INFO | Constant |
public static const STANDARD_EVENT_ADD_PAYMENT_INFO:String = ADD_PAYMENT_INFO
STANDARD_EVENT_ADD_TO_CART | Constant |
public static const STANDARD_EVENT_ADD_TO_CART:String = ADD_TO_CART
STANDARD_EVENT_ADD_TO_WISHLIST | Constant |
public static const STANDARD_EVENT_ADD_TO_WISHLIST:String = ADD_TO_WISHLIST
STANDARD_EVENT_COMPLETE_REGISTRATION | Constant |
public static const STANDARD_EVENT_COMPLETE_REGISTRATION:String = COMPLETE_REGISTRATION
STANDARD_EVENT_COMPLETE_TUTORIAL | Constant |
public static const STANDARD_EVENT_COMPLETE_TUTORIAL:String = COMPLETE_TUTORIAL
STANDARD_EVENT_INITIATE_PURCHASE | Constant |
public static const STANDARD_EVENT_INITIATE_PURCHASE:String = INITIATE_PURCHASE
STANDARD_EVENT_PURCHASE | Constant |
public static const STANDARD_EVENT_PURCHASE:String = PURCHASE
STANDARD_EVENT_RATE | Constant |
public static const STANDARD_EVENT_RATE:String = RATE
STANDARD_EVENT_SEARCH | Constant |
public static const STANDARD_EVENT_SEARCH:String = SEARCH
STANDARD_EVENT_SHARE | Constant |
public static const STANDARD_EVENT_SHARE:String = SHARE
STANDARD_EVENT_SPEND_CREDITS | Constant |
public static const STANDARD_EVENT_SPEND_CREDITS:String = SPEND_CREDITS
STANDARD_EVENT_UNLOCK_ACHIEVEMENT | Constant |
public static const STANDARD_EVENT_UNLOCK_ACHIEVEMENT:String = UNLOCK_ACHIEVEMENT
STANDARD_EVENT_VIEW_CART | Constant |
public static const STANDARD_EVENT_VIEW_CART:String = VIEW_CART
STANDARD_EVENT_VIEW_ITEM | Constant |
public static const STANDARD_EVENT_VIEW_ITEM:String = VIEW_ITEM
STANDARD_EVENT_VIEW_ITEMS | Constant |
public static const STANDARD_EVENT_VIEW_ITEMS:String = VIEW_ITEMS