# Track User Events

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](/api-reference/api-reference/event.md).

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

### **Send Event With data**

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

**Example**

```dart
//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
    });
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.tryreferd.com/installing-referd/referd-for-flutter/send-user-events-to-referd.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
