Skip to main content
When a visitor logs in, fills out a form, or otherwise reveals their identity, you can use the 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

Call identify 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 call identify 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

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 call identify:
  1. Email is stored: Associated with the current device/session
  2. Traits are merged: Added to the user profile
  3. Event is sent: An $identify event is recorded
  4. 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

Call identify as soon as you have the email—don’t wait:

Update Traits Over Time

You can call identify multiple times—traits are merged:

Privacy Considerations

Only identify users who have consented to tracking. In regions with strict privacy laws (GDPR, CCPA), ensure you have appropriate consent before calling identify.
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

  • Verify identify was called (check network requests)
  • Ensure email format is valid
  • Check if consent was granted (if using consent management)
  • Traits may take a few minutes to sync
  • Verify traits are being sent in network request
  • Check for JavaScript errors in console
  • 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.