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 subclasses instead.

Declared In:
lib/model/tracker/event.dart

Declaration:

abstract class Event

Properties:

Property Type Optional Description
type String no Event type
label String no Can’t be empty. This value isn’t saved in persistent storage and can’t be used in Analytics or Automation. It isn’t shown on a Profile card.
action String no Event action
parameters bool no Event parameters


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/model/tracker/custom_event.dart

Inherits From:
Event

Declaration:

class CustomEvent extends Event

Initializers:

CustomEvent(String label, String action, Map<String, Object> parameters)

Example:

final paramMap = <String, String>{
  "firstKeyCustomParam": "TEST_1",
  "secondKeyCustomParam": "TEST_2",
};
CustomEvent event = CustomEvent("LABEL", "ACTION", paramMap);



PushViewedEvent

Represents a ‘client viewed push’ event.

This event is used for push message interaction tracking.

Declared In:
lib/events/push/push_viewed_event.dart

Inherits From:
Event
CustomEvent

Declaration:

class PushViewedEvent extends CustomEvent

Initializers:

  PushViewedEvent(
    String label,
    Map<String, Object>? parameters,
  )



PushClickedEvent

Represents a ‘client clicked push’ event.

This event is used for push message interaction tracking.

Declared In:
lib/events/push/push_clicked_event.dart

Inherits From:
Event
CustomEvent

Declaration:

class PushClickedEvent extends CustomEvent

Initializers:

PushClickedEvent(
    String label,
    Map<String, Object>? parameters,
  )



PushCancelledEvent

Represents a ‘client dismissed push’ event.

This event is used for push message interaction tracking.

Declared In:
lib/events/push/push_cancelled_event.dart

Inherits From:
Event
CustomEvent

Declaration:

class PushCancelledEvent extends CustomEvent

Initializers:

PushCancelledEvent(
    String label,
    Map<String, Object>? parameters,
  )



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/events/cart/cart_event.dart

Inherits From: Event
CustomEvent

Declaration:

class CartEvent extends CustomEvent

Initializers:

CartEvent(String label, String action, String sku, UnitPrice finalPrice, int quantity, Map<String, Object>? parameters)

Methods:

This method sets a value for the name parameter.

void setName(String name)


This method sets a value for the category parameter.

void setCategory(String category)


This method sets values for the categories parameter.

void setCategories(List<String> categories)


This method sets a value for the offline parameter.

void setOffline(bool offline)


This method sets the value of the regularPrice parameter.

void setRegularPrice(UnitPrice regularPrice)


This method sets the value of the discountedPrice parameter.

void setDiscountedPrice(UnitPrice discountedPrice)


This method sets the value of the url parameter.

void setUrl(String url)


This method sets the value of the producer parameter (producer can signify a brand of the item).

void setProducer(String producer)



UnitPrice

Declared In:
lib/model/tracker/unit_price.dart

Declaration:

class UnitPrice

Initializers:

UnitPrice(
   int amount,
   String currency)



ProductAddedToCartEvent

Represents a ‘client added product to cart’ event.

Declared In:
lib/events/cart/product_added_to_cart_event.dart

Inherits From:
Event
CustomEvent

Declaration:

class ProductAddedToCartEvent extends CartEvent

Initializers:

ProductAddedToCartEvent(String label, String sku, UnitPrice finalPrice, int quantity, Map<String, Object>? parameters)



ProductRemovedFromCartEvent

Represents a ‘client removed product from cart’ event.

Declared In:
lib/events/cart/product_removed_from_cart_event.dart

Inherits From:
Event
CustomEvent

Declaration:

class ProductRemovedFromCartEvent extends CartEvent

Initializers:

ProductRemovedFromCartEvent(String label, String sku, UnitPrice finalPrice, int quantity, Map<String, Object>? parameters)



ProductViewedEvent

Represents a ‘client viewed product’ event.

Declared In:
lib/events/product/product_viewed_event.dart

Inherits From:
Event
CustomEvent

Declaration:

class ProductViewedEvent extends CustomEvent

Initializers:

ProductViewedEvent(
    String label,
    String productId,
    String name,
    Map<String, Object>? parameters,
  )

Methods:

This method sets a value for the category parameter.

void setCategory(String category) 


This method sets the value of the url parameter.

void setUrl(String url)



ProductAddedToFavoritesEvent

Represents a ‘client added product to favorites’ event.

