Identifying users
Link anonymous devices to your own user IDs.
Every device gets a random anonymous ID the first time your app runs, and users show up in the dashboard as e.g. Anonymous #hwbw31. Call identify after login to show your own user ID instead, so your team can look up a specific customer.
After login
import { Riveora } from '@riveora/react-native';
async function onLoggedIn(user: { id: string }) {
await Riveora.identify(user.id);
}From then on, every event carries your ID, and the person’s earlier anonymous activity on that device stays linked to the same profile.
Pass your database ID or another opaque value, up to 120 characters (numbers are sent as text). Email addresses and phone numbers written with a + or spaces are refused: the call is ignored and a warning is logged. Don’t pass a name or a phone number in any form. An empty ID or one longer than 120 characters is ignored with a warning too; identify never throws.
On sign-out
Call reset so the next person who signs in on the same device isn’t merged with the previous one. It creates a fresh anonymous ID, forgets the identified ID and starts a new visit. Signing in with a different account also starts a new person and visit, even without reset, so two accounts on one device never share history or purchases.
async function onSignOut() {
await Riveora.reset();
}Events already waiting are still sent, as the person who made them. If the same person signs straight back in (within 30 seconds, before anything else happens), for example because your sign-in code briefly reports “signed out” at launch, reset is undone and their visit carries on.
Saving people to look at later
Spotted someone worth following up on? Click the bookmark on their row in Users, or Save on their page, and add a short note on why. They then appear under the Saved tab, newest first, with a badge when they’ve come back since you last opened their page. On their page, their visits show where you saved them, and visits since you last looked are marked New.
- It follows them when they sign in. Someone saved while anonymous stays saved after
identifylinks them to an account. - Saved people stay, with their note and every visit they’ve made, for as long as the app exists in Riveora.
- Notes are only shown in your dashboard and can’t contain email addresses or phone numbers: refer to people by their user ID.
- Up to 1,000 per app. Remove someone to make room. Only people your app has sent data for can be saved.