Appearance
Event Management
The Upshot Flutter SDK provides comprehensive event tracking capabilities to monitor user interactions and app usage.
What is an Event?
Any action performed by the user in the application that is of interest for analytics and improving the app/user experience is an event. Every time such an action occurs, the details of this action are recorded in Upshot.ai as an event.
Examples of Events
- Any button tap
- User making an in-app purchase
- User visiting any particular screen, like "settings"
- User set game difficulty to 'easy'
Dispatch Frequency
Events are dispatched to the server within a time interval of 10secs to 120secs. You can choose the frequency at which events should be dispatched. By default, events are dispatched to the server once in every 60 secs.
dart
import 'package:flutter_upshot_plugin/flutter_upshot_plugin.dart';
// Set dispatch interval (in seconds)
FlutterUpshotPlugin.dispatchIntervalInSeconds(60);
Dispatch Events
DispatchEventsWithTimedEvents method allows you to flush all events from your app to Upshot.ai server immediately. You can use this method at any particular action in your application.
- dispatchEventsWithTimedEvents: true - Sending all closed and non-closed events to server
- dispatchEventsWithTimedEvents: false - Sending all closed events to server
dart
// Dispatch all events immediately
FlutterUpshotPlugin.dispatchEvents(true);
Event Types
- PageView Events - Track screen views and navigation
- Custom Events - Track specific user interactions
- Attribution Events - Track campaign and attribution data
- Session Events - Track app sessions and user engagement
Getting Started
To start tracking events, ensure you have:
- Installed the SDK
- Initialized the SDK
- Configured event tracking in your application
Best Practices
- Track meaningful events that provide actionable insights
- Use consistent naming conventions for events
- Include relevant properties with each event
- Validate events in development environment
- Monitor event data quality regularly
- Close timed events properly to ensure data integrity
Validation
You can validate PageView and Custom events in the Dashboard Live Events section to ensure your events are being captured correctly.