Events

Event

Main event abstract class for inheriting classes.

WARNING: This is an abstract class and it is not meant to be instantiated directly. You should use concrete RecommendationEvent subclasses instead.

Declared In:
lib/classes/events/Event.js

Declaration:

abstract class Event

Initializers:

constructor(type: string, label: string, action: string | null, parameters: object)



CustomEvent

WARNING:

DO NOT send transaction.charge events as custom events.
Transactions must be tracked with these endpoints:

Represents a custom client event.

Declared In:
lib/classes/events/other/CustomEvent.js

Inherits From:
Event

Declaration:

class CustomEvent extends Event

Initializers:

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 Event

Initializers:

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 Event

Initializers:

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 Event

Initializers:

constructor(label: string, parameters?: object)



CartEvent

Main cart action abstract class for inheriting classes.

WARNING: This is an abstract class and it is not meant to be instantiated directly. You should use concrete CartEvent subclasses instead.

Declared In:
lib/classes/events/cart/CartEvent.js

Inherits From: Event

Declaration:

class CartEvent extends Event

Initializers:

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 UnitPrice

Initializers:

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 CartEvent

Initializers:

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 CartEvent

Initializers:

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 Event

Initializers:

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 Event

Initializers:

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 Event



LoggedOutEvent

Represents a ‘client logged out’ event.

Declared In:
lib/classes/events/auth/LoggedOutEvent.js

Inherits From:
Event

Declaration:

class LoggedOutEvent extends Event



RegisteredEvent

Represents a ‘client registered’ event.

Declared In:
lib/classes/events/auth/RegisteredEvent.js

Inherits From:
Event

Declaration:

class RegisteredEvent extends Event

Initializers:

constructor(label: string, parameters?: object)



RecommendationEvent

Main recommendation abstract class for inheriting classes.

WARNING: This is an abstract class and it is not meant to be instantiated directly. You should use concrete RecommendationEvent subclasses instead.

Declared In:
lib/classes/events/recommendation/RecommendationEvent.js

Inherits From:
Event

Declaration:

class RecommendationEvent extends Event

Initializers:

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 RecommendationEvent

Initializers:

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 RecommendationEvent

Initializers:

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 Event

Initializers:

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 Event

Initializers:

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 Event

Initializers:

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 Event

Initializers:

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 Event

Initializers:

constructor(label: string, lat: number, lon: number, parameters?: object)

😕

We are sorry to hear that

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

😉

Awesome!

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

Close modal icon Placeholder alt for modal to satisfy link checker