---
description: >-
  These events are app-related events and can be used as normal events for
  segmentation purposes. Some of the events are automatically fired while some
  events may require manual firing.
---

# App Events

## Events

<table data-header-hidden><thead><tr><th width="245.66666666666666">Event Name</th><th>Description</th><th>Manual Firing Required</th></tr></thead><tbody><tr><td>Application Installed</td><td>This event is automatically fired when the user installs an application.</td><td>NO</td></tr><tr><td>Application Opened</td><td>This event is automatically fired when the user opens an application.</td><td>NO</td></tr><tr><td>Application Updated</td><td>This event is automatically fired when the application gets updated.</td><td>NO</td></tr><tr><td>Application Backgrounded</td><td>This event should be sent when a user backgrounds the application.</td><td>YES - for iOS<br>NO - for Android</td></tr><tr><td>Application Crashed</td><td>This event should be sent when you receive a crash notification from your app.</td><td>YES</td></tr><tr><td>Application Uninstalled</td><td>This event should be sent when you receive a user uninstalls the application.</td><td>YES</td></tr><tr><td>Application Session Started</td><td>This event is automatically fired when a user spends over 10 seconds on the app.</td><td>NO</td></tr><tr><td>Application Session Concluded</td><td>This event is automatically fired when a user is inactive for 20 minutes on the app.</td><td>NO</td></tr></tbody></table>

### **Application Installed**

This event is automatically fired when the user installs an application.

**Properties:**

| Property     | Type   | Description                                |
| ------------ | ------ | ------------------------------------------ |
| `userId`     | String | Unique ID of the user                      |
| `type`       | String | Type of event (`track` in this case)       |
| `event`      | String | Name of the event                          |
| `properties` | Object | Additional properties related to the event |

**Example:**

```
{
  "userId": "019mr8mf4r",
  "type": "track",
  "event": "Application Installed",
  "properties": {
    "version": "1.2.3",
    "build": "1234"
  }
}
```

`properties` definition:

| Property  | Type   | Description                            |
| --------- | ------ | -------------------------------------- |
| `version` | String | The version installed.                 |
| `build`   | String | The build number of the installed app. |

### **Application Opened**

This event is automatically fired when the user opens an application.

**Properties:**

| **Property** | **Type** | **Description**                            |
| ------------ | -------- | ------------------------------------------ |
| `userId`     | String   | Unique ID of the user                      |
| `type`       | String   | Type of event (`track` in this case)       |
| `event`      | String   | Name of the event                          |
| `properties` | Object   | Additional properties related to the event |

**Example:**

```
{
  "userId": "019mr8mf4r",
  "type": "track",
  "event": "Application Opened",
  "properties": {
    "from_background": false,
    "referring_application": "GMail",
    "url": "url://location"
  }
}
```

`properties` definition:

