Track Player Events
Start sending your players' events on your platform to Gameball.
Start sending your players' events on your app to Gameball, along with any metadata that describes the event. Depending on your Gameball programs configuration, the player can be rewarded based on the sent events.
Tracked events can be app events or server side events depending on how you would like to design your programs. App events can be sent via the avialable SDK interface and server-sdie events can be sent to Gameball via the Track Events API.
Every Track Event call records a single user action. We call these β€œevents”. We recommend that you make your event names human-readable, so that everyone can know what they mean instantly.
Event metadata are extra pieces of information you can tie to events you track. They can be anything that will be useful while designing your program.
For more information about events and usage examples, check Tracking Player Events tutorial
To send Player events from your app to Gameball, you can use the addAction SDK interface as below.
addAction interface sends an Action object to Gameball. Where the Action object is a wrapper holding a single or list of events. To add an event you should use the addEvent method on the Action object you have created.
1
Action action = new Action();
2
HashMap<String, Object> metaDeta = new HashMap<String, Object>()
3
metaData.put(<meta_data_string_value>, 500)
4
​
5
action.addEvent(<event_name>, metadata)
6
​
7
GameBallApp.getInstance(<ApplicationContext>).addAction(action, new Callback)
Copied!

addEvent(String eventName, HashMap metaData)

Parameter
Type
Required
Description
eventName
string
Yes
event name
metadata
hashmap
Yes
hashmap holding event related metadata. Each metadata is respresented by string key and object value. Possible data types for a value are integers, numbers, strings
​
Last modified 2mo ago
Copy link