identify method to associate their information with the Snitcher session. This enables richer lead data and better attribution.
The identify Method
string
required
The user’s email address. This is the primary identifier used for enrichment and CRM matching.
object
Additional properties about the user, such as name, company, role, or any custom attributes.
Basic Example
When to Identify
Callidentify whenever you learn who a visitor is:
User Login
When a user signs into your app
Form Submission
When someone submits a lead form
Trial Signup
When a visitor starts a trial
Chat Initiation
When they provide email in chat
Common Use Cases
After Login
On Form Submission
Trial Signup
Chat Widget Integration
OAuth, SSO, and Passwordless Login
For login methods that don’t use traditional forms—Google Sign-In, GitHub OAuth, SAML SSO, or magic links—you’ll need to callidentify manually after authentication completes.
Snitcher’s automatic form tracking captures emails from standard forms, but OAuth and SSO flows bypass form submission entirely. Manual identification is required.
Google Sign-In
GitHub OAuth
SAML SSO / Enterprise SSO
Magic Links / Passwordless
Auth0
Firebase Authentication
Next.js with NextAuth
Best Practices for OAuth/SSO
Call on Every Page Load
For authenticated sections, call
identify on every page load to ensure sessions are linked, not just on login.Handle Async Properly
OAuth flows are async. Make sure
identify is called after you have the user data, not before.Include Provider Info
Track which auth provider was used. This helps analyze user acquisition channels.
Don't Block Auth
identify is async and non-blocking. Don’t wait for it to complete before redirecting users.What Happens After Identification
When you callidentify:
- Email is stored: Associated with the current device/session
- Traits are merged: Added to the user profile
- Event is sent: An
$identifyevent is recorded - Enrichment triggered: Snitcher enriches data based on the email domain
Identification persists across sessions (if cookie consent is granted), so returning visitors are automatically recognized.
Best Practices
Include Useful Traits
Identify Early
Callidentify as soon as you have the email—don’t wait:
Update Traits Over Time
You can callidentify multiple times—traits are merged:
Privacy Considerations
If you’re using consent management:Viewing Identified Users
Identified users appear in your Snitcher dashboard with:- Email address (clickable to reveal company)
- Associated company (from email domain + enrichment)
- Custom traits you provided
- Full session history
Combining with Custom Events
For complete tracking, combine identification with events:Troubleshooting
User not showing as identified
User not showing as identified
- Verify
identifywas called (check network requests) - Ensure email format is valid
- Check if consent was granted (if using consent management)
Traits not appearing
Traits not appearing
- Traits may take a few minutes to sync
- Verify traits are being sent in network request
- Check for JavaScript errors in console
Multiple sessions not linking
Multiple sessions not linking
- Ensure cookie consent is granted
- Check if localStorage is being cleared
- Verify same email is used across sessions
Other Ways to Identify Users
Identify Email Recipients
Don’t have user logins or forms? You can identify visitors directly from email clicks by adding tracking parameters to your outbound and marketing emails.