Skip to main content
An event is any client-side or server-side action a visitor takes on your site or app—page loads, impressions, clicks, check-outs, dwell time, and more. Capturing these signals fuels our behaviour-based ranking engine and lets us update recommendations in real time.

Why send rich event data?

Our pipeline automatically hunts for the most predictive features, so the more properties you include, the stronger the model becomes. Don’t worry about over-engineering the schema up front—just send what you have and the platform will do feature selection for you. Rich, well-linked behavioural data is how we unlock advanced capabilities such as dynamic re-ranking and session-aware personalisation.

Standard Event Types

TypeTypical usageMandatory fields
page_viewSearch results, PDP, checkoutpage_type
module_viewCarousel / ad slot on a pagerank
impressionSingle result shown to useritem_id, rank
clickTap, like, add-to-cart clickitem_id, click_type
conversionOrder, booking, lead form submitconversion_type, item_ids[]
dwell_timeTime user kept page opendwell_ms
scrollHow long they scrolled for
Sequen also supports custom event types that you can define with any set of properties to model your unique events.

Reserved Fields

These keys have special meaning and must not be renamed or repurposed.
FieldTypeReqNotes
idstringUnique per event. Autogenerated.
typestringYesStandard event or custom event type.
original_timestampdatetime/unixYesWhen the user performed the action.
server_timestampdatetime/unixWhen the recommendation was requested from Sequen on behalf of user.
ingest_timestampdatetime/unixautoWhen the event was received and ingested.
uidstringYes*Id of the user. (relation on User table)
sid (session_id)stringYes*User session id.
cid (client_id)stringYes*User Device, browser, etc.
rec_idstringUsed to end-to-end tracing of recommendations.
page_view_idstringID of the page_view event related to this event. Optional but recommended for event linking.
module_view_idstringID of the module_view event related to this event. Optional but recommended for event linking.
impression_idstringLink a click back to its view. Optional but recommended for attribution.
rankintegerRanking position of item.
item_id / item_ids[]string / array1: N depending on event
item_id_relationrelationDefined what Table item_id/item_ids[] belongs to.
At least one of uid, sid, or cid is required. You must provide one or more of these identifiers to properly track user behavior across events.
While page_view_id, module_view_id, and impression_id are optional, including them significantly improves event attribution, funnel analysis, and model training. We recommend adding these fields when possible.

Standard Event Type fields

FieldTypeRequiredDescription
page_typestringYes* (page_view event)Name of page for view. (e.g., search, checkout)
click_typestringYes* (click event)Type of click. (e.g., like, add_to_cart)
conversion_typestringYes* (conversion event)Type of conversion. (e.g., purchase, add_to_cart)
dwell_msnumberYes* (dwell_time event)Dwell time.
Anything not in the table above is treated as a custom field. Allowed field types: string, number, boolean, relation, array<string>, time, embedding, object.

Mandatory Fields By Event Type

Event TypeTypical usageMandatory fields
page_viewsearch result page, PDP, checkoutpage_type
module_viewcarousel, ad slotrank
impressionindividual record shownitem_id, rank
clickany interaction (tap, like, add‑to‑cart click)item_id, click_type
conversionorder, booking, lead submitconversion_type, item_ids[]
dwell_timetime spent after loaddwell_ms

Example impression

{
  "id": "evt_c9f3c",
  "type": "impression",
  "original_timestamp": "2025-07-14T09:15:22.401Z",
  "uid": "u_4432",
  "page_view_id": "evt_c9f38",
  "module_view_id": "evt_c9f39",
  "item_id": "sku_99201",
  "rank": 3,
  "rec_id": "rec_0ujsswThIGTUYm2K8FjOOfXtY1K",
  "traffic_source": "seo",
  "seen_above_fold": true,
  "device_info": {
    "platform": "ios",
    "version": "17.2",
    "model": "iPhone 15"
  }
}

Example conversion

{
  "id": "evt_d0a11",
  "type": "conversion",
  "original_timestamp": "2025-07-14T09:17:48.009Z",
  "uid": "u_4432",
  "conversion_type": "purchase",
  "item_ids": ["sku_99201", "sku_88211"],
  "order_total": 699.98,
  "currency": "USD",
  "payment_method": "apple_pay",
  "shipping_address": {
    "country": "US",
    "state": "CA",
    "postal_code": "94102"
  }
}

Example media event

{
  "id": "evt_cb002",
  "type": "video_pause",
  "original_timestamp": "2025-07-14T09:18:21Z",
  "uid": "u_4432",
  "item_id": "video_128",
  "current_time_sec": 212,
  "reason": "user_click"
}

Endpoint

POST /v1/events

Example Request

curl -X POST https://api.sequen.com/v1/events \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "type": "impression",
    "original_timestamp": "2025-07-14T09:15:22.401Z",
    "uid": "u_4432",
    "page_view_id": "evt_c9f38",
    "module_view_id": "evt_c9f39",
    "item_id": "sku_99201",
    "rank": 3
  }'

Good, Better, Best Data

Our data request is divided into three tiers: Good, Better, and Best. Below, we outline the data included in each category, with “Good” covering the mandatory requirements for a baseline model, while “Better” and “Best” provide additional data to enhance performance.
Event AttributeGoodBetterBest
page_id
search_query
geolocation
locale/language
device_type
logged_in
partial_form_fills
review_click
outbound_click
dwell_time
referral_source
scroll_depth
cart_content
email_campaign
push_notifications

Why so much event detail?

Rich, well‑linked behavioral data lets us train and continuously improve ranking models, similar to how Algolia unlocks Dynamic Re‑Ranking and Personalization only when click & conversion events are sent.