Skip to main content

Installation

No additional dependencies are needed. The Nuxt adapter uses structural typing — it does not import from the nuxt or h3 packages.

Setup

1. Create the client instance

2. Add identity middleware

Create a server middleware that ensures every visitor has an identity cookie:

Request flow

Using useReelevant

The useReelevant helper auto-extracts visitor identity, user-agent, IP, and referer from the H3 event:

Fetching multiple zones

In a Nuxt page (SSR)

Fetch personalised content in a server route or plugin, then use it in your page:

Lower-level helpers

extractUserIdFromEvent(event)

Extract the user ID directly from an H3 event’s cookie header:

runOptionsFromEvent(event)

Get all context fields (userId, userAgent, ip, referer) from an event:

Handling JSON responses

For headless personalisation where the workflow returns JSON:

Click tracking

Click tracking must always be set up after display. Every content display should have a corresponding click tracking mechanism — either a redirect link or a trackClick() call.
Every RunResult includes redirectionUrl and trackClick(). Use one of the two patterns:
See Core SDK — Click tracking for full details.

Compatibility with the client tracker

Server-rendered zones should include data-rlvt-ssr="true" in the wrapper element. The client-side tracker automatically skips these zones.