Skip to content

Commit 1e7a0ab

Browse files
authored
Merge pull request #6633 from segmentio/ashton-huxtable-patch-3
Update mobile spec to reflect new libraries
2 parents 4b8050c + 69b5129 commit 1e7a0ab

File tree

1 file changed

+32
-4
lines changed

1 file changed

+32
-4
lines changed

src/connections/spec/mobile.md

Lines changed: 32 additions & 4 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)
@@ -36,22 +37,34 @@ The Segment Native Mobile Spec includes the following semantic events:
3637
- [Deep Link Opened](#deep-link-opened)
3738
- [Deep Link Clicked](#deep-link-clicked)
3839

39-
4040
Segment recommends using the above event names if you're going to be integrating the events yourself. This will ensure that they can be mapped effectively in downstream tools.
4141

4242
## Lifecycle events
4343

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.
44+
Mobile applications live within a fairly bounded lifecycle. 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 lifecycle event tracking is optional - you can learn how to enable and disable them in Segment's docs for each library below:
45+
- [iOS](https://segment.com/docs/connections/sources/catalog/libraries/mobile/ios/#step-2-install-the-sdk){:target="_blank"}
46+
- [Swift](https://segment.com/docs/connections/sources/catalog/libraries/mobile/apple/#getting-started){:target="_blank"}
47+
- [Android](https://segment.com/docs/connections/sources/catalog/libraries/mobile/android/quickstart/#step-3-initialize-the-client){:target="_blank"}
48+
- [Kotlin](https://segment.com/docs/connections/sources/catalog/libraries/mobile/kotlin-android/#getting-started){:target="_blank"}
49+
- [React Native](https://segment.com/docs/connections/sources/catalog/libraries/mobile/react-native/#getting-started){:target="_blank"}
4550

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

4853
- [Application Installed](#application-installed)
4954
- [Application Opened](#application-opened)
5055
- [Application Updated](#application-updated)
5156

57+
In Kotlin, Swift, and React Native, the following additional events are tracked:
58+
59+
- [Application Backgrounded](#application-backgrounded)
60+
61+
In Swift, the following event is also tracked:
62+
63+
- [Application Foregrounded](#application-foregrounded)
64+
5265
### Application Installed
5366

54-
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.
67+
This event fires when a user **first** opens your mobile application. Note, if the user never opens your app after installing, Segment will not 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.
5568

5669
{% comment %} api-example '{ "userId": "019mr8mf4r", "type": "track", "event": "Application Installed", "properties": { "version": "1.2.3", "build": "1234" }}'}}} {% endcomment %}
5770

@@ -116,6 +129,21 @@ This event should be sent when a user backgrounds the application upon [`applica
116129
}
117130
```
118131

132+
### Application Foregrounded
133+
134+
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.
135+
136+
{% comment %} api-example '{ "userId": "019mr8mf4r", "type": "track", "event": "Application Foregrounded", "properties": {}}'}}} {% endcomment %}
137+
138+
```json
139+
{
140+
"userId": "019mr8mf4r",
141+
"type": "track",
142+
"event": "Application Foregrounded",
143+
"properties": {}
144+
}
145+
```
146+
119147
### Application Updated
120148

121149
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)