-
public final class RegisterEventHandles event tracking for different user actions such as product views, add-to-cart, purchases, ad impressions, and ad clicks.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classRegisterEvent.ProductRepresents a product with relevant details for tracking events.
-
Constructor Summary
Constructors Constructor Description RegisterEvent()
-
Method Summary
Modifier and Type Method Description final Map<String, Object>registerAdClickEvent(String cliUbid, String uclid, Map<String, Object> extraParams)Registers an ad click event for tracking user interactions with advertisements. final Map<String, Object>registerViewProductEvent(String cliUbid, String skuId, String productPrices, String merchantId, Map<String, Object> extraParams)Registers a "view product" event for tracking user interactions. final Map<String, Object>registerAdd2CartEvent(String cliUbid, String skuId, String productPrices, String merchantId, Map<String, Object> extraParams)Registers an "add to cart" event for tracking user interactions. final Map<String, Object>registerPurchaseEvent(String cliUbid, Integer sales, String orderId, List<RegisterEvent.Product> products, Map<String, Object> extraParams)Registers a "purchase" event for tracking completed sales. final Map<String, Object>registerAdImpressionEvent(String cliUbid, String uclid, Integer position, Map<String, Object> extraParams)Registers an "ad impression" event for tracking ad views. final Map<String, Object>registerVideoProgressEvent(String cliUbid, String uclid, Integer videoViewSec, Integer videoDurationSec, Map<String, Object> extraParams)Registers a "video progress" event for tracking user engagement. final Map<String, Object>registerVideoActionEvent(String cliUbid, String uclid, Integer videoViewSec, String actionType, Map<String, Object> extraParams)Registers a "video action" event to track user interactions with a video. final Map<String, Object>register_adclick_event(String cli_ubid, String uclid, Map<String, Object> extra_params)Registers an ad click event for tracking user interactions with advertisements. final Map<String, Object>register_viewproduct_event(String cli_ubid, String sku_id, String product_prices, String merchant_id, Map<String, Object> extra_params)Registers a "view product" event for tracking user interactions. final Map<String, Object>register_add2cart_event(String cli_ubid, String sku_id, String product_prices, String merchant_id, Map<String, Object> extra_params)Registers an "add to cart" event for tracking user interactions. final Map<String, Object>register_purchase_event(String cli_ubid, Integer sales, String order_id, List<RegisterEvent.Product> products, Map<String, Object> extra_params)Registers a "purchase" event for tracking completed sales. final Map<String, Object>register_adimpression_event(String cli_ubid, String uclid, Integer position, Map<String, Object> extra_params)Registers an "ad impression" event for tracking ad views. final Map<String, Object>register_video_progress_event(String cli_ubid, String uclid, Integer video_view_sec, Integer video_duration_sec, Map<String, Object> extra_params)Registers a "video progress" event for tracking user engagement. final Map<String, Object>register_video_action_event(String cli_ubid, String uclid, Integer video_view_sec, String action_type, Map<String, Object> extra_params)Registers a "video action" event to track user interactions with a video. final LongcurrentTime()-
-
Method Detail
-
registerAdClickEvent
final Map<String, Object> registerAdClickEvent(String cliUbid, String uclid, Map<String, Object> extraParams)
Registers an ad click event for tracking user interactions with advertisements. This function constructs a query parameter map containing the
uclidand any additional parameters. It then callstrack_events_processorto send the event to the ad click tracking endpoint.- Parameters:
cliUbid- Unique identifier.uclid- Unique identifier for the ad click event.extraParams- Optional: Additional tracking parameters to be merged with the event data.
-
registerViewProductEvent
final Map<String, Object> registerViewProductEvent(String cliUbid, String skuId, String productPrices, String merchantId, Map<String, Object> extraParams)
Registers a "view product" event for tracking user interactions. This function constructs an event payload and calls
registerViewProductEventto log the "viewproduct" event with the necessary parameters.- Parameters:
cliUbid- Unique identifier.skuId- The unique identifier of the product being viewed.productPrices- Optional: Prices of the product, if applicable.merchantId- Optional: Identifier of the merchant selling the product.extraParams- Optional: Additional tracking parameters to be merged with event data.
-
registerAdd2CartEvent
final Map<String, Object> registerAdd2CartEvent(String cliUbid, String skuId, String productPrices, String merchantId, Map<String, Object> extraParams)
Registers an "add to cart" event for tracking user interactions. This function constructs an event payload and calls
registerAdd2CartEventto log the "funnel_add2cart" event with the necessary parameters.- Parameters:
cliUbid- Unique identifier.skuId- The unique identifier of the product being added to the cart.productPrices- Optional: The price of the product, if available.merchantId- Optional: The identifier of the merchant selling the product.extraParams- Optional: Additional tracking parameters to be merged with event data.
-
registerPurchaseEvent
final Map<String, Object> registerPurchaseEvent(String cliUbid, Integer sales, String orderId, List<RegisterEvent.Product> products, Map<String, Object> extraParams)
Registers a "purchase" event for tracking completed sales. This function constructs an event payload by aggregating product details such as SKU IDs, prices, quantities, and merchant IDs. It then calls
registerTrackingEventto log the "funnel_salecomplete" event.- Parameters:
cliUbid- Unique identifier.sales- The total number of sales associated with the purchase.orderId- The unique identifier for the order (item identifier).products- A list ofProductobjects representing purchased items.extraParams- Optional: Additional tracking parameters to be merged with event data.
-
registerAdImpressionEvent
final Map<String, Object> registerAdImpressionEvent(String cliUbid, String uclid, Integer position, Map<String, Object> extraParams)
Registers an "ad impression" event for tracking ad views. This function constructs an event payload and calls
registerTrackingEventto log the "funnel_impression" event, capturing ad view interactions.- Parameters:
cliUbid- Unique identifier.uclid- Unique identifier for the ad impression.position- Optional: The position of the ad in the UI.extraParams- Optional: Additional tracking parameters to be merged with event data.
-
registerVideoProgressEvent
final Map<String, Object> registerVideoProgressEvent(String cliUbid, String uclid, Integer videoViewSec, Integer videoDurationSec, Map<String, Object> extraParams)
Registers a "video progress" event for tracking user engagement. This function logs the "funnel_video_progress" event to track how much of a video was watched.
- Parameters:
cliUbid- Unique identifier.uclid- Unique identifier for the video being tracked.videoViewSec- Number of seconds the video has been viewed.videoDurationSec- Total duration of the video in seconds.extraParams- Optional: Additional tracking parameters.
-
registerVideoActionEvent
final Map<String, Object> registerVideoActionEvent(String cliUbid, String uclid, Integer videoViewSec, String actionType, Map<String, Object> extraParams)
Registers a "video action" event to track user interactions with a video. This function logs the "funnel_video_action" event, capturing user interactions such as muting or unmuting a video at a specific timestamp.
- Parameters:
cliUbid- Unique identifier.uclid- Unique identifier for the video being tracked.videoViewSec- The timestamp (in seconds) at which the action occurred.actionType- The type of action performed on the video (e.g., "mute", "unmute").extraParams- Optional: Additional tracking parameters to be merged with event data.
-
register_adclick_event
@Deprecated(message = Use registerAdClickEvent instead, replaceWith = @ReplaceWith(imports = {}, expression = registerAdClickEvent(cliUbid, uclid, extraParams)), level = DeprecationLevel.WARNING) final Map<String, Object> register_adclick_event(String cli_ubid, String uclid, Map<String, Object> extra_params)
Registers an ad click event for tracking user interactions with advertisements. This function constructs a query parameter map containing the
uclidand any additional parameters. It then callstrack_events_processorto send the event to the ad click tracking endpoint.- Parameters:
cli_ubid- Unique identifier.uclid- Unique identifier for the ad click event.extra_params- Optional: Additional tracking parameters to be merged with the event data.
-
register_viewproduct_event
@Deprecated(message = Use registerViewProductEvent instead, replaceWith = @ReplaceWith(imports = {}, expression = registerViewProductEvent(cliUbid, skuId, productPrices, merchantId, extraParams)), level = DeprecationLevel.WARNING) final Map<String, Object> register_viewproduct_event(String cli_ubid, String sku_id, String product_prices, String merchant_id, Map<String, Object> extra_params)
Registers a "view product" event for tracking user interactions. This function constructs an event payload and calls
register_tracking_eventto log the "viewproduct" event with the necessary parameters.- Parameters:
cli_ubid- Unique identifier.sku_id- The unique identifier of the product being viewed.product_prices- Optional: Prices of the product, if applicable.merchant_id- Optional: Identifier of the merchant selling the product.extra_params- Optional: Additional tracking parameters to be merged with event data.
-
register_add2cart_event
@Deprecated(message = Use registerAdd2CartEvent instead, replaceWith = @ReplaceWith(imports = {}, expression = registerAdd2CartEvent(cliUbid, skuId, productPrices, merchantId, extraParams)), level = DeprecationLevel.WARNING) final Map<String, Object> register_add2cart_event(String cli_ubid, String sku_id, String product_prices, String merchant_id, Map<String, Object> extra_params)
Registers an "add to cart" event for tracking user interactions. This function constructs an event payload and calls
register_tracking_eventto log the "funnel_add2cart" event with the necessary parameters.- Parameters:
cli_ubid- Unique identifier.sku_id- The unique identifier of the product being added to the cart.product_prices- Optional: The price of the product, if available.merchant_id- Optional: The identifier of the merchant selling the product.extra_params- Optional: Additional tracking parameters to be merged with event data.
-
register_purchase_event
@Deprecated(message = Use registerPurchaseEvent instead, replaceWith = @ReplaceWith(imports = {}, expression = registerPurchaseEvent(cliUbid, sales, orderId, products, extraParams)), level = DeprecationLevel.WARNING) final Map<String, Object> register_purchase_event(String cli_ubid, Integer sales, String order_id, List<RegisterEvent.Product> products, Map<String, Object> extra_params)
Registers a "purchase" event for tracking completed sales. This function constructs an event payload by aggregating product details such as SKU IDs, prices, quantities, and merchant IDs. It then calls
register_tracking_eventto log the "funnel_salecomplete" event.- Parameters:
cli_ubid- Unique identifier.sales- The total number of sales associated with the purchase.order_id- The unique identifier for the order (item identifier).products- A list ofProductobjects representing purchased items.extra_params- Optional: Additional tracking parameters to be merged with event data.
-
register_adimpression_event
@Deprecated(message = Use registerAdImpressionEvent instead, replaceWith = @ReplaceWith(imports = {}, expression = registerAdImpressionEvent(cliUbid, uclid, position, extraParams)), level = DeprecationLevel.WARNING) final Map<String, Object> register_adimpression_event(String cli_ubid, String uclid, Integer position, Map<String, Object> extra_params)
Registers an "ad impression" event for tracking ad views. This function constructs an event payload and calls
register_tracking_eventto log the "funnel_impression" event, capturing ad view interactions.- Parameters:
cli_ubid- Unique identifier.uclid- Unique identifier for the ad impression.position- Optional: The position of the ad in the UI.extra_params- Optional: Additional tracking parameters to be merged with event data.
-
register_video_progress_event
@Deprecated(message = Use registerVideoProgressEvent instead, replaceWith = @ReplaceWith(imports = {}, expression = registerVideoProgressEvent(cliUbid, uclid, videoViewSec, videoDurationSec, extraParams)), level = DeprecationLevel.WARNING) final Map<String, Object> register_video_progress_event(String cli_ubid, String uclid, Integer video_view_sec, Integer video_duration_sec, Map<String, Object> extra_params)
Registers a "video progress" event for tracking user engagement. This function logs the "funnel_video_progress" event to track how much of a video was watched.
- Parameters:
cli_ubid- Unique identifier.uclid- Unique identifier for the video being tracked.video_view_sec- Number of seconds the video has been viewed.video_duration_sec- Total duration of the video in seconds.extra_params- Optional: Additional tracking parameters.
-
register_video_action_event
@Deprecated(message = Use registerVideoActionEvent instead, replaceWith = @ReplaceWith(imports = {}, expression = registerVideoActionEvent(cliUbid, uclid, videoViewSec, actionType, extraParams)), level = DeprecationLevel.WARNING) final Map<String, Object> register_video_action_event(String cli_ubid, String uclid, Integer video_view_sec, String action_type, Map<String, Object> extra_params)
Registers a "video action" event to track user interactions with a video. This function logs the "funnel_video_action" event, capturing user interactions such as muting or unmuting a video at a specific timestamp.
- Parameters:
cli_ubid- Unique identifier.uclid- Unique identifier for the video being tracked.video_view_sec- The timestamp (in seconds) at which the action occurred.action_type- The type of action performed on the video (e.g., "mute", "unmute").extra_params- Optional: Additional tracking parameters to be merged with event data.
-
currentTime
final Long currentTime()
-
-
-
-