public class CustomData extends Object
| Constructor and Description |
|---|
CustomData()
Default Constructor.
|
CustomData(Float value,
String currency,
String contentName,
String contentCategory,
List<String> contentIds,
List<Content> contents,
String contentType,
String orderId,
Float predictedLtv,
String numItems,
String status,
String searchString,
DeliveryCategory deliveryCategory,
String itemNumber,
HashMap<String,String> customProperties)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
CustomData |
addContent(Content content)
Add a Content objects that contain the product IDs associated with the event plus information
about the products.
|
CustomData |
contentCategory(String contentCategory)
Set category of the content associated with the event.
|
CustomData |
contentIds(List<String> contentIds)
Set content IDs associated with the event, such as product SKUs for items in an AddToCart
event: [ABC123, XYZ789].
|
CustomData |
contentName(String contentName)
Set name of the page or product associated with the event.
|
CustomData |
contents(List<Content> contents)
Set a list of Content objects that contain the product IDs associated with the event plus
information about the products.
|
CustomData |
contentType(String contentType)
Set a String equal to either product or product_group.
|
CustomData |
currency(String currency)
Set currency code for the value specified, if applicable.
|
CustomData |
customProperties(HashMap<String,String> customProperties)
Sets the custom properties to be included in the Custom Data.
|
CustomData |
deliveryCategory(DeliveryCategory deliveryCategory)
Set a Type of delivery for a purchase event.
|
boolean |
equals(Object o) |
String |
getContentCategory()
The category of the content associated with the event.
|
List<String> |
getContentIds()
The content IDs associated with the event, such as product SKUs for items in an AddToCart
event: [ABC123, XYZ789].
|
String |
getContentName()
The name of the page or product associated with the event.
|
List<Content> |
getContents()
A list of Content objects that contain the product IDs associated with the event plus
information about the products.
|
String |
getContentType()
A String equal to either product or product_group.
|
String |
getCurrency()
The currency code for the value specified, if applicable.
|
HashMap<String,String> |
getCustomProperties()
Gets the custom properties to be included in the Custom Data.
|
DeliveryCategory |
getDeliveryCategory()
Type of delivery for a purchase event.
|
String |
getItemNumber()
Get the item number
|
String |
getNumItems()
The number of items that a user tries to buy during checkout.
|
String |
getOrderId()
The order ID for this transaction as a String.
|
Float |
getPredictedLtv()
The predicted lifetime value of a conversion event, as a String.
|
String |
getSearchString()
A search query made by a use.
|
String |
getStatus()
The status of the registration event, as a String.
|
Float |
getValue()
A numeric value associated with this event.
|
int |
hashCode() |
CustomData |
itemNumber(String itemNumber)
Set the item number
|
CustomData |
numItems(String numItems)
Set number of items that a user tries to buy during checkout.
|
CustomData |
orderId(String orderId)
Set order ID for this transaction as a String.
|
CustomData |
predictedLtv(Float predictedLtv)
Set predicted lifetime value of a conversion event, as a String.
|
CustomData |
searchString(String searchString)
Set a search query made by a use.
|
void |
setContentCategory(String contentCategory)
Set category of the content associated with the event.
|
void |
setContentIds(List<String> contentIds)
Set content IDs associated with the event, such as product SKUs for items in an AddToCart
event: [ABC123, XYZ789].
|
void |
setContentName(String contentName)
Set name of the page or product associated with the event.
|
void |
setContents(List<Content> contents)
Set a list of Content objects that contain the product IDs associated with the event plus
information about the products.
|
void |
setContentType(String contentType)
Set a String equal to either product or product_group.
|
void |
setCurrency(String currency)
Set currency code for the value specified, if applicable.
|
void |
setCustomProperties(HashMap<String,String> customProperties)
Sets the custom properties to be included in the Custom Data.
|
void |
setDeliveryCategory(DeliveryCategory deliveryCategory)
Set a Type of delivery for a purchase event.
|
void |
setItemNumber(String itemNumber)
Set the item number
|
void |
setNumItems(String numItems)
Set number of items that a user tries to buy during checkout.
|
void |
setOrderId(String orderId)
Set order ID for this transaction as a String.
|
void |
setPredictedLtv(Float predictedLtv)
Set predicted lifetime value of a conversion event, as a String.
|
void |
setSearchString(String searchString)
Set a search query made by a use.
|
void |
setStatus(String status)
Set status of the registration event, as a String.
|
void |
setValue(Float value)
Set a numeric value associated with this event.
|
CustomData |
status(String status)
Set status of the registration event, as a String.
|
String |
toString() |
CustomData |
value(Float value)
Set a numeric value associated with this event.
|
public CustomData()
public CustomData(Float value, String currency, String contentName, String contentCategory, List<String> contentIds, List<Content> contents, String contentType, String orderId, Float predictedLtv, String numItems, String status, String searchString, DeliveryCategory deliveryCategory, String itemNumber, HashMap<String,String> customProperties)
value - a numeric value associated with this eventcurrency - currency code for the value specifiedcontentName - name of the page or product associated with the eventcontentCategory - category of the content associated with the eventcontentIds - content IDs associated with the event, such as product SKUs for items in an
AddToCartcontents - list of Content objects that contain the product infocontentType - either 'product' or 'product_group'orderId - order ID for this transactionpredictedLtv - predicted lifetime value of a conversion eventnumItems - number of items that a user tries to buy during checkoutstatus - status of the registration eventsearchString - a search query made by a userdeliveryCategory - type of delivery for a purchase event.itemNumber - the item numbercustomProperties - Custom Properties to be added to the Custom Datapublic CustomData value(Float value)
Example: 142.54.
value - a numeric value associated with this eventpublic Float getValue()
Example: 142.54.
public void setValue(Float value)
Example: 142.54.
value - a numeric value associated with this eventpublic CustomData currency(String currency)
currency - currency code for the value specifiedpublic String getCurrency()
public void setCurrency(String currency)
currency - currency code for the value specifiedpublic CustomData contentName(String contentName)
Example: lettuce.
contentName - name of the page or product associated with the eventpublic String getContentName()
Example: lettuce.
public void setContentName(String contentName)
Example: lettuce.
contentName - name of the page or product associated with the eventpublic CustomData contentCategory(String contentCategory)
Example: grocery
contentCategory - category of the content associated with the event.public String getContentCategory()
Example: grocery
public void setContentCategory(String contentCategory)
Example: grocery
contentCategory - category of the content associated with the event.public CustomData contentIds(List<String> contentIds)
contentIds - content IDs associated with the eventpublic List<String> getContentIds()
public void setContentIds(List<String> contentIds)
contentIds - content IDs associated with the eventpublic CustomData contents(List<Content> contents)
Example: [{id:ABC123,quantity :2,item_price:5.99}, {id:XYZ789,quantity:2, item_price:9.99}]
contents - list of Content objects that contain the products associated with the eventpublic CustomData addContent(Content content)
Example: {id:ABC123,quantity :2,item_price:5.99}
content - Content objects that contain the product associated with the eventpublic List<Content> getContents()
Example: [{id:ABC123,quantity :2,item_price:5.99}, {id:XYZ789,quantity:2, item_price:9.99}]
public void setContents(List<Content> contents)
Example: [{id:ABC123,quantity :2,item_price:5.99}, {id:XYZ789,quantity:2, item_price:9.99}]
contents - list of Content objects that contain the products associated with the eventpublic CustomData contentType(String contentType)
contentType - product or product_grouppublic String getContentType()
public void setContentType(String contentType)
contentType - product or product_grouppublic CustomData orderId(String orderId)
Example: order1234.
orderId - order ID for this transactionpublic String getOrderId()
Example: order1234.
public void setOrderId(String orderId)
Example: order1234.
orderId - order ID for this transactionpublic CustomData predictedLtv(Float predictedLtv)
Example: 432.12.
predictedLtv - predicted lifetime value of a conversion eventpublic Float getPredictedLtv()
Example: 432.12.
public void setPredictedLtv(Float predictedLtv)
Example: 432.12.
predictedLtv - predicted lifetime value of a conversion eventpublic CustomData numItems(String numItems)
numItems - number of items that a user tries to buy during checkoutpublic String getNumItems()
public void setNumItems(String numItems)
numItems - number of items that a user tries to buy during checkoutpublic CustomData status(String status)
status - status of the registration eventpublic String getStatus()
public void setStatus(String status)
status - status of the registration eventpublic String getSearchString()
public void setSearchString(String searchString)
searchString - a search query made by a usepublic CustomData searchString(String searchString)
searchString - a search query made by a usepublic DeliveryCategory getDeliveryCategory()
public void setDeliveryCategory(DeliveryCategory deliveryCategory)
deliveryCategory - type of deliverypublic CustomData deliveryCategory(DeliveryCategory deliveryCategory)
deliveryCategory - type of deliverypublic CustomData itemNumber(String itemNumber)
itemNumber - Item numberpublic String getItemNumber()
public void setItemNumber(String itemNumber)
itemNumber - Item numberpublic HashMap<String,String> getCustomProperties()
public void setCustomProperties(HashMap<String,String> customProperties)
customProperties - custom properties property bag to be included in the Custom Data.
Eg: '{ 'warehouse_location' : 'washington', 'package_size' : 'L'}'public CustomData customProperties(HashMap<String,String> customProperties)
customProperties - custom properties property bag to be included in the Custom Data.
Eg: '{ 'warehouse_location' : 'washington', 'package_size' : 'L'}'Copyright © 2020. All rights reserved.