@lerix-dev/lerix-core 1.4.0 or later. It is the
engine behind the React, Next.js and Angular SDKs, and it also reports errors.
For what each module does and what you see in the dashboard, read
Feedback, NPS surveys and
Analytics.
Setup
main.ts
In-app feedback
@lerix-dev/lerix-core/feedback), loaded only
when the dialog or the NPS card is first used, so bundlers put them in their
own chunk.
Override the dashboard settings for one call:
Hide sensitive content
Adddata-lerix-mask to any element to black it out of screenshots:
Your own form
localStorage fallback) and retried
until the server accepts it. status is queued and id is missing while the
browser is offline.
NPS survey
minAppStarts counts visits after 30 minutes of inactivity. See
When the survey is shown.
In debug mode, the console says why a survey was skipped.
Analytics
$first_open,$session_start/$session_end(per tab, a new session after 30 minutes of inactivity),$app_update(whenreleasechanges) and$screen_view(frompushState,replaceStateandpopstate) are recorded automatically.- If your router doesn’t change the URL, or you want cleaner names, call
Lerix.analytics.disableAutoScreens()and record screens yourself withLerix.screen(). trackandscreennever throw. Invalid events and properties are dropped on the device.- Events are batched and sent with
fetch(..., { keepalive: true })when the tab is hidden, so the last events of a visit aren’t lost. Lerix.analytics.getSessionId()returns the current session ID, which error reports also carry.
Call
Lerix.setUser after sign-in. Analytics
then counts the person across devices, and you can reply to their feedback by
push.Breadcrumbs
navigation, log, http, ui, custom.