| **Property**            | **Type** | **Description**                                                                                                                                                                                                                                                                     |
| ----------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `from_background`       | String   | If application [transitioned](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIApplicationDelegate_Protocol/#//apple_ref/doc/uid/TP40006786-CH3-SW52) from “Background” to “Inactive” state prior to foregrounding (as opposed to from “Not Running” state). |
| `referring_application` | String   | <p><br>The value of <code>UIApplicationLaunchOptionsSourceApplicationKey</code> from <code>launchOptions</code>. <strong>Automatically collected on iOS only</strong>.</p>                                                                                                          |
| `url`                   | String   | The value of `UIApplicationLaunchOptionsURLKey` from `launchOptions`.**Collected on iOS only**.                                                                                                                                                                                     |
| `version`               | String   | The version installed.                                                                                                                                                                                                                                                              |
| `build`                 | String   | The build number of the installed app.                                                                                                                                                                                                                                              |

### **Application Updated**

This event is automatically fired when the application gets updated.

**Properties:**

| Property     | Type   | Description                              |
| ------------ | ------ | ---------------------------------------- |
| `userId`     | String | Unique ID of the user                    |
| `type`       | String | Type of the event (`track` in this case) |
| `event`      | String | Name of the event                        |
| `properties` | Object | Additional properties of the event       |

**Example:**

```
{
  "userId": "019mr8mf4r",
  "type": "track",
  "event": "Application Updated",
  "properties": {
    "previous_version": "1.1.2",
    "previous_build": "1234",
    "version": "1.2.0",
    "build": "1456"
  }
}
```

`properties` definition:

| **Property**       | **Type** | **Description**                  |
| ------------------ | -------- | -------------------------------- |
| `previous_version` | String   | The previously recorded version. |
| `previous_build`   | String   | The previously recorded build.   |
| `version`          | String   | The new version.                 |
| `build`            | String   | The new build.                   |

### **Application Backgrounded**

This event should be sent when a user backgrounds the application.

**Properties:**

| **Property** | **Type** |                                          |
| ------------ | -------- | ---------------------------------------- |
| `userId`\*   | String   | Unique ID of the user                    |
| `type`\*     | String   | Type of the event (`track` in this case) |
| `event`\*    | String   | Name of the event                        |
| `properties` | Object   | Additional properties of the event       |

**Example:**

```
{
  "userId": "019mr8mf4r",
  "type": "track",
  "event": "Application Backgrounded",
  "properties": {} //add any properties you like
}
```

### **Application Uninstalled**

Fire this event when a user uninstalls the application.

**Properties:**

| Property     | Type   | Description                              |
| ------------ | ------ | ---------------------------------------- |
| `userId`\*   | String | Unique ID of the user                    |
| `type`\*     | String | Type of the event (`track` in this case) |
| `event`\*    | String | Name of the event                        |
| `properties` | Object | Additional properties of the event       |

**Example:**

```
{
  "userId": "019mr8mf4r",
  "type": "track",
  "event": "Application Uninstalled",
  "properties": {} //add any properties you like
}
```

### Application Crashed

Fire this event when you receive a crash notification from your app.

**Properties:**

<table data-header-hidden><thead><tr><th width="235.33333333333331">Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>Property</td><td>Type</td><td>Description</td></tr><tr><td><code>userId</code>*</td><td>String</td><td>Unique ID of the user</td></tr><tr><td><code>type</code>*</td><td>String</td><td>Type of the event (<code>track</code> in this case)</td></tr><tr><td><code>event</code>*</td><td>String</td><td>Name of the event</td></tr><tr><td><code>properties</code></td><td>Object</td><td>Additional properties of the event</td></tr></tbody></table>

**Example:**

```
{
  "userId": "019mr8mf4r",
  "type": "track",
  "event": "Application Crashed",
  "properties": {} //add any properties you like
}
```

### Application Session Started

This event is automatically fired when a user spends over 10 seconds on the app to mark an active session.

| Property   | Type   | Description                              |
| ---------- | ------ | ---------------------------------------- |
| `userId`\* | String | Unique ID of the user                    |
| `type`\*   | String | Type of the event (`track` in this case) |
| `event`\*  | String | Name of the event                        |

**Example:**

```
{
  "userId": "019mr8mf4r",
  "type": "track",
  "event": "Application Session Started"
}
```

### Application Session Concluded

This event is automatically fired when a user is inactive for 20 minutes on the app which ends the user session.

Once the app is put into the background, the user inactivity starts.

Case 1: When the app is closed and opened the next day

For example, the user opened the app at 11:00 AM on Tuesday and the following events happened in sequence:

Event 1 - 11:00 AM (Tuesday)

Event 2 - 11:05 AM (Tuesday)

Event 3 (Application backgrounded) - 11:06 AM (Tuesday)

Event 4 (Session Started) - 12:00 PM (Wednesday)

**Session Length** **=** Event 3 - Event 1 - Session concluded event should be fired at 12:00 PM (Wednesday)

Case 2: When the app is opened closed the same day

Event 1 - 11:00 AM (Tuesday)

Event 2 (Background) - 11:05 (Tuesday)

Event 3  - 11:30 (Tuesday)

**Session length** **=** 11:05 - 11:00 (5 minutes) - session concluded should be fired at 11:30 (Event 3)

| Property     | Type   | Description                              |
| ------------ | ------ | ---------------------------------------- |
| `userId`\*   | String | Unique ID of the user                    |
| `type`\*     | String | Type of the event (`track` in this case) |
| `event`\*    | String | Name of the event                        |
| `properties` | Object | Additional properties of the event       |

**Example:**

```
{
  "userId": "019mr8mf4r",
  "type": "track",
  "event": "Application Session Concluded",
  "properties": {
    "length": "45000",
    "sessionId": "f92j2tj",
    "lastEventTimestamp": "1638458316949" 
  }
}
```

`properties` definition:

| `length`             | String | Total session length in seconds right from first event was recorded |
| -------------------- | ------ | ------------------------------------------------------------------- |
| `sessionId`          | String | Unique ID to identify the session                                   |
| `lastEventTimestamp` | String | The timestamp of the last event that was recorded before inactivity |
