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 is recorded in Upshot.ai as an
event.
Examples of an event
Any button tap
User making an in-app purchase
User on 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
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.
BrandKinesis.sharedInstance().dispatchEvents(withTimedEvents: true) { (status) in }
Types of Event
Predefined Events
Upshot.ai defines a set of predefined events in the SDK.
Session Events:
A session represents a single continuous period of user interaction with your app. Sessions serve as useful
containers of measured activity, which includes screen views, events, and other transactions. Every successful
initialization of the SDK creates a new session. You should not attempt to create this event yourself.
Screen View Events:
Also referred as Page Views, defines which page is being currently viewed by the user and from which page/screen
did he reach there.
NOTE:
For creating the pageview event the eventname should be BKPageViewNative or BKPageViewWeb.
The dictionary should contain the key BKCurrentPage to make this event as a PageView event.
The screen name Launch is used by the SDK to identify that the first page viewed
by the user in the application.
Page view chains/flow/hierarchy and closing the page view events are managed by the SDK. Every time a new
page view is created, the previous page view event is closed and mapped to the new page.
For every successful creation of pageview event SDK returns eventId if it fails return nil.
Check PageView events in Dashboard under Live Events Section :
Attribution Event
Upshot.ai helps you to track mobile app installations via Adjust or other Attribution platforms like AppsFlyer.
After your app is installed from an Adjust media source, you can retrieve the install data using the Adjust SDK in
your app and let Upshot.ai know about the installation source, medium, campaign, and other info.
NOTE:
Note:
Adjust SDK must be separately integrated into your app.
Import Adjust module into your AppDelegate class.
Confirm AdjustDelegate to AppDelegate class.
Configure Adjust framework in application:didfinishlaunchingwithoptions
You can register a delegate callback to be notified of tracker attribution changes. Due to the different sources
considered for attribution, this information can not be provided synchronously. Follow these steps to implement
the optional delegate protocol in your app delegate.
Any event that could not be accommodated through predefined events, can be created through Custom Events. Custom
Events in Upshot.ai are classified as timed and non-timed events.
Non-Timed Events
An event where the start time and the end time are the same is a non-timed event.
Example: Say a button tap. It does not matter how long the button was pressed for. This
becomes a non-timed event, where you are only interested in the fact that the user tapped a button, time factor is
not crucial.
let options = ["ItemCost" : 10000, "ItemName" :
"Mobile"]
as [String : Any] let *eventId = BrandKinesis.sharedInstance().createEvent("Purchase", params: options, isTimed:false)
Timed Events
An event where the end time is different from the start time is a timed event.
Example: A game level takes 30 seconds to finish. So a “game level played” event starts
at X and ends at Y. There's a time component associated with the event here, hence it is considered as a timed
event.
Note:
While Creating the custom events Special Characters won't be allowed except _ in key's and eventName. Incase
of any special characters SDK will replace with empty string.
EventName and Key's should start with alphabets only.
The data must be in key-value pairs.
All the keys must be Strings.
Each value must be either a String or a Number. Anything other than that will be auto converted to String.
Maximum length of each value is 2048 bytes.
The key-value pairs and the Eventname defined for the custom events must be consistent across all platforms to
maintain data integrity.