Package 

Class RegisterEvent


  • 
    public final class RegisterEvent
    
                        

    Handles event tracking for different user actions such as product views, add-to-cart, purchases, ad impressions, and ad clicks.

    • Constructor Detail

      • RegisterEvent

        RegisterEvent()
    • 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 uclid and any additional parameters. It then calls track_events_processor to 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 registerViewProductEvent to 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 registerAdd2CartEvent to 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 registerTrackingEvent to 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 of Product objects 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 registerTrackingEvent to 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 uclid and any additional parameters. It then calls track_events_processor to 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_event to 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_event to 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_event to 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 of Product objects 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_event to 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.