Core concepts

Keys, consent, screen names and the customer reference. These apply to every platform.

Keys

KeyWhere it livesWhat it can do
nb_pub_…Inside the app or websiteWrites events and requests deletion of its own installation’s data. It reads nothing, except the device’s own support conversation if you enable it, using a secret stored on that device.
nb_sec_…Your server onlySends server events, and deletes a customer’s data by their reference.

A key is shown in full only once. When you rotate it, the old one keeps working for 30 days by default for versions already in the stores. If it leaks, revoke it immediately.

Screen names

Customer reference

setUserRef is optional and lets you follow a specific customer. The value is 16 to 128 characters (A-Z a-z 0-9 _ -) and not digits only. No email, phone number or name.

Compute it on your server with HMAC and a secret key, because a plain hash of a user number is easy to guess:

Node.js (server)
import { createHmac } from 'node:crypto';

const userRef = createHmac('sha256', process.env.USER_REF_SECRET)
  .update(String(user.id))
  .digest('hex');

A reference is scoped to one app, and Nabd never links two apps.

Events

EventAutomatic?Note
Rage tapYesThree or more on the same spot within a second. Exclude number pads and +/- buttons.
Dead tapYes (experimental)Flutter: only taps on a disabled button or link; record an enabled button that does nothing yourself. Web: disabled elements, and interactive elements after which nothing happens (details).
Code errorsYesType and fingerprint only, without the message text.
Error message shown to the userNoerrorShown
Slow loadingPartlyNetwork adapters, or startLoading and stopLoading.
Task completionNotaskCompleted. Needed to compute drop-offs and loops.

Drop-offs and loops are computed on the server for screens you mark as a “task” in the dashboard.

Error trail

With every code error, network failure, error message or unexpected exit (on mobile), the SDK sends the user’s last 10 steps without you naming any event. It is on by default and shows in the dashboard under “Latest errors” on the screen page, and in the customer profile timeline.

In the trailNot in the trail
Names of screens that were opened (cleaned like all screen names)Any text from the screen or from an input field
The type of element tapped: button, link, text field, toggle, tab, row, image…The element’s name or id, or where the tap landed
Seconds before the error, and how many times a step repeated in a rowElements excluded from tap detection, and the support chat

Extra data

Only these keys are allowed in meta; any other key is dropped on the device and on the server:

meta keys
taps  window_ms  duration_ms  error_type  error_fingerprint  fatal  http_status  step

The SDK adds the trail key itself; if you send it from your code it is dropped on the device.

Offline

Events are stored locally (at most 1000, oldest dropped first) and sent in batches: at 50 events, every two minutes, or when the app goes to the background.