Lerix 1.3.0 or later. For what each module does and what you see
in the dashboard, read Feedback,
NPS surveys and Analytics.
The feedback and NPS UI needs iOS 15+ or macOS 12+. On macOS the
feedback sheet has no screenshot step. Everything else on this page,
including headless
Lerix.feedback.submit, works on iOS 13+ and macOS 11+.
On older systems show reports submitted: false and maybeShowNps
returns false.Setup
Analytics starts whenLerix.initialize runs. Two optional parameters
configure these modules:
AppDelegate.swift
In-app feedback
Callshow from anywhere, in UIKit or SwiftUI. The current screen is
captured first, then the sheet opens:
show presents from the top-most view controller of the key window; pass
from: to choose another.
Options
Labels, the email mode and the screenshot mode come from the dashboard. Override them for one call:Shake to report
Open the feedback flow when the user shakes the device. It’s off until you turn it on:super keeps
them from reaching the SDK.
Hide sensitive views
Your own UI
submit throws for an empty message or an invalid email. Offline, the
feedback is kept on the device and result.id is nil until it is sent.
Language and colours
The UI ships in English and Arabic (right to left) and follows the app’s language and light or dark mode.NPS survey
maybeShowNps returns true when the survey was shown. The sheet (score,
follow-up, thanks) opens at half height. The SDK shows it only when this
install is due (see When the survey is shown);
with debugMode: true it logs why a survey was skipped.
Analytics
$first_open, $session_start / $session_end, $app_update and
$screen_view are recorded automatically. Launches in the background (a
silent push, a background fetch) don’t count as a session until the app comes
to the foreground.
Screen views
In SwiftUI, name each screen with.lerixScreen:
uikitScreenTracking in LerixAnalyticsOptions to record a
screen view each time a view controller appears. Rename a controller, or skip
it with an empty string:
Call
Lerix.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 sent with feedback and with handled error reports. Screen views are added automatically..navigation, .log, .http, .ui, .custom.