Declared In:
lib/events/product/product_added_to_favorites_event.dart

Inherits From:
Event
CustomEvent

Declaration:

class ProductAddedToFavouritesEvent extends CustomEvent

Initializers:

ProductAddedToFavoritesEvent(
    String label,
    Map<String, Object>? parameters,
  ) 



LoggedInEvent

Represents a ‘client logged in’ event.

Declared In:
lib/events/auth/logged_in_event.dart

Inherits From:
Event
CustomEvent

Declaration:

class LoggedInEvent extends CustomEvent

Initializers:

  LoggedInEvent(
    String label,
    Map<String, Object>? parameters,
  )



LoggedOutEvent

Represents a ‘client logged out’ event.

Declared In:
lib/events/auth/logged_out_event.dart

Inherits From:
Event
CustomEvent

Declaration:

class LoggedOutEvent extends CustomEvent

Initializers:

LoggedOutEvent(String label, Map<String, Object>? parameters)



RegisteredEvent

Represents a ‘client registered’ event.

Declared In:
lib/events/auth/registered_event.dart

Inherits From:
Event
CustomEvent

Declaration:

class RegisteredEvent extends CustomEvent

Initializers:

RegisteredEvent(String label, Map<String, Object>? parameters) 



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/events/recommendation/recommendation_event.dart

Inherits From:
Event
CustomEvent

Declaration:

class RecommendationEvent extends CustomEvent

Initializers:

RecommendationEvent(String label, String action, Map<String, Object>? parameters)



RecommendationSeenEvent

Represents a ‘client saw a recommendation’ event.

Declared In:
lib/events/recommendation/recommendation_seen_event.dart

Inherits From:
Event
CustomEvent

Declaration:

class RecommendationSeenEvent extends RecommendationEvent

Initializers:

RecommendationSeenEvent(String label, String action, String productId, String productName, String campaignId, String campaignHash, Map<String, Object>? parameters)



RecommendationViewEvent

Represents a ‘client viewed a recommendation’ event.

Declared In:
lib/events/recommendation/recommendation_view_event.dart

Inherits From:
Event
CustomEvent

Declaration:

class RecommendationViewEvent extends RecommendationEvent

Initializers:

 RecommendationViewEvent(String label, String action, List<String>? items, String campaignId, String campaignHash, String correlationId, Map<String, Object>? parameters)



RecommendationClickEvent

Represents a ‘client clicked a recommendation’ event.

Declared In:
lib/events/recommendation/recommendation_click_event.dart

Inherits From:
Event
CustomEvent
RecommendationEvent

Declaration:

class RecommendationClickEvent extends RecommendationEvent

Initializers:

RecommendationClickEvent(String label, String action, String productId, String productName, String campaignId, String campaignHash,
      Map<String, Object>? parameters)



VisitedScreenEvent

Represents a ‘client visited screen’ event.

This can be used for mobile screen usage tracking.

Declared In:
lib/events/other/visited_screen_event.dart

Inherits From:
Event
CustomEvent

Declaration:

class VisitedScreenEvent extends CustomEvent

Initializers:

VisitedScreenEvent(
    String label,
    Map<String, Object>? parameters,
  )



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/events/other/hit_timer_event.dart

Inherits From:
Event
CustomEvent

Declaration:

class HitTimerEvent extends CustomEvent

Initializers:

HitTimerEvent(
    String label,
    Map<String, Object>? parameters,
  )



SearchedEvent

Represents a ‘client searched’ event.

Declared In:
lib/events/other/searched_event.dart

Inherits From:
Event
CustomEvent

Declaration:

class SearchedEvent extends CustomEvent

Initializers:

SearchedEvent(
    String label,
    Map<String, Object>? parameters,
  )



SharedEvent

Represents a ‘client shared’ event.

Declared In:
lib/events/other/shared_event.dart

Inherits From:
Event
CustomEvent

Declaration:

class SharedEvent extends CustomEvent

Initializers:

SharedEvent(
    String label,
    Map<String, Object>? parameters,
  )



AppearedInLocationEvent

Represents a ‘client appeared in location’ event.

Declared In:
lib/events/other/appeared_in_location_event.dart

Inherits From: Event
CustomEvent

Declaration:

class AppearedInLocationEvent extends CustomEvent

Initializers:

AppearedInLocationEvent(
    String label,
    double lat,
    double lon,
    Map<String, Object>? parameters,
  ) 

😕

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