@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 theLerixProvider 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
.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.
Your own form
NPS survey
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:
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.Breadcrumbs
The last 50 breadcrumbs are attached to feedback. Navigation is added automatically.navigation, log, http, ui, custom.