Frontend IntegrationWeb ObjectEvent types

Event types

Events sent to the backend use ExternalEventType on the envelope. Values are lowercase snake-case strings.

Events sent to the backend use ExternalEventType on the envelope. Values are lowercase snake-case strings.

Allowed values

event_typeTypical meaning
page_viewPage context / navigation
identifyUser context and consent
product_viewProduct detail view
listing_viewCategory, search, or brand listing
add_to_cartItem added; usually needs product + basket
remove_from_cartItem removed; usually needs product + basket
basket_viewCart page or basket snapshot
checkout_startedCheckout entry (often with basket)
purchaseCompleted order (transaction)
customTenant-defined (fallback when no specific mapping applies)

Default mapping (assignment trigger)

When you assign to a watched key and do not override event_type, defaults are:

Trigger keyDefault event_type
pagepage_view
useridentify
productproduct_view
basketbasket_view
listinglisting_view
transactionpurchase

Overriding event_type

  1. Set sophi_object.event_type before the assignment that should use the override, or
  2. Pass event_type inside SophiTracker.push() — it applies to all collection triggers fired by that call.

add_to_cart, remove_from_cart, and checkout_started typically require an explicit override plus the right objects in sophi_object (see below).

Semantic “required” context

Downstream consumers expect certain objects per event. The SDK does not automatically add missing optional sections; it sends the payload derived from what you set on sophi_object. Design your integration so each event type includes the right context.

event_typeExpected context (semantic)Default trigger key
page_viewpagepage
identifypage, useruser
product_viewpage, productproduct
listing_viewpage, listinglisting
add_to_cartpage, product, basketuse push + event_type
remove_from_cartpage, product, basketuse push + event_type
basket_viewpage, basketbasket
checkout_startedpage, basketuse push + event_type
purchasepage, transactiontransaction
custompage (minimum)fallback

On this page