Overview
Client-side personalisation uses a JavaScript tracking script that loads in the browser. It fetches personalised content after the page renders and injects it into designated DOM zones. This is the original integration method and works alongside the Server Side SDK.When to use client-side personalisation
| Use case | Recommended approach |
|---|---|
| Content that must be visible immediately (no flash) | Server-side SDK |
| SEO-critical personalised content | Server-side SDK |
| Event tracking (clicks, impressions, conversions) | Client-side script |
| Consent-dependent content | Client-side script |
| Overlays, popups, and floating elements | Client-side script |
| Pages without server-side rendering (SPAs) | Client-side script |
| Quick integration without code changes | Client-side script + Browser Extension |
Integration methods
1. Script tag (manual)
Add the Reelevant tracking script to your page. The integration URL is generated from the Integration modal in the workflow editor.- Creates an anonymous identity (
rlvt_tmpIdcookie) if none exists - Scans the DOM for
[rlvt]attribute zones - Fetches personalised content from the runner
- Injects content into matching zones
- Tracks impressions and clicks
2. HTML zones
Mark elements on your page where personalised content should appear:| Attribute | Description |
|---|---|
rlvt | Marks the element as a Reelevant zone |
rlvt-wid | Workflow ID |
rlvt-ep | Entrypoint shortId within the workflow |
3. Browser extension integrations
The Reelevant Browser Extension provides a no-code way to configure client-side integrations:Select a workflow
In the extension side panel, browse your workflow list and select the one to integrate.
Configure the integration
Use the DOM selector to visually pick the HTML element where content should be injected. Configure datalayer variables and filter conditions.
Integration triggers
Browser extension integrations support three types of triggers:| Trigger | Description |
|---|---|
| URL pattern | Content loads when the page URL matches a pattern (e.g., /products/*) |
| DataLayer variable | Content loads when a specific value is present in the dataLayer (e.g., GTM events) |
| CSS selector | Content is injected into a specific DOM element selected via the extension |
Identity management
The client-side script manages two identity cookies:| Cookie | Purpose | Lifetime |
|---|---|---|
rlvt_tmpId | Anonymous visitor ID, created automatically | 365 days |
rlvt_clientId | Known user ID, set by your application | 365 days |
Combining with server-side SDK
When using both the server-side Web SDK and the client-side script on the same page:- Server-rendered zones should include
data-rlvt-ssr="true"on the wrapper element - The client-side script automatically skips zones marked with
data-rlvt-ssr - The client script still handles event tracking, client-only zones, and integrations
DataLayer integration
The script reads values from thewindow.dataLayer array (Google Tag Manager compatible):