Skip to Content
Tracking & EventsIdentify users

Identify users

By default Snow tracks visitors anonymously. When someone logs in or signs up, you can identify them, attaching a user ID and details like email and name to their visitor record. Their past and future anonymous sessions then connect to one person you recognize, and you can search and filter by it in Visitors.

In the browser: sa.identify()

Call identify once you know who the visitor is, typically right after login or signup:

sa.identify("user_12345", { email: "[email protected]", name: "Ada Lovelace", });
  • The first argument is your own user ID (a string or number). Use the same ID you use in your app so the identity stays stable.
  • The second argument is optional traits. Recognized traits are email, name, and image (a URL). You can include a few custom traits as well.

Call identify on every login, not just signup. It links whichever browser they’re using now to the same identity.

From your server: the Identify API

If you’d rather identify users from your backend (or link a visitor to a Stripe customer for revenue attribution), use the server-side Identify API. It takes a visitor ID, your user ID, optional traits, and an optional stripe_customer_id, authenticated with your site’s API key.

curl -X POST https://api.snowanalytics.app/api/identify \ -H "Authorization: Bearer snw_live_your_key" \ -H "Content-Type: application/json" \ -d '{ "visitor_id": "the_visitors_id", "user_id": "user_12345", "email": "[email protected]" }'

You can read the visitor’s ID in the browser with sa.getVisitorId() and pass it to your server. See the Identify API reference for every field and limit.

What you can attach

FieldNotes
user_idRequired. Your stable ID for the person.
emailShown in the dashboard; handy for search.
nameDisplay name.
imageA URL to an avatar.
Custom traitsA handful of your own keys (lowercase letters, numbers, _, -).

Anonymous by default, and cookieless caveat

Identifying is always something you choose to do. Snow never collects names or emails on its own. Identity linking relies on a stable visitor ID, so it works in attribution mode (the default). In cookieless mode the visitor ID rotates daily, so identification only holds within a single day.