Sending User Data
Connect anonymous activity to known user profiles using the identify method.
The Identify Method
Section titled “The Identify Method”```javascript analyze.identify(‘user_123’, { email: ‘john@example.com’, name: ‘John Doe’, plan: ‘enterprise’, created_at: ‘2024-01-15’ }); ```
When to Identify
Section titled “When to Identify”Call identify when:
- User logs in
- User signs up
- User profile is updated
User Properties
Section titled “User Properties”Include relevant properties:
```javascript analyze.identify(‘user_123’, { // Basic info email: ‘user@example.com’, name: ‘John Doe’,
// Subscription info plan: ‘pro’, mrr: 49,
// Company info (B2B) company: { id: ‘company_456’, name: ‘Acme Inc’, industry: ‘Technology’, employees: 50 } }); ```
Identity Resolution
Section titled “Identity Resolution”analyze.swiss automatically stitches anonymous activity to identified users, giving you a complete journey view.