Skip to content

Commit cb4b119

Browse files
Update mobile spec to reflect new libraries
1 parent 115a210 commit cb4b119

File tree

1 file changed

+31
-2
lines changed

1 file changed

+31
-2
lines changed

src/connections/spec/mobile.md

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ The Segment Native Mobile Spec includes the following semantic events:
2424
- [Application Installed](#application-installed)
2525
- [Application Opened](#application-opened)
2626
- [Application Backgrounded](#application-backgrounded)
27+
- [Application Foregrounded](#application-foregrounded)
2728
- [Application Updated](#application-updated)
2829
- [Application Uninstalled](#application-uninstalled)
2930
- [Application Crashed](#application-crashed)
@@ -41,14 +42,27 @@ Segment recommends using the above event names if you're going to be integrating
4142

4243
## Lifecycle events
4344

44-
Mobile applications live within a fairly bounded lifecycle. In order to understand and communicate effectively with your users, it's crucial to instrument the core flows associated with installing and opening your app. The following events, allow you to get a picture of top-line metrics such as DAUs, MAUs, and Screen Views per session. Automatic tracking of lifecycle events is completely optional - you can learn how to enable and disable them in Segment's [iOS](https://segment.com/docs/connections/sources/catalog/libraries/mobile/ios/#step-2-install-the-sdk){:target="_blank"} and [Android](https://segment.com/docs/connections/sources/catalog/libraries/mobile/android/quickstart/#step-3-initialize-the-client){:target="_blank"} library docs.
45+
Mobile applications live within a fairly bounded lifecycle. In order to understand and communicate effectively with your users, it's crucial to instrument the core flows associated with installing and opening your app. The following events, allow you to get a picture of top-line metrics such as DAUs, MAUs, and Screen Views per session. Automatic tracking of lifecycle events is completely optional - you can learn how to enable and disable them in Segment's docs for each library below:
46+
- [iOS](https://segment.com/docs/connections/sources/catalog/libraries/mobile/ios/#step-2-install-the-sdk){:target="_blank"}
47+
- [Swift](https://segment.com/docs/connections/sources/catalog/libraries/mobile/apple/#getting-started){:target="_blank"}
48+
- [Android](https://segment.com/docs/connections/sources/catalog/libraries/mobile/android/quickstart/#step-3-initialize-the-client){:target="_blank"}
49+
- [Kotlin](https://segment.com/docs/connections/sources/catalog/libraries/mobile/kotlin-android/#getting-started){:target="_blank"}
50+
- [React Native](https://segment.com/docs/connections/sources/catalog/libraries/mobile/react-native/#getting-started){:target="_blank"}
4551

46-
The following events will be tracked automatically when lifecycle events are enabled:
52+
The following events will be tracked automatically when lifecycle events are enabled in all mobile libraries:
4753

4854
- [Application Installed](#application-installed)
4955
- [Application Opened](#application-opened)
5056
- [Application Updated](#application-updated)
5157

58+
In Kotlin, Swift, and React Native, the following event is tracked in addition to the three above:
59+
60+
- [Application Backgrounded](#application-backgrounded)
61+
62+
In Swift, the following is also tracked:
63+
64+
- [Application Foregrounded](#application-foregrounded)
65+
5266
### Application Installed
5367

5468
This event fires when a user **first** opens your mobile application. Note, if the user never opens your app after installing, Segment will not be able to collect this event. This event doesn't wait for attribution or campaign information to be received, and is collected automatically by Segment's SDKs. Advertising providers like Facebook and Google require discrete install events to correctly attribute installs to ads served through their platform.
@@ -116,6 +130,21 @@ This event should be sent when a user backgrounds the application upon [`applica
116130
}
117131
```
118132

133+
### Application Foregrounded
134+
135+
This event is fired when a user opens the app or brings it back into the foreground of their device. This is only collected by the Swift library.
136+
137+
{% comment %} api-example '{ "userId": "019mr8mf4r", "type": "track", "event": "Application Foregrounded", "properties": {}}'}}} {% endcomment %}
138+
139+
```json
140+
{
141+
"userId": "019mr8mf4r",
142+
"type": "track",
143+
"event": "Application Foregrounded",
144+
"properties": {}
145+
}
146+
```
147+
119148
### Application Updated
120149

121150
This event fires when a user updates the application. Segment's SDK will automatically collect this event instead of an "Application Opened" event when we determine that the Open is first since an update.

0 commit comments

Comments
 (0)