Identifying your users
Attach your own pseudonymous user ID to events with oa.identify, and what that changes.
What identify does
By default every visitor is anonymous and the identifier expires daily. If your site has signed-in users, you can attach your own stable reference to their events:
after your user signs in
oa.identify("user_8f21c4");From that moment the visitor's events carry your reference (hashed, site-scoped, never stored raw), so a returning signed-in user reads as the same person across visits, and revenue can be joined through Stripe's client_reference_id (see revenue attribution, recipe 2).
The rules
- The ID is yours: an internal account number, a database key. Our terms require it not be directly identifying; no emails, no names.
- It is hashed before storage with a site-scoped key, so the same reference on two sites produces unrelated values.
- 1 to 128 characters. The identify event itself is always free; it never counts against your plan.
- Unlike the anonymous identifier, it does not rotate daily. That is its purpose, and your own privacy notice should say you use it.
What it does not do
Identify does not label the past: sessions from before the call stay anonymous, and an identified buyer's journey runs from the most recent daily rotation onward. It also never merges two sites; the site is part of the hash, by design.