---
schema_version: "1"
id: f9e75cee4a4a4263871d5260689199c3cda0f44e283ba2aa2b6e3bd3b83912a9
title: Capture Behavior Data
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/data-cloud/data-cloud-engagement-mobile-sdk/guides/c360a-api-engagement-mobile-sdk-capturing-behavior-data.md
canonical_url: https://developer.salesforce.com/docs/data/data-cloud-engagement-mobile-sdk/guide/c360a-api-engagement-mobile-sdk-capturing-behavior-data.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: f5ef831e39b3a76fd5d6c9846b81fd369e10b625e913203a03b42c524fd4ed42
products:
  - Data 360 Engagement Mobile SDK
  - Data 360 Developer Documentation
---
# Capture Behavior Data

**note:** This page applies to both Version 2.x and Version 3.x of the Engagement Mobile SDK.

The Data 360 Module for the Engagement Mobile SDK enables comprehensive collection of granular data about customer mobile app interactions through advanced event tracking capabilities.

## Prerequisites

Before behavior data can be sent to Data 360, ensure the following:

- SDK Configuration: The Data 360 Module must be properly configured and [initialized](https://developer.salesforce.com/docs/data/data-cloud-engagement-mobile-sdk/guide/c360a-api-engagement-mobile-sdk-initialization.md).
  - Enable Lifecycle Events by setting `trackLifecycle` to `true`
  - Enable Screen Events by setting `trackScreens` to `true`
- Consent Management: [Consent](https://developer.salesforce.com/docs/data/data-cloud-engagement-mobile-sdk/guide/c360a-api-engagement-mobile-sdk-consent-management.md) to track user data must be granted.

## Default Settings

Behavioral lifecycle and screen events are disabled by default in the Data 360 Module for privacy compliance.

## Event Generation

Each behavior generates an engagement event with `eventType="appEvents"` and relevant behavior-specific fields populated.

## Lifecycle Events

Lifecycle events are automatically triggered when your mobile app transitions between foreground and background states, or when the application is updated.

### Application Foregrounded

When the mobile application comes to the foreground, an event is generated:

```nolang
{
  "behaviorType": "AppLaunch",
  "appName": "MyAppName",
  "appVersion": "1.0.0",
  "eventType": "appEvents",
  "category": "Engagement",
  // + all automatically assigned fields like deviceId, sessionId, dateTime, etc.
}
```

**note:** On the first app launch, `behaviorType` is set to `"AppFirstLaunch"`.

### Application Moves to the Background

When the mobile application moves to the background, an event is generated,

```nolang
{
  "behaviorType": "AppBackgrounded",
  "appName": "MyAppName",
  "appVersion": "1.0.0",
  "eventType": "appEvents",
  "category": "Engagement",
  // + all automatically assigned fields like deviceId, sessionId, dateTime, etc.
}
```

### Application Version Changed

When the mobile application is updated, an event is generated.

```nolang
{
  "behaviorType": "AppUpdate",
  "previousAppVersion": "1.0.0",
  "appName": "MyAppName",
  "appVersion": "1.2.3",
  "eventType": "appEvents",
  "category": "Engagement",
  // + all automatically assigned fields like deviceId, sessionId, dateTime, etc.
}
```

## Screen Events

Screen events track customer navigation patterns as they move through different screens and views within your mobile application.

### Screen View

Screen view events are generated when customers navigate through different screens in your app:

- Android: When navigating through `Activity` views
- iOS: When `UIViewControllers` are added to the view hierarchy

```nolang
{
  "behaviorType": "ScreenView",
  "screenName": "MyScreenName",
  "appName": "MyAppName",
  "appVersion": "1.0.0",
  "eventType": "appEvents",
  "category": "Engagement",
  // + all automatically assigned fields like deviceId, sessionId, dateTime, etc.
}
```

## Send Behavior Data

After you've configured the Data 360 Module and enabled the desired behavioral events, the SDK automatically sends these events to Data 360 as they occur in your app. No manual intervention is required.
