Skip to content

Event types

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

Allowed values

event_type Typical meaning
page_view Page context / navigation
identify User context and consent
product_view Product detail view
listing_view Category, search, or brand listing
add_to_cart Item added; usually needs product + basket
remove_from_cart Item removed; usually needs product + basket
basket_view Cart page or basket snapshot
checkout_started Checkout entry (often with basket)
purchase Completed order (transaction)
custom Tenant-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 key Default event_type
page page_view
user identify
product product_view
basket basket_view
listing listing_view
transaction purchase

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_type Expected context (semantic) Default trigger key
page_view page page
identify page, user user
product_view page, product product
listing_view page, listing listing
add_to_cart page, product, basket use push + event_type
remove_from_cart page, product, basket use push + event_type
basket_view page, basket basket
checkout_started page, basket use push + event_type
purchase page, transaction transaction
custom page (minimum) fallback