Tracking
Identify users
Tell Revfaro who a signed-in visitor is with one identify call, so journeys show real names and payments without a visitor ID can be matched by email.
In short
After someone signs up or logs in, call window.revfaro('identify', { user_id, email, name }). Their past and future visits are then shown with their name in journeys, visitor profiles and goal alerts, and a payment that arrives without a visitor ID can be matched to them by email. Identify calls don't count toward your monthly events.
On this page
Call identify after sign-in
window.revfaro?.('identify', {
user_id: user.id,
email: user.email,
name: user.name,
});All three fields are optional, but send at least one. Call it:
- right after a successful sign-up or login, and
- when your app loads for a visitor who is already signed in.
The script must be on the page; if your code can run before it loads, add the queue snippet first.
Identify with the npm SDK
For an npm SDK installation, use your shared tracker instance:
tracker.identify({ user_id: user.id, email: user.email, name: user.name });The SDK includes its own TypeScript definitions and does not create window.revfaro. The script
queue and global declaration below apply only to script installations.
What identify changes
Real names instead of nicknames. Anonymous visitors get a friendly generated name such as "teal fox" and an illustrated avatar, so you can tell them apart. Once identified, the visitor shows their name (or email) in Journey, Users, the visitor profile and goal alert emails. Their earlier anonymous visits stay part of the same profile.
More payments matched. When a payment arrives without a visitor ID, Revfaro looks for a visitor you identified with the same email as the buyer. See how payments are matched.
Search by name or email. The search box on the Users and Journey tabs finds identified visitors by name or email.
Details
user_idcan be up to 128 characters,emailup to 200 andnameup to 128. Emails are stored in lower case.- Calling identify again with new values replaces the old ones.
- Identify works with the cookieless script too, for the day the visitor is recognized.
- Using TypeScript? Declare
window.revfaroonce so the calls type-check:
declare global {
interface Window {
revfaro?: ((cmd: 'goal' | 'identify' | 'pageview', a?: unknown, b?: unknown) => void) & {
attribution?: () => { rf_visitor_id?: string; rf_session_id?: string };
};
}
}
export {};Frequently asked questions
When should I call identify?
Right after a successful sign-up or login, and when your app loads for someone who is already signed in. Calling it on every page load is fine.
Does identify count as an event?
No. Identify calls don't count toward your plan's monthly events.
Is the email address stored?
Yes. The user ID, email and name you send are stored with the visitor so you can see them in your dashboard. Send only what you're allowed to under your own privacy policy; identify is optional.