Installation
Client setup
Configuration options
Fetching personalised content
Single workflow
Multiple workflows in parallel
Run options
Handling the response
run() returns a RunResult with a discriminated union body:
RunResult fields
Click tracking
EveryRunResult includes a redirectionUrl and a trackClick() callback. This ensures click tracking is always recorded — devs must use one of the two patterns below.
Option 1: Redirect link (recommended for CTAs)
UseredirectionUrl as the href on your call-to-action links. The browser handles everything — the runner tracks the click and 302-redirects to the final destination.
Option 2: Server-side fire-and-forget
Callresult.trackClick() when you control navigation and want to track the click in the background. It calls the runner click endpoint with redirect: manual and swallows all errors — it never throws.
redirectionUrl.
Identity helpers
extractUserId(cookies)
Extracts the Reelevant user ID from cookies. Priority: rlvt_clientId > rlvt_tmpId.