Skip to main content
Events are the behaviour NSL learns from: a view, a click, an add-to-cart, a purchase, a skip, a search. They drive personalisation, analytics, experiments and model training. This page covers sending them. To create and weight event types in the console, see the Events page.

Event types and weights

Each event refers to an event type by its integer ID, for example 42. Event types are created in Data → Events → Configure signals, where each one has: Every workspace starts with View (weight 20), Click (60) and Purchase (100). Add more from the event library, which has sensible default weights for common actions: You can also create custom event types, and change any label or weight later. Training uses new weights from its next run; request-time features that read weights, such as search intent and impression fatigue, use them straight away.

Send events

A request can carry one event or an array of up to 200. The JavaScript, PHP and Swift clients buffer events; use their documented flush and completion methods before a short-lived process exits. The Next.js wrapper sends immediately and its flush() is a compatibility no-op.
Send purchases and other conversions from your server, where you know they really happened. Events that arrive from a browser can be forged by anyone who can read your page.

Credit events to recommendations

Every recommendation and search response has a request_id. When a user clicks or buys something they saw in that response, send the same request_id with the event. This is how:
  • Analytics reports click-through and conversion per context and per request.
  • Experiments can associate behaviour with a variant. Read the metric definitions and limitations before interpreting a result.
  • Explainability replays the exact decision a user saw.
The JavaScript, PHP and Swift clients can remember the latest single-list or search request_id (propagateRecommendationRequestId, on by default). Next.js requires explicit attribution. For several rails or a client shared by concurrent users, always pass the matching response’s request_id, context and session explicitly.

Searches are events

A search says clearly what someone wants, so NSL records it as an event: one with a query and no item_id, on the event type your search signal is bound to. It carries that event type’s weight, exactly as a click would.
The items a search showed are stored as impressions, never as items the user chose, so they do not affect training, “don’t re-show seen items” or popularity. When the user opens a result, send a normal click with that item, and optionally the query they came from.

How searches steer recommendations

On each later recommendation request for that user, NSL weighs their searches from the last 14 days against their item events. Each signal counts its event weight and halves every 72 hours. The searches’ share of that total decides how far recommendations lean towards them:
  • the items closest to each search join the candidates, with slots split between searches by weight, so three different searches bring three kinds of item rather than one blurred average;
  • after ranking, the order is blended towards whichever search each item matches best, by that share;
  • your rules still apply afterwards, so a boost or pin you configured wins.
Requests that already state a narrower intent (a search, an item_id seed, a basket or an auto section) are left alone. The response reports what searches contributed in search_intent, and the user’s drawer in Data → Users shows the same breakdown. To tune it, change the weight of your Search event. Set it to 0 to record searches without them steering anything, or turn off Search intent in a pipeline’s scoring stage to exclude one context.

Integration signals

The embed, the Shopify app, the platform modules and the history importers record behaviour for you. None of them send an event name. Each reports a signal, a fixed concept NSL defines, and your workspace binds each signal to one of your event types.
  • Enabling an integration creates its event types. Creating an embed key or starting an import creates an event type for each signal it reports that is not yet bound. These count towards your plan’s event-type limit.
  • Nothing is matched by name. An event you created called “clicked” is not assumed to be the click signal.
  • Rebind to reuse an event you already track. In Data → Events → Configure signals → Integration signals, choose which event type each signal lands on. The list shows which integrations report each signal.
  • A bound event type cannot be deleted. Rebind its signal first.
This is what keeps behaviour consistent across sources: purchases from Shopify, your server and a CSV import all land on the event type bound to purchase.

Check events are arriving

Open Data → Events. The live table shows each event with its user, item, placement, session and time, and you can filter to one user or item. A user’s drawer in Data → Users lists their history. See Events page and Users.

Next

Serve recommendations

Ask for ranked items for each placement.

Import history

Load past behaviour so models train from day one.