# Events

{% hint style="info" %}
Events are specific user actions that either trigger or cancel messages
{% endhint %}

Events are triggered when a user performs an action on the app or website. You can send messages to encourage users who triggered an event to take further action. They can include a range of actions, such as:

* User Sign-ups
* Product Purchases
* Account Upgrade
* Completion of specific milestones

## Integrating Events

Events are triggered each time the user performs a specific action. Please use the code below at the time the event is triggered:

* [**REST API**](https://flarelane-api-docs.readme.io/reference/track) **(recommended):** `POST /v1/projects/PROJECT_ID/track`
* [**Web SDK**](https://guide.flarelane.com/guide-for-developers/web-sdk-reference) **/** [**Mobile SDK**](https://guide.flarelane.com/guide-for-developers/mobile-sdk-reference): `FlareLane.trackEvent("test_event")`

### Supported Data Types

The following data types are supported:

* String
* Number
* Time (**Unix Timestamp** in milliseconds: e.g., 1681721331085)
* Time (**ISO8601** formatted string: e.g., 2024-04-19T14:23:56+09:00)
* Array (all elements must be either strings or numbers)
* Null (deleted tags)

***

## Checking Integrated Data

You can view all triggered events by logging into the **FlareLane console > Click "Data Management" > Click** "**Recent Events**" at the top of the page. You can also filter events based on specific user IDs or device IDs.

<figure><img src="https://4151189289-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSJ35x4PFzaneH3SrvcBt%2Fuploads%2FGU9sSadmR9xGTKNWcKwL%2FScreenshot%202024-10-07%20at%205.12.08%E2%80%AFPM.png?alt=media&#x26;token=c0a465a6-0b7f-43d2-9034-31a0d990c0ca" alt=""><figcaption><p><em>Image by FlareLane</em></p></figcaption></figure>

***

## Viewing Collected Events

Certain events are automatically collected by FlareLane SDK. You can tell them by a "@" prefix in their names as the following:

<table><thead><tr><th width="355">Events</th><th width="293">Definitions</th></tr></thead><tbody><tr><td><strong>@first_session</strong></td><td>When device created</td></tr><tr><td><strong>@clicked</strong></td><td>When users click on push notifications</td></tr><tr><td><strong>@foreground_received</strong></td><td>When users receive a push notification while the app is in the foreground</td></tr><tr><td><strong>@background_received</strong></td><td>When users receive a push notification while the app is in the background</td></tr><tr><td><strong>@iam_displayed</strong></td><td>When an in-app message is displayed on the user's screen</td></tr><tr><td><strong>@iam_clicked</strong></td><td>When users click on an in-app message</td></tr><tr><td><strong>@iam_closed</strong></td><td>When users close an in-app message</td></tr></tbody></table>
