User tracking
Identify users, track interactions, and analyze behavior to deliver personalized experiences and insights.
User tracking
User tracking enables you to identify users in your application, personalize their experiences, and gather detailed analytics about user behavior.
How it works
User identification
Provide user data to Pointer when users authenticate, including a unique user ID and optional profile information.
Event tracking
Automatically track user interactions and optionally record custom events for deeper insights.
Analytics collection
View detailed user analytics and behavior patterns in your Pointer dashboard.
Key benefits
User identification
Maintain consistent user identity across sessions for seamless experiences and accurate analytics.
Personalized experiences
Create customized content and guidance based on user data and behavior patterns.
Progress tracking
Monitor completion of onboarding flows, feature adoption, and user engagement over time.
Detailed analytics
Access comprehensive user insights and interaction data in your dashboard.
Setting up user tracking
Basic implementation
Provide user data to the PointerProvider
when initializing:
At minimum, you must provide a userId
to identify the user. Additional fields are optional but recommended for better personalization and analytics.
Dynamic user management
For applications where user data changes during the session, use the useUser
hook:
User data structure
Required fields
A stable, unique identifier for the user from your authentication system.
Optional fields
The user’s full name for personalization and display purposes.
The user’s email address for identification and communication.
URL to the user’s profile picture or avatar image.
Any additional JSON-serializable data you want to associate with the user.
Event tracking
Track custom events to understand how users interact with your application:
Event structure
Category of the event (e.g., FEATURE_USAGE
, ACCOUNT_UPDATE
, WORKFLOW_COMPLETION
)
Specific action or milestone (e.g., export_report
, subscription_changed
, completed_setup
)
Optional additional context for the event, such as feature settings or workflow details
Authentication integration
Analytics and insights
User tracking data becomes available in your Pointer analytics dashboard, providing insights into:
- User profiles: Profile information, session history, and feature usage
- Behavior patterns: Flow completion rates, feature adoption, and engagement metrics
- User segments: Group users by plan type, company, or custom data
To view user analytics, go to the Analytics section.
Data privacy and security
User data is automatically persisted in the browser’s localStorage to maintain identity across sessions.
Avoid storing sensitive information in the user’s customData field as it will be persisted to localStorage and could be accessible to client-side code.
Best practices
Troubleshooting
User data not appearing
If user tracking data isn’t showing up in your analytics:
- Verify user ID: Ensure you’re providing a valid, non-empty
userId
- Check authentication flow: Confirm
setUserData
is called after successful login - Review console errors: Look for JavaScript errors that might prevent tracking
Inconsistent user identification
When users appear as different entities in analytics:
- Check userId consistency: Ensure the same ID is used across sessions
- Review authentication logic: Verify user data is set correctly during login
- Clear localStorage: Test with cleared browser storage to eliminate cached data