-
public class BranchEventClass for creating Branch events for tracking and analytical purpose. This class represent a standard or custom BranchEvents. Standard Branch events are defined with BRANCH_STANDARD_EVENT. Please use #logEvent() method to log the events for tracking.
-
-
Constructor Summary
Constructors Constructor Description BranchEvent(BRANCH_STANDARD_EVENT branchStandardEvent)Constructor. BranchEvent(String eventName)Constructor.This constructor can be used for free-form Events or Branch Standard Events.Event names that match Standard Events will be treated as Standard Events.
-
Method Summary
Modifier and Type Method Description StringgetEventName()BranchEventsetCustomerEventAlias(String customerEventAlias)Set the Event Alias associated with the event. BranchEventsetAdType(AdType adType)Set the Ad Type associated with the event. BranchEventsetTransactionID(String transactionID)Set the transaction id associated with this event if there in any BranchEventsetCurrency(CurrencyType currency)Set the currency related with this transaction event BranchEventsetRevenue(double revenue)Set the revenue value related with this transaction event BranchEventsetShipping(double shipping)Set the shipping value related with this transaction event BranchEventsetTax(double tax)Set the tax value related with this transaction event BranchEventsetCoupon(String coupon)Set any coupons associated with this transaction event BranchEventsetAffiliation(String affiliation)Set any affiliation for this transaction event BranchEventsetDescription(String description)Set description for this transaction event BranchEventsetSearchQuery(String searchQuery)Set any search query associated with the event BranchEventaddCustomDataProperty(String propertyName, String propertyValue)Adds a custom data property associated with this Branch Event BranchEventaddContentItems(Array<BranchUniversalObject> contentItems)Use this method to add any BranchUniversalObject associated with this event. BranchEventaddContentItems(List<BranchUniversalObject> contentItems)Use this method to add any BranchUniversalObject associated with this event. booleanlogEvent(Context context)Logs this BranchEvent to Branch for tracking and analytics -
-
Constructor Detail
-
BranchEvent
BranchEvent(BRANCH_STANDARD_EVENT branchStandardEvent)
Constructor.- Parameters:
branchStandardEvent- Branch Standard Event
-
BranchEvent
BranchEvent(String eventName)
Constructor.This constructor can be used for free-form Events or Branch Standard Events.Event names that match Standard Events will be treated as Standard Events.- Parameters:
eventName- Event Name.
-
-
Method Detail
-
getEventName
String getEventName()
-
setCustomerEventAlias
BranchEvent setCustomerEventAlias(String customerEventAlias)
Set the Event Alias associated with the event.
- Parameters:
customerEventAlias- customerEventAlias
-
setAdType
BranchEvent setAdType(AdType adType)
Set the Ad Type associated with the event.
- Parameters:
adType- AdType Ad Type value
-
setTransactionID
BranchEvent setTransactionID(String transactionID)
Set the transaction id associated with this event if there in any
- Parameters:
transactionID- transactionID
-
setCurrency
BranchEvent setCurrency(CurrencyType currency)
Set the currency related with this transaction event
- Parameters:
currency- iso4217Code for currency.
-
setRevenue
BranchEvent setRevenue(double revenue)
Set the revenue value related with this transaction event
- Parameters:
revenue- revenue value
-
setShipping
BranchEvent setShipping(double shipping)
Set the shipping value related with this transaction event
- Parameters:
shipping- shipping value
-
setTax
BranchEvent setTax(double tax)
Set the tax value related with this transaction event
- Parameters:
tax- tax value
-
setCoupon
BranchEvent setCoupon(String coupon)
Set any coupons associated with this transaction event
- Parameters:
coupon- String with any coupon value
-
setAffiliation
BranchEvent setAffiliation(String affiliation)
Set any affiliation for this transaction event
- Parameters:
affiliation- String any affiliation value
-
setDescription
BranchEvent setDescription(String description)
Set description for this transaction event
- Parameters:
description- String transaction description
-
setSearchQuery
BranchEvent setSearchQuery(String searchQuery)
Set any search query associated with the event
- Parameters:
searchQuery- String Search Query value
-
addCustomDataProperty
BranchEvent addCustomDataProperty(String propertyName, String propertyValue)
Adds a custom data property associated with this Branch Event
-
addContentItems
BranchEvent addContentItems(Array<BranchUniversalObject> contentItems)
Use this method to add any BranchUniversalObject associated with this event.
- Parameters:
contentItems- BranchUniversalObjects associated with this event
-
addContentItems
BranchEvent addContentItems(List<BranchUniversalObject> contentItems)
Use this method to add any BranchUniversalObject associated with this event.
- Parameters:
contentItems- A list of BranchUniversalObjects associated with this event
-
-
-
-