Events
Event
Main event abstract class for inheriting classes.
RecommendationEvent subclasses instead.Declared In:
lib/classes/events/Event.js
Declaration:
abstract class EventInitializers:
constructor(type: string, label: string, action: string | null, parameters: object)CustomEvent
DO NOT send transaction.charge events as custom events.
Transactions must be tracked with these endpoints:
/v4/transactions(single transaction)/v4/transactions/batch(multiple transactions)
Represents a custom client event.
Declared In:
lib/classes/events/other/CustomEvent.js
Inherits From:
Event
Declaration:
class CustomEvent extends EventInitializers:
constructor(label: string, action: string, parameters?: Record<string, any>)PushViewedEvent
Represents a ‘client viewed push’ event.
This event is used for push message interaction tracking.
Declared In:
lib/classes/events/push/ViewedPushEvent.js
Inherits From:
Event
Declaration:
class PushViewedEvent extends EventInitializers:
constructor(label: string, parameters?: object)PushClickedEvent
Represents a ‘client clicked push’ event.
This event is used for push message interaction tracking.
Declared In:
lib/classes/events/push/ClickedPushEvent.js
Inherits From:
Event
Declaration:
class PushClickedEvent extends EventInitializers:
constructor(label: string, parameters?: object)PushCancelledEvent
Represents a ‘client viewed push’ event.
This event is used for push message interaction tracking.
Declared In:
lib/classes/events/push/CancelledPushEvent.js
Inherits From:
Event
Declaration:
class PushCancelledEvent extends EventInitializers:
constructor(label: string, parameters?: object)CartEvent
Main cart action abstract class for inheriting classes.
CartEvent subclasses instead.Declared In:
lib/classes/events/cart/CartEvent.js
Inherits From: Event
Declaration:
class CartEvent extends EventInitializers:
constructor(type: string, label: string, sku: string, finalPrice: UnitPrice, quantity: number, parameters?: object)Methods:
This method sets a value for the name parameter.
public setName(name: string)This method sets a value for the category parameter.
public setCategory(category: string)This method sets values for the categories parameter.
public setCategories(categories: string[])This method sets a value for the offline parameter.
public setOffline(offline: boolean)This method sets the value of the regularPrice parameter.
public setRegularPrice(regularPrice: UnitPrice)This method sets the value of the discountedPrice parameter.
public setDiscountedPrice(discountedPrice: UnitPrice)This method sets the value of the url parameter.
public setUrl(url: string)This method sets the value of the producer parameter (producer can signify a brand of the item).
public setProducer(producer: string)UnitPrice
Declared In:
lib/classes/events/cart/UnitPrice.js
Declaration:
class UnitPriceInitializers:
constructor(amount: number, currency: string)ProductAddedToCartEvent
Represents a ‘client added product to cart’ event.
Declared In:
lib/classes/events/product/ProductAddedToCartEvent.js
Inherits From:
Event
Declaration:
class ProductAddedToCartEvent extends CartEventInitializers:
constructor(label: string, sku: string, finalPrice: UnitPrice, quantity: number, parameters?: object)ProductRemovedFromCartEvent
Represents a ‘client removed product from cart’ event.
Declared In:
lib/classes/events/cart/RemovedFromCartEvent.js
Inherits From:
Event
Declaration:
class ProductRemovedFromCartEvent extends CartEventInitializers:
constructor(label: string, sku: string, finalPrice: UnitPrice, quantity: number, parameters?: object)ProductViewedEvent
Represents a ‘client viewed product’ event.
Declared In:
lib/classes/events/product/ProductViewEvent.js
Inherits From:
Event
Declaration:
class ProductViewedEvent extends EventInitializers:
constructor(label: string, productId: string, name: string, parameters?: object)Methods:
This method sets a value for the category parameter.
public setCategory(category: string)This method sets the value of the url parameter.
public setUrl(url: string)ProductAddedToFavoritesEvent
Represents a ‘client added product to favorites’ event.
Declared In:
lib/classes/events/product/ProductAddedToFavouritesEvent.js
Inherits From:
Event
Declaration:
class ProductAddedToFavouritesEvent extends EventInitializers:
constructor(label: string, parameters?: object)LoggedInEvent
Represents a ‘client logged in’ event.
Declared In:
lib/classes/events/auth/LoggedInEvent.js
Inherits From:
Event
Declaration:
class LoggedInEvent extends EventLoggedOutEvent
Represents a ‘client logged out’ event.
Declared In:
lib/classes/events/auth/LoggedOutEvent.js
Inherits From:
Event
Declaration:
class LoggedOutEvent extends EventRegisteredEvent
Represents a ‘client registered’ event.
Declared In:
lib/classes/events/auth/RegisteredEvent.js
Inherits From:
Event
Declaration:
class RegisteredEvent extends EventInitializers:
constructor(label: string, parameters?: object)RecommendationEvent
Main recommendation abstract class for inheriting classes.
RecommendationEvent subclasses instead.Declared In:
lib/classes/events/recommendation/RecommendationEvent.js
Inherits From:
Event
Declaration:
class RecommendationEvent extends EventInitializers:
constructor(type: string, label: string, productId: string, name: string, campaignId: string, campaignHash: string, parameters?: object)RecommendationSeenEvent
Represents a ‘client saw a recommendation’ event.
Declared In:
lib/classes/events/recommendation/RecommendationSeenEvent.js
Inherits From:
Event
Declaration:
class RecommendationSeenEvent extends RecommendationEventInitializers:
constructor(label: string, productId: string, name: string, campaignId: string, campaignHash: string, parameters?: object)RecommendationClickEvent
Represents a ‘client clicked a recommendation’ event.
Declared In:
lib/classes/events/recommendation/RecommendationClickEvent.js
Inherits From:
Event
RecommendationEvent
Declaration:
class RecommendationClickEvent extends RecommendationEventInitializers:
constructor(label: string, productId: string, name: string, campaignId: string, campaignHash: string, parameters?: object)VisitedScreenEvent
Represents a ‘client visited screen’ event.
This can be used for mobile screen usage tracking.
Declared In:
lib/classes/events/other/VisitedScreenEvent.js
Inherits From:
Event
Declaration:
class VisitedScreenEvent extends EventInitializers:
constructor(label: string, parameters?: object)HitTimerEvent
Represents a ‘client hit timer’ event.
This could be used for profiling or activity time monitoring - you can send a HitTimerEvent when your client starts doing something and send it once again when they finish, but this time with the different time signature. Then you can use our analytics engine to measure, for example, average activity time.
Declared In:
lib/classes/events/other/HitTimerEvent.js
Inherits From:
Event
Declaration:
class HitTimerEvent extends EventInitializers:
constructor(label: string, parameters?: object)SearchedEvent
Represents a ‘client searched’ event.
Declared In:
lib/classes/events/other/SearchedEvent.js
Inherits From:
Event
Declaration:
class SearchedEvent extends EventInitializers:
constructor(label: string, parameters?: object)SharedEvent
Represents a ‘client shared’ event.
Declared In:
lib/classes/events/other/SharedEvent.js
Inherits From:
Event
Declaration:
class SharedEvent extends EventInitializers:
constructor(label: string, parameters?: object)AppearedInLocationEvent
Represents a ‘client appeared in location’ event.
Declared In:
lib/classes/events/other/AppearedInLocationEvent.js
Inherits From: Event
Declaration:
class AppearedInLocationEvent extends EventInitializers:
constructor(label: string, lat: number, lon: number, parameters?: object)