Overview
All events you track with Grain are automatically sent to your analytics dashboard at grainql.com/dashboard. This guide shows you how to structure your events effectively to get the most actionable insights.Custom Analytics UIs: Build custom analytics dashboards using the Query API. The Query API allows you to programmatically access your analytics data and create tailored experiences.
Accessing Your Analytics
After tracking events with the SDK, view them in your dashboard:- Go to grainql.com/dashboard
- View real-time event streams
- Analyze event properties and patterns
- Filter by user IDs and properties
- Build custom reports and visualizations
- Export data for further analysis
Use Descriptive Event Names
Clear, specific event names make your analytics easier to understand:_) for consistency and readability.
Include Rich Context
Add relevant properties to every event for deeper analysis:Use Template Events
Grain provides pre-built template events for common scenarios:Track User Properties
Use properties to segment users in your dashboard:Consistent Naming Conventions
Use the same property names across related events:Track User Journeys
Structure events to understand user flows:Session Tracking
Track session duration for engagement analysis:flush: true on session end to ensure the event is sent before the page unloads.
Error and Exception Tracking
Track errors to identify and fix issues:Page View Tracking
Track page navigation for traffic analysis:Use User Identification
Identify users to track them across sessions:Preload Remote Config
If you’re using remote config, preload it for faster access:Batch Events Automatically
Grain automatically batches events for efficiency:Best Practices Summary
1. Descriptive Names: Use clear, specific event names likecheckout_completed
2. Rich Properties: Include relevant context in every event
3. Consistent Naming: Use the same property names across similar events
4. Template Events: Use built-in methods like trackPurchase() for consistency
5. User Properties: Set user attributes for segmentation
6. Track Funnels: Structure events to understand user journeys
7. Error Tracking: Log errors with detailed context
8. User Identification: Use identify() or setUserId() to track across sessions
9. Flush Critical Events: Use flush: true for important events like purchases
10. Preload Config: Load remote config early for faster access