Skip to main content

Identify

Identifying tells Galinum which of your users this browser session belongs to. Either pass userId (and optionally traits) to the provider — the SDK identifies automatically whenever it changes — or call identify yourself:
Traits are shallow-merged server-side: identifying with one trait updates that trait without wiping the rest. On logout, call reset() so tracking and message delivery stop until the next identify.

Track

track records a behavioral event — the substrate your agent analyzes to decide who sees which campaign:
Tracking requires an identified user; calls before identify are ignored (and warned about in development).

Auto-collected context

Like other analytics SDKs, Galinum automatically collects device and demographic context. Auto-collected keys are $-prefixed so they can never collide with your own traits, and your explicit values always win on collisions. Attached to the user on identify: Attached to every event on track: Geo traits are resolved server-side from the request IP, so the browser can’t spoof them via traits.

Opting out

Disable all automatic collection with a single prop:
With autoContext={false} the SDK sends only the traits and props you pass explicitly. (Server-side geo enrichment still applies, since it comes from the request itself.)