Track User Events

Start sending your users' events on your platform to Referd.

Start sending your users' events on your app or platform to Referd, along with any metadata that describes the event. Depending on your Referd programs configuration, the user can be rewarded based on the sent events.

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 data are extra pieces of information you can tie to events you track. They can be anything that will be useful while designing your program.

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 to Referd via the methods available in the SDK below. For server side events you can use Track Events API.

To send user events from your app to Referd, you can use the sendEvent SDK methods.

Send Event With data

 Future<Map<String, dynamic>> sendEvent(Map<String, dynamic> eventData) async {}


//Send with Meta data, send with from string then convert it to json
// or create a json and sent it directly

let eventDataString = 
 "buy": {
  "product_id": "a123456",
  "price": 30,
  "product_category": "fashion"
  "product_tags": ["men", "new_collection"]
} ''';

    final Map<String, dynamic> eventData = jsonDecode(eventDataString);

   gameball.sendEvent(eventData).then((response) {
      print(response); // Success
    }).catchError((error) {
      print(error); // Error

Last updated