Skip to main content
Visitors are anonymous by default. Each one still gets a user record with their full history, but Bigdelta doesn’t know who they are until you tell it. Call identify after every successful signup and login. From that point on, events are attributed to the ID you provide — and everything the visitor did while anonymous (properties and past events) is merged into the identified record, so you keep their full history from first visit onward. What you need to provide:
  • A stable, unique user ID from your system — use your database user ID, not an email address, since emails can change
The merge of anonymous history happens once, on the first identify call. Calling identify again for an already identified visitor does nothing, so it’s safe to call on every login.

Setting record properties

You can store any properties on a user record. Use set for values that should update, and set_once for values that should never be overwritten:
client.getIdentifier('users') returns the currently persisted user ID, so you don’t need to keep track of it yourself.

Resetting on logout

Call reset when a user logs out. It disassociates future events from the identified user and starts a new anonymous session:
Without it, activity from the next person on the same browser would be attributed to the logged-out user.