# 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**](/guide-for-developers/web-sdk-reference.md) **/** [**Mobile SDK**](/guide-for-developers/mobile-sdk-reference.md): `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="/files/2vdAPevzfGaojmJDnX6S" 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>


---

# 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://guide.flarelane.com/data-integration/events.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.
