You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Airship gives brands the data, channels, orchestration and services they need to deliver push notifications, emails, SMS, in-app messages, and more to the right person at the right moment — building trust, boosting engagement, driving action, and growing value.
7
7
8
-
[Airship Cloud-mode Destination integration](https://docs.airship.com/partners/segment/#destination) enables users to set Airship Tags and Custom Events through Segment's `identify`, `track`, and `group` API calls.
8
+
[Airship Cloud-mode Destination integration](https://docs.airship.com/partners/segment/#destination) enables users to set Airship tags, attributes, and custom events through Segment's `identify`, `track`, and `group` API calls.
9
9
10
10
Segment `track` API calls are received by Airship as Custom Events. The traits of the Segments `identify` API call are interpreted as either `tags` or `attributes`. Tags are all traits that contains a boolean value (either `true` or `false`). A trait which contains a non-boolean value -- and is known to Airship -- becomes an attribute.
11
11
@@ -35,7 +35,7 @@ Follow these steps to configure the integration
35
35
5. For `attributes`, first [predefine them in Airship](https://docs.airship.com/guides/messaging/user-guide/audience/segmentation/attributes/#add-attributes).
36
36
37
37
## Requirements
38
-
To use the Segment Destination integration, you must implement `Named Users` in Airship. The Segment UserID must match the Named User ID in Airship. If your `named_user_id` and `UserID` do not match, Airship will not be able to associate `identify`or `track` events to the proper user in Airship. You will not be able to issue automated messages or to attach user attributes from Segment within Airship.
38
+
To use the Segment Destination integration, you must implement `Named Users` in Airship. The Segment UserID must match the Named User ID in Airship. If your `named_user_id` and `UserID` do not match, Airship will not be able to associate `identify`, `track`, or `group` events to the proper user in Airship. You will not be able to issue automated messages or to attach user attributes from Segment within Airship.
39
39
40
40
See [Tags and Named Users](https://docs.airship.com/guides/audience/tags-named-users/) or the [Named Users API](https://docs.airship.com/api/ua/#tag/named-users) for more information about configuring named users.
The `track` API calls are sent to Airship as `track` events. As soon as a `track` event is received, Airship will create a custom event. The properties of the the `track` event are automatically added as properties on the custom event. If `revenue` is present for the `track` event, then it is set as the value of the custom event.
83
83
84
-
Note that a custom event will not be created for a `track` event which has more than 20 properties.
85
-
86
84
**Segment Track Events to Airship Custom Events**
87
85
Airship custom events are used to trigger automated messages for Mobile App, Web Notifications, Email, and SMS messages.
88
86
@@ -94,21 +92,109 @@ Custom events and tags sent from Segment are automatically populated within Airs
94
92
95
93
## Group
96
94
97
-
For more information about the [group API call](https://segment.com/docs/connections/spec/group/) review the Segment spec. An example call would look like:
95
+
For more information about the [group API call](https://segment.com/docs/connections/spec/group/) review the Segment spec.
96
+
97
+
When you call `group`, the integration sets either Airship tags or attributes for
98
+
corresponding Segment traits. A *named user* must exist in Airship for the corresonding
99
+
value of `userID` in Segment.
100
+
101
+
**UserID in Segment group API call**
98
102
99
103
```
100
-
analytics.group('1234', {
101
-
name: 'Initech',
102
-
industry: 'Technology',
103
-
employees: 329,
104
-
plan: 'enterprise',
105
-
totalBilled: 830
106
-
});
104
+
{
105
+
...
106
+
"userId": "test-user-69w86c"
107
+
...
108
+
}
109
+
```
110
+
111
+
**Named user in the correspnding Airship payload***
112
+
```
113
+
{
114
+
"audience": {
115
+
"named_user_id": "test_user-69w86c"
116
+
},
117
+
...
118
+
}
119
+
```
120
+
121
+
Airship tags are set for those Segment traits that contain a boolean value (either `true`
122
+
or `false`). All tags from `group` API calls are added to the `segment-integration-group` tag
123
+
group.
124
+
125
+
**A Segment group call containing boolean traits**
For Segment traits that contain values of other types, such as numeric or text, Airship sets custom attributes. The integration maps the Segment group trait `name` to the Airship predefined attribute `company`. All other traits are prefixed with `airship_segment_group_`. Names of nested traits also include their parent traits delimited by underscore (_).
108
151
109
-
When you call `group`, Segment sends a custom attribute to Airship with the name `airship_segment_group_<groupId>`, where `<groupId>` is the group's ID passed as one of its parameters. For example, if the group's ID is `1234` then the custom attribute name is `airship_segment_group_1234`. The value of the custom attribute is `true`.
152
+
**A Segment group call containing non-boolean traits**
110
153
111
-
To take advantage of `group` features as tags, set up a tag group called `segment-integration-group` in Airship. A *named user* must exist for the `userID`.
0 commit comments