Skip to content

SDK Events

The Hubble SDK can post events back to the parent application, allowing you to track user behavior and respond to actions within the gift card store. This is useful for analytics.

How to Listen for Events

To receive events from the SDK, you will need to register an event listener. Please refer to the platform-specific integration guides for detailed instructions on how to implement this.

Event Reference

The SDK emits various events with associated data. Here is a list of the primary events you can listen for.

Event NamePropertiesExample PayloadDescription
visit_home(none)Sent when the user visits the home screen.
visit_search(none)Sent when the user visits the search screen.
visit_categorycategoryName{"categoryName":"FASHION"}Sent when a user visits a specific category page.
visit_brand_l2brandName{"brandName":"Amazon"}Sent when a user visits a specific brand’s page.
visit_checkout_summarybrandName, amount{"brandName":"Amazon","amount":500}Sent when the user visits the checkout summary screen.
payment_initiatedbrandName, amount, paymentMode, productId{"brandName":"Amazon","amount":500,"paymentMode":"UPI","productId":"01GMAVS2CHXR0XP1BZSTA9A44K"}Sent when a payment is initiated.
payment_failbrandName, amount{"brandName":"Amazon","amount":500}Sent when a payment fails.
payment_successbrandName, amount, vouchersCount{"brandName":"Amazon","amount":500,"vouchersCount":1}Sent when a payment is successful.
coin_paymentamount, coins, baseDiscount, couponDiscount, totalDiscount{"amount": 500, "coins": 10, "baseDiscount": 100, "couponDiscount": 50, "totalDiscount": 150}Sent if the entire payment is made using only coins.
search_queryquery{"query": "amazon card"}Sent whenever the user types in the search field.

Default Screen Visit Events

A generic visit_{screen_name} event is sent whenever a user navigates to any screen within the SDK. For example, visiting the “Apply Coupons” screen sends a visit_coupons event.

Screen Names

The following are the possible values for {screen_name}:

  • home
  • home_menu
  • coupons
  • checkout_summary
  • brand_l2
  • voucher_edit_modal
  • voucher_generation_success
  • voucher_generation_fail
  • voucher_generation_loader
  • transactions
  • transaction_l2
  • how_to_use
  • tnc
  • brand_unavailable_modal
  • warning_modal
  • help_and_support