Event Tracking
The Solute SDK provides comprehensive event tracking capabilities. Track custom events, page views, user identification, and more.Track Custom Events
Track any custom event with properties:Identify Users
Identify users to associate events with specific users:Track Page Views
Track page views automatically or manually:Track Groups
Associate users with groups or organizations:Alias User Identities
Merge anonymous and identified user identities:Reset User
Reset the user identity (useful on logout):Flush Events
Force immediate sending of queued events:Event Properties
Event properties can include any JSON-serializable data:Automatic Context
The SDK automatically enriches all events with context:- Page information: URL, path, referrer, title
- User agent: Browser and device information
- Screen: Screen dimensions and density
- Locale: User’s locale and timezone
- Session: Session ID
- Library: SDK name and version
Next.js Integration
In Next.js, use hooks for event tracking:Best Practices
Use descriptive event names
Use descriptive event names
Use clear, consistent event names like
Button Clicked, Purchase Completed, or User Signed Up. Avoid generic names like click or action.Include relevant properties
Include relevant properties
Add properties that help you understand the context of the event. Include IDs, categories, and any relevant metadata.
Identify users early
Identify users early
Call
identify() as soon as you know the user’s ID to associate all events with the user.Don't track PII unnecessarily
Don't track PII unnecessarily
Be mindful of privacy. Only track personally identifiable information (PII) if necessary and with user consent.
Next Steps
Feature Flags
Learn about feature flags and A/B testing
Next.js Integration
Deep dive into Next.js integration
