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

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>)


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)


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)


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

Sets a product’s name.

public setName(name: string)


Sets a product’s category.

public setCategory(category: string)


Sets all of a product’s categories.

public setCategories(categories: string[])


Sets if a product is offline or not.

public setOffline(offline: boolean)


Sets a product’s regular price.

public setRegularPrice(regularPrice: UnitPrice)


Sets a product’s discounted price.

public setDiscountedPrice(discountedPrice: UnitPrice)


Sets a product’s web page.

public setUrl(url: string)


Sets a product’s producer.

public setProducer(producer: 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

Sets a product’s category.

public setCategory(category: string)


Sets a product’s web page.

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)


UnitPrice

Declared In

lib/classes/events/cart/UnitPrice.js

Declaration

class UnitPrice

Initializers

constructor(amount: number, currency: string)
😕

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.