Skip to main content
Requires @lerix-dev/lerix-react 1.3.0 or later (with @lerix-dev/lerix-core 1.4.0). For what each module does and what you see in the dashboard, read Feedback, NPS surveys and Analytics.

Setup

Nothing extra is needed beyond the LerixProvider from Installation. Analytics starts on mount, and URL changes are recorded as screen views through the History API. The provider’s options accept these settings for the new modules:
main.tsx

In-app feedback

The dialog (message, labels, screenshot with pen annotation, email, review with Show details) renders inside a Shadow DOM, so your CSS can’t reach it and it can’t break your layout. It follows light or dark mode (.dark or [data-theme] on <html>, else the OS) and ships English and Arabic (right to left). The dialog and the screenshot library load on first use, in their own chunk. useLerixFeedback() returns { show, submit, setUserEmail, isOpen }. show(options?) resolves { submitted, id?, clientId? } and takes:

Hide sensitive content

LerixConfidential adds data-lerix-mask, which blacks the element out of screenshots. You can also put the attribute on any element yourself.
The dialog also offers pixel-perfect capture, which uses the browser’s screen-share prompt to capture canvas, video and cross-origin content exactly.

Your own form

Feedback is queued in IndexedDB and retried until the server accepts it.

NPS survey

Or call it yourself at the right moment:
useLerixSurvey({ autoShow: true, delayMs: 5000 }) changes the delay. The SDK shows the card only when this install is due (see When the survey is shown).

Analytics

$first_open, $session_start / $session_end (per tab, a new session after 30 minutes of inactivity), $app_update and $screen_view (from the URL) are recorded automatically. track never throws. The core facade is re-exported for code outside components:
Events are batched and sent with fetch(..., { keepalive: true }) when the tab is hidden, so the last events of a visit aren’t lost.
Call setUser after sign-in. Analytics then counts the person across devices, and you can reply to their feedback by push.
The last 50 breadcrumbs are attached to feedback. Navigation is added automatically.
Categories: navigation, log, http, ui, custom.