RudderStack (event pipeline)¶
This sets up the transport that carries visitor behavior into the engine: a Source (where the UI sends events) and a Destination (a webhook that forwards them to the engine). Done once, by whoever deploys. Application developers only need the Write Key and Data Plane URL this produces (see Integration).
flowchart LR
ui["UI (RudderStack SDK)"] -->|track / identify| src["Source (JavaScript)"]
src -->|forward| dst["Destination (Webhook)"]
dst -->|POST| ingest["/api/ingest"]
ingest --> redis[("Redis buffer + user model")]
classDef store fill:#EFEAE0,stroke:#A8895B,color:#423D34;
class redis store;
1. Create the Source (JavaScript)¶
- RudderStack Cloud → Sources → Add Source → JavaScript. Name it (for example
memorise-ui). - Open the source and copy its two values:
| Value | Used for |
|---|---|
| Write Key | rudderanalytics.load(WRITE_KEY, ...) in the UI |
| Data Plane URL | rudderanalytics.load(..., DATA_PLANE_URL) in the UI |
- Hand both to the UI developers. That is all they need; see Send Events.
2. Create the Destination (Webhook)¶
- From the same source, Add Destination → Webhook.
- Configure it:
| Setting | Value |
|---|---|
| Webhook URL | https://merely-matrix-naples-jews.trycloudflare.com/api/ingest |
| Method | POST |
| Headers | Content-Type: application/json (added automatically) |
- Connect the JavaScript source to this Webhook destination so events flow
source -> destination.
The Webhook destination forwards each event as a standard RudderStack payload (with event,
userId, nested properties, context, timestamp). The engine reads that shape directly,
no RudderStack Transformation is required.
Temporary tunnel
*.trycloudflare.com URLs are ephemeral. When the tunnel restarts, update the Webhook URL
(or point it at your stable deployment domain). The Data Plane must be able to reach this
URL publicly.
3. Events that matter¶
The UI emits these track events; the engine uses each:
| Event | Purpose |
|---|---|
CONTENT_VIEW_STARTED / CONTENT_VIEW_ENDED |
dwell, completion, impressions |
CONTENT_LOOKUP |
search and clicks |
SURVEY_ANSWERED |
survey signal, cold start |
identify calls bind events to a user_id. Other RudderStack events (page, etc.) are
harmless; the normalizer ignores what it does not recognise.
4. Verify¶
- Load a UI page wired with the SDK, or use RudderStack's Send test event.
- Watch the source's Live Events tab to confirm events arrive.
- Check the destination's delivery / events tab for
200responses from/api/ingest. - Confirm the model updated:
5. What the engine expects¶
The webhook receives standard RudderStack track payloads. The recsys normalizer reads nested
properties (content, details, context, answers) and userId. The exact shapes are in
the event catalog; /api/ingest accepts a single event
or a batch.
Once wired, hand the Write Key and Data Plane URL to developers and point them at Send Events.