Identity model

Three IDs and when to use which

Every event GetFluxly accepts carries one or more identifiers. There are three. Picking the right one for a given call site is what makes profiles stitch correctly down the line.

IDPurposeWhere it's setLifetime
anonymous_idFirst-touch device identifierOmitted by default (browser SDK stores nothing while anonymous); server derives a gfh_ hash at ingest insteadOne day (the hash salt rotates daily); persisted and long-lived only with cookieless: false
external_idYour application's user IDYour code, once the user signs inForever
user_idGetFluxly's resolved profile IDServer response after the first stitchForever

The lifecycle

  1. Anonymous visit. By default the browser SDK does not generate or persist an anonymous_id. It omits anonymous_id from events entirely, and the server derives a daily-rotating gfh_ hash id at ingest.
  2. Sign-up / sign-in. Your code learns the application user. Call identify(externalId, traits), the SDK attaches both anonymous_id and external_id to the identify event.
  3. Stitching. The identity worker resolves the pair into a single user_id. Subsequent events use either ID; both route to the same profile.
  4. Across devices. A second device starts with its own anonymous_id. The first identify with the same external_id stitches that device into the existing profile.

Server-side calls

Server SDKs typically know the application user (external_id) already and skip the anonymous_id. That's fine, but it cuts the device-attribution chain, server events come in unattributed to the originating browser session unless your code threads through the anonymous_id from the request.

Where the rules live

The full identity-stitching algorithm and the conflict-resolution rules are in the stitching guide. The contract is locked.