Appearance
Event Management
The Upshot.ai iOS 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"
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.
How to set dispatch interval?
objective-c
// Set dispatch interval (in seconds)
[[Brandkinesis sharedUpshot] setDispatchInterval:30]; // 30 seconds
swift
// Set dispatch interval (in seconds)
BrandKinesis.sharedInstance().dispatchInterval = 30 // 30 seconds
Dispatch / Flush Events
DispatchEventsWithTimedEvents
method allows you to flush all events from your app to the Upshot.ai server immediately. You can use this method for any particular action in your application.
- dispatchEventsWithTimedEvents:YES: Sending all closed and non-closed events to server
- dispatchEventsWithTimedEvents:NO: Sending all closed events to server
How to flush events?
objective-c
// Flush all events immediately
[[BrandKinesis sharedInstance] dispatchEventsWithTimedEvents:YES completionBlock:^(BOOL dispatched) {
}];
swift
// Flush all events immediately
BrandKinesis.sharedInstance().dispatchEvents(withTimedEvents: true) { status in
}
